From nobody Wed Apr 16 00:16:34 2025 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9560D21E0BB for ; Tue, 1 Apr 2025 20:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743540423; cv=none; b=JHqN9jpFK4hpsNZEu7MHbTPkmv2p9gY1YsFxiTfMe7Zo1JtgCqF2KQBLsYPiIkTaY0H7cH+sfq3quK+3dt0efmesTKsfg/FA5N/Z1Ho2p3qVC65lsVjRgPejjgCjY5Fw9qSKc4Q/9AtpOWcmSKoEyns0bLGAIZrlOpnUEK5gSSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743540423; c=relaxed/simple; bh=V7OL3Q/3J2xWKwnmIlSC3LoKokZ3iR0JrDzpSaKTdhE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DSMWFzpGEMIoIurUgdQoG85KnqSt1HVYxID2LfoiVCZSJyTIzvw4/a2PKAnwYSzBG4/zo/PeuYisoqAYVOp9LLqKXn7k+Zi/K8iTMehkbWzo6iaaPKVX3u0hET1cCxY9Q3kF65fqdfJNtE4xqoinsnwUd7ljc+dyU7XAVZ8SRm8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qGfT9SO9; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qGfT9SO9" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-30364fc706fso10340067a91.3 for ; Tue, 01 Apr 2025 13:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1743540421; x=1744145221; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=hAOHDZe9hVA1LcrHBl8ILklpk5SqTyz1Lg9oNtA6EC8=; b=qGfT9SO9RBnPGlw4gIUZCxTZpC07aSiJWDJT4WjMDM64dl+zIYdeV56USeA7rEij6v pmvTivzaioWglX5Vs3GwKiUlfDH1IXnBkXC7vnHnneaNalAvoQmLUbIp4csryWG5+tjZ UnnzWVhOhc7M2qdv085XnlWkZx7MLmjBFcysL4azU42Z0yG+v2TLZk5SlEGN2YYDTlPC VXDsSxQcaybJyld7Uf+9I2BShpImty6NaOEK3NUmZUn46zt945XknHRLxA1IcnXvVjKZ Ub5Q5a8oGGe3+nEJlEJ2GQl9AB2mGMxwUNJBsDKv1wH0aOFzMgQte1afncVlcelu8hpd 8gvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743540421; x=1744145221; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hAOHDZe9hVA1LcrHBl8ILklpk5SqTyz1Lg9oNtA6EC8=; b=k0aCTw5ecV1VPLH0/k1K5psWCCneZ7DL6JgFCqvzbeTvPjRVBudwikJ0WUpRnfVf6C QKheK/z1pBZv9Bwx5Px3mWOffWRWOv98GntgMWQyWk7Oh0+nGmWn+QsIhiZ7kVaQXpUK nAXKMqE/4E46sJBFirqzIXvR5QFZ3hWOMCa4viWALriVH3Cw2k6AcwX1r3l/KaHOKM8V +jPj9O4Ibm6r9/az5WIQNvFRsNrAgxOv4xDgxNqAps0EJKTUCZsxPL2OGnR8YehiTDyJ xqq/UeNR9hFMBA26hWPVHo0uNFV8k9VcdORL5MJxoVNuo8bowS25vzlzc9tKIGp5Xm7d 8fHw== X-Forwarded-Encrypted: i=1; AJvYcCW8pZJnzAwlI1/Q3PMhYlL2IxxWWr1oIkcYsVOVJN9m+7xaWMZbgSdK273EWq1+C2soKJHWGb8p4bRJUu0=@vger.kernel.org X-Gm-Message-State: AOJu0YyYXmnsgyGsQc2Fn9yIuhJg6u8LTApin2hWLuoc4V7uCDhUCtov 5fucQHWYlV3NLlhnuMmsykX+oFEcrFxSWI+G/xyL2EAuPTVwnmJekRhTyzhJbxNNdmoLVDnltmX /Yw== X-Google-Smtp-Source: AGHT+IHU4ej+9xtm5sDkWeeRPmRGXEXSjICfBn2mdGglMLGC+glAIOtURcbT/pNs0Pm5Q7kEH8DQAnKQF70= X-Received: from pjbqb11.prod.google.com ([2002:a17:90b:280b:b0:2fe:d556:ec6e]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:1344:b0:2ff:6788:cc67 with SMTP id 98e67ed59e1d1-3056096950cmr5544504a91.34.1743540421162; Tue, 01 Apr 2025 13:47:01 -0700 (PDT) Reply-To: Sean Christopherson Date: Tue, 1 Apr 2025 13:44:20 -0700 In-Reply-To: <20250401204425.904001-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250401204425.904001-1-seanjc@google.com> X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog Message-ID: <20250401204425.904001-9-seanjc@google.com> Subject: [PATCH 08/12] sched/wait: Drop WQ_FLAG_EXCLUSIVE from add_wait_queue_priority() From: Sean Christopherson To: Paolo Bonzini , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Marc Zyngier , Oliver Upton , Sean Christopherson , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-riscv@lists.infradead.org, David Matlack , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Drop the setting of WQ_FLAG_EXCLUSIVE from add_wait_queue_priority() to differentiate it from add_wait_queue_priority_exclusive(). The one and only user add_wait_queue_priority(), Xen privcmd's irqfd_wakeup(), unconditionally returns '0', i.e. doesn't actually operate in exclusive mode. Cc: Juergen Gross Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Signed-off-by: Sean Christopherson --- kernel/sched/wait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 80d90d1dc24d..2af0fc92e5d3 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c @@ -40,7 +40,7 @@ void add_wait_queue_priority(struct wait_queue_head *wq_h= ead, struct wait_queue_ { unsigned long flags; =20 - wq_entry->flags |=3D WQ_FLAG_EXCLUSIVE | WQ_FLAG_PRIORITY; + wq_entry->flags |=3D WQ_FLAG_PRIORITY; spin_lock_irqsave(&wq_head->lock, flags); __add_wait_queue(wq_head, wq_entry); spin_unlock_irqrestore(&wq_head->lock, flags); @@ -84,7 +84,7 @@ EXPORT_SYMBOL(remove_wait_queue); * the non-exclusive tasks. Normally, exclusive tasks will be at the end of * the list and any non-exclusive tasks will be woken first. A priority ta= sk * may be at the head of the list, and can consume the event without any o= ther - * tasks being woken. + * tasks being woken if it's also an exclusive task. * * There are circumstances in which we can try to wake a task which has al= ready * started to run but is not in state TASK_RUNNING. try_to_wake_up() retur= ns --=20 2.49.0.504.g3bcea36a83-goog