[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCzsnXPQ0TtKtqu9@google.com>
Date: Tue, 20 May 2025 13:57:01 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>,
Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.linux.dev, K Prateek Nayak <kprateek.nayak@....com>,
David Matlack <dmatlack@...gle.com>, Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Subject: Re: [PATCH v2 06/12] sched/wait: Add a waitqueue helper for fully
exclusive priority waiters
On Tue, May 20, 2025, Peter Zijlstra wrote:
> On Mon, May 19, 2025 at 11:55:08AM -0700, Sean Christopherson wrote:
> > diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c
> > index 51e38f5f4701..03252badb8e8 100644
> > --- a/kernel/sched/wait.c
> > +++ b/kernel/sched/wait.c
> > @@ -47,6 +47,24 @@ void add_wait_queue_priority(struct wait_queue_head *wq_head, struct wait_queue_
> > }
> > EXPORT_SYMBOL_GPL(add_wait_queue_priority);
> >
> > +int add_wait_queue_priority_exclusive(struct wait_queue_head *wq_head,
> > + struct wait_queue_entry *wq_entry)
> > +{
> > + struct list_head *head = &wq_head->head;
> > +
> > + wq_entry->flags |= WQ_FLAG_EXCLUSIVE | WQ_FLAG_PRIORITY;
> > +
> > + guard(spinlock_irqsave)(&wq_head->lock);
> > +
> > + if (!list_empty(head) &&
> > + (list_first_entry(head, typeof(*wq_entry), entry)->flags & WQ_FLAG_PRIORITY))
> > + return -EBUSY;
> > +
> > + list_add(&wq_entry->entry, head);
> > + return 0;
> > +}
> > +EXPORT_SYMBOL(add_wait_queue_priority_exclusive);
>
> add_wait_queue_priority() is a GPL export, leading me to believe the
> whole priority thing is _GPL only, should we maintain that?
Oh, yes, definitely. Simply a goof.
Powered by blists - more mailing lists