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

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


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 13 Feb 2026 09:26:39 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • 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=EeozffoWk4867hcMMzDJBYr4g9lxsgDRJMBwggXTYuo=; b=HzFrzQ4hIlNSF+CZL9NCyVpVEoMyqecHgMJSuruKAMzZe8VT3WBHia1GandAINHxOEcEx16oGB/LwzCyMKaeYw1ini+lHIfqTbMP2UkzqEdy/oG6tyF6sXj7izIkCEM6dVLUFSiXlH4oluaF6MvA0WY/5SuP26+1WvBTPalPa9NFMNxFTk5ZfC+OC9R1OJJISp7Hd5r9YgzwmvxaTl6rRmGNhKlRRGwApMpLOdGzoN0C7DUwhy/l4FunP3oxHctawWTkDbL8SbM2bQxnduPIe4n2G0Vz9kkYk14dGTP9NxH47pMgpnN3UKln+BSpNeolgZ2h0EKpmzu0b4wxC/cRuw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b0bcAuQG/OWoLkOWBE8FIijTjnHBuKInDR9gVEpN9LMC3nNaS7sZzvBwt93GFPl+FjzF2UlynTiHjo8pNJRGBs8MFSBSwQJlP6qdwTey3C17Ir3UIkhKvKNfItgkMo7txxN6fdmf9gO4JvU6JyPBUcRI+pH1x0PiyMAfvpTywWF4VoFLmXdnSmOseUtu6CWetNQLcGN7ysT0SkpFfVxT8GvxHrrd2xLmdFWvPiRF0DfjGfF60UEVeih2ZzqEuG/EFUcYeUEES+VKzS4pHvQAHmErcQNlBrm1YQ4RI3CPoo4FKiMtSNt6GHuOxE1bcMw+a1/TKEGBlYXLq3NEFxQXaA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 13 Feb 2026 08:26:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Feb 12, 2026 at 02:14:58PM -0500, Jason Andryuk wrote:
> On 2026-02-12 02:38, Jan Beulich wrote:
> > On 11.02.2026 18: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?
> > 
> > But if we want it compiled out altogether on Arm, ...
> > 
> > > 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.
> > 
> > ... don't we need a separate kconfig control, for it to be selected only
> > on x86 (or for it to be dependent on x86, and then imply-ed)? Imo
> > CONFIG_WAITQUEUE would be okay, as long as it won't have a prompt. We'd
> > then simply want to prevent further select-s / imply-s to appear.
> 
> ARM VM_EVENT=y won't link without wait.o.  Undefined references to:
> wake_up_nr
> prepare_to_wait
> finish_wait
> destroy_waitqueue_head
> init_waitqueue_head
> 
> So I think that points to re-using my original patch, but with either
> CONFIG_WAITQUEUE or CONFIG_VM_EVENT.  Since CONFIG_VM_EVENT is the only
> user, and we don't want further uses, I would use that.  But I am open to
> either.

I think hiding behind CONFIG_VM_EVENT is better, we want to avoid new
instances of waitqueue (at least in it's current state), so not sure
it makes a lot of sense to add it under a different Kconfig option if
our intention is for waitqueue to only be used with VM events.

Thanks, Roger.



 


Rackspace

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