[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Put wait.c behind CONFIG_WAIT


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 11 Feb 2026 12:57:53 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cuxChwQnYs1S+LdwdTX/HlOeyWPTe+gDwEfHWFxVZys=; b=MtH0MkSn0T0RgDTPtGL101Yqn3VWRr3P+XLRrp8ODzJ8XQPZbQQv2SV3MyCjIBgFgCZxywVnS/65rnR0KUolzF2BuJ/ixcxARKy67L5dKmpbB8wG6D92P89dc1+MvKmM/DVrn8e3+AZyMOyfyFYSrrc2Wrcg0Z2tVhO64VMYkIwEF59AA8ZxnUTw6Mn48JEsFGbqJ0Y51rCw4Z3Af0WQYKau4rhkihCxtepg3b0+CLL8tKJqWIpKEHEm5ukKRBFbS1PO8MOGzlysS9xY53ZcYp5CoEzv5wvUyT6cUPPpZm92bOHUX5skF6iEgfGCoMfc8Q8LxEHD//87mabiUYyAgQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=S/fBXw6PfKklBYCO1j1D7UW6W3aG57pk7l0RpnZpn0Ej9trTnesy+G/J/O/TMU1oqrZfbaUpjOIacXhnzRVTw+q7p7/swXmfr2s+ohj1/uzguSKiuxKnsCjhLZThh6jPtCBXysD9S6d5xps64VFFlwc1ziYQwAjGAyadDppEd3FSjY2gO7qSYzGjuOkGQ2h9eSSxgBajy/LwvcOY2NZyV2+3Pqi4HUTHAHKevon2ob1DT9a2JV71YTFv2PhrpBZC/v35i39EpS28lZB4MEunLqV6HCcPy4Tj9F5SV2Rvr88DTcEumKLDa0Z+GfsKPbUuD5TC8ysqHrP5GYcc82lsQg==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Michal Orzel" <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 11 Feb 2026 17:58:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2026-02-11 12:30, Andrew Cooper wrote:
On 11/02/2026 5:01 pm, Jason Andryuk wrote:
wait.c is only used by vm_event.c.  Make CONFIG_VM_EVENT select
CONFIG_WAIT, and use CONFIG_WAIT to control building it.

Provide stubs of functions called from common code.  entry.S needs an
ifdef to hide the symbol from the assembly.

Also conditionalize .waitqueue_vcpu in struct vcpu to save space.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>

I'd really rather see the API/ABI changes required to purge wait.c
entirely, but I guess this will do in the short term.

Two things want further thought.

First, because ARM uses per-vCPU stacks not per-pCPU stacks, it doesn't
need this infrastructure in the first place, but it looks like it's
still compiled in and half wired up.  I suppose you don't notice because
you compile out VM_EVENT on ARM too?
I was focused on x86, and didn't realize this was used by ARM. I think I noticed the lack of check_wakeup_from_wait() calls on ARM. What did I not notice? Are you saying wait.c should only be built for x86?

Second CONFIG_WAIT isn't great name because there are many things it
could be.  I'd be tempted to just reuse CONFIG_VM_EVENT and go without
CONFIG_WAIT.  I do not want to see any new users of wait.c, and it will
disappear at some point.

Yes. I used CONFIG_WAIT since it matched wait.c. I considered CONFIG_WAITQUEUE, but went with the shorter option. Re-using CONFIG_VM_EVENT would be fine with me. I didn't use it in this submission since the waitqueue functionality is more generic.

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.