From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dgqO38Mw; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id C169B5A0271 for ; Mon, 03 Feb 2025 06:39:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738561145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SdZFD3Pag152ShmmoKO6iyxThUwjN7dHx2PP5iCT4ho=; b=dgqO38Mw7A7e2u9WjMAy3z5z8le5xiTL2A+I2sf7jGs4XM5pkFBr1+VRPbrg7h/HP+PSxh DYeb0D3JJgIklW4ufKHG42O4A7WwWb0fbHTw+Kh7S9Gc+OOgWY2aACZbAKzORB3LUAbr/M 0wnBKQHDM8QJl7yB6PiUk3BbLBVldL8= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634--AxjtJ1UMAKyxCiq4SPKEQ-1; Mon, 03 Feb 2025 00:39:04 -0500 X-MC-Unique: -AxjtJ1UMAKyxCiq4SPKEQ-1 X-Mimecast-MFC-AGG-ID: -AxjtJ1UMAKyxCiq4SPKEQ Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-385d80576abso2683596f8f.3 for ; Sun, 02 Feb 2025 21:39:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738561143; x=1739165943; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SdZFD3Pag152ShmmoKO6iyxThUwjN7dHx2PP5iCT4ho=; b=J8NDr1vAg97yIJdjvx6Tze4P7f9i5sZ3iYL73PB0Z/C+IpezjzghquSCgSUex1r/kc 19Jw1DzoXAjKyKwrK+5KmBuot8XD2RHUJWFFVdrJAUsgbeNn1l+cj9GFPJARyeLc50mo 80IbEm6U2PWx31fRtJec/7+QkLNCH+j3Xp/Duv9tsG+n2Z0iLnAs2+HM4+WlasikOkEj iQ9jbRoODUJrfw0cdivFpRMWDcENGQi1IUC/1T6GGpKbfj1yo5KahvNlscJHq2SpdsSl QzAJ4htPlRF+gq2TLh42T9LV6xT1Ic36mzdCWvCPQVu7ub8n8tnBNs0Hi3S3JtRFPg43 SnHg== X-Gm-Message-State: AOJu0Yyrc7TusGLi/9ARU/bAy7163wmL7wnFob3h8IwDJ1pf2rntOEIu euTEihLGJiatZIuC6QCEJnoiKyF58ultSM/jdr22Rouvd6JAO4QJMJxe6LrreFFHL6y2IjfZEEU SrjpdkVSVuNEHSGedETdW3JlbgoKN0adwxFf+l9pa0A6HbjI4bQ== X-Gm-Gg: ASbGncu2VcgKn9dSpn+T2o3yzqfiRtW4Dqktgq17AYPndFazwAmr38McbhJOK4+HwzA dEimE6PY8G351VosZE1sM9lRMsOolrDahjwhCjC1QG8lA7zHTDirue3u4xhDUlmUYHoIPZ0QxZJ krLEeDorCYfWEZHkDtv/Do28cz3nLL6jU1n9zzahfO32HbxUZ9/bmnTo9t7/iRFJU6KDl9x+XD0 u+ymIXl+TV3At2sQOmctBxM4wOWBEdooA+vyHqXdvylIoIrpF7NhS8OPci/1c7o6GzSejUasq0C LoegXPmUenVwLT8mLhKtnxlIRk9DV9rD/A== X-Received: by 2002:a5d:6d86:0:b0:38b:e32a:109f with SMTP id ffacd0b85a97d-38c519504a4mr16902388f8f.12.1738561141630; Sun, 02 Feb 2025 21:39:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPalGCrfVDMGD4znVLIjkPhvbdEmd9Hcgcy1JPNpzc+9q/37WKKQccwJboa3eq9sHJcrnYfA== X-Received: by 2002:a5d:6d86:0:b0:38b:e32a:109f with SMTP id ffacd0b85a97d-38c519504a4mr16902354f8f.12.1738561139855; Sun, 02 Feb 2025 21:38:59 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438e245f41esm141869295e9.36.2025.02.02.21.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2025 21:38:58 -0800 (PST) Date: Mon, 3 Feb 2025 06:38:56 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v3 14/20] migrate: Don't handle the migration channel through epoll Message-ID: <20250203063856.0d08f579@elisabeth> In-Reply-To: References: <20250131193953.3034031-1-sbrivio@redhat.com> <20250131193953.3034031-15-sbrivio@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lGgvs-4Vr-Fb_W1aU3QeL49V5oNSt0vbcLm6s8fuFbw_1738561143 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: WQU6LOV4VX2V6NGGIUQPJUTE5XNVLAND X-Message-ID-Hash: WQU6LOV4VX2V6NGGIUQPJUTE5XNVLAND X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, 3 Feb 2025 12:50:20 +1100 David Gibson wrote: > On Fri, Jan 31, 2025 at 08:39:47PM +0100, Stefano Brivio wrote: > > From: David Gibson > > > > Currently, once a migration device state fd is assigned, we wait for > > EPOLLIN or EPOLLOUT events on it to actually perform the migration. Change > > it so that once a migration is requested it we complete it synchronously > > at the end of the current epoll cycle. This has several advantages: > > > > 1. It makes it clear that everything about the migration must be dealt > > with at once, not split between multiple epoll events on the channel > > 2. It ensures the migration always takes place between epoll cycles, > > rather than, for example, between handling TCP events and their > > deferred handling in post_handler(). > > 3. It reduces code setting up the epoll watch on the fd. > > > > Signed-off-by: David Gibson > > --- > > epoll_type.h | 2 -- > > migrate.c | 44 +++++++++++--------------------------------- > > migrate.h | 2 +- > > passt.c | 6 ++---- > > passt.h | 2 ++ > > vu_common.c | 27 +++++++++++++++++++++++++++ > > 6 files changed, 43 insertions(+), 40 deletions(-) > > > > diff --git a/epoll_type.h b/epoll_type.h > > index b981d30..7f2a121 100644 > > --- a/epoll_type.h > > +++ b/epoll_type.h > > @@ -40,8 +40,6 @@ enum epoll_type { > > EPOLL_TYPE_VHOST_CMD, > > /* vhost-user kick event socket */ > > EPOLL_TYPE_VHOST_KICK, > > - /* migration device state channel */ > > - EPOLL_TYPE_DEVICE_STATE, > > /* TCP_REPAIR helper listening socket */ > > EPOLL_TYPE_REPAIR_LISTEN, > > /* TCP_REPAIR helper socket */ > > diff --git a/migrate.c b/migrate.c > > index fc6a043..faa7841 100644 > > --- a/migrate.c > > +++ b/migrate.c > > @@ -50,7 +50,6 @@ static union migrate_header header = { > > > > /* Data sections for version 1 */ > > static struct iovec sections_v1[] = { > > - { &header, sizeof(header) }, > > This hunk seems to have migrated in during rebase somehow, it wasn't > in my original patch, and it breaks compile. Oh, oops, yes. I did one last rebase round before posting, and I was convinced I was just rewording messages, so I didn't even try to rebuild, but obviously I moved some code here and there as well. Do you prefer I post a v4 fixing this up and addressing your other comments (and some of my open points), or should I rather wait, if you're working on patches based on v3? It makes no difference to me. -- Stefano