From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794948104; b=L7lI9OY7RVsC0W+61uEu7VBzS70wwTlFL5S80tkXEoaRJzW56+yHI2e4FWB3B+NVKJ8w qIkJv7yCr1saPiWxsTrub05c80SMsg3rrfV9TxifllukzrVmW2mhZGXxesGIIh+g/vcWi VdX/42lgqo4Qp2FxztF5MEMkZuos2G+SjxPlHWHSeQVqldyTEe+omrZJboP5cKbeFzwtz LOMyZIUnwi37Qr+s7+u6DEueSrgB/NJrIqF3KcEhPjq0F5rfpdv7c2MxDDatj8tBGYC3W KmfLAfwYDllB17KoUVRHgUec6mW0XE5CE0Tm35loNkSuIpQhH9SXbwwDogV5qg0Hy9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794948104; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Scanned-By; bh=S7xqb7UvzbEnUt6XJ1+tm8jlYeEATOyg2jR5hBQlbVo=; b=Z6idxf01Fgku7qjO7B7UhukRFa3Ij3vqhbsQOIe2VoCZe0ulxHtGTdSuMK9YgETELJa7 XY9lWybllySq1TZYmk/FxO5oaan2GRvbClRzxJHnS4bXj3y7vFQGMGIKIlZdmbxSpHXnm KYbz20zOlulvKdOXJ7N3tnftp39AZHxWYf5LDhow5X1FDli3z9N3XgGAYyjwODbjKtqji cC/fsUmzcjwhfWjUF/8UJ6iNMZwhNVWsR3GqEgyEe+r4Gcj1IVz+z2mlAl1l6S8/Kwmom iH037aipk/vll7jyy2Y6rOV5ajKoJY9ziXkxadOLBQCV/GErcJ6t/Rs0akwViaiDLdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b="h/zZuDRd"; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9065A606A32A for ; Tue, 17 Nov 2026 20:41:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9065A606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=h/zZuDRd DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1794948102; 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: in-reply-to:in-reply-to:references:references; bh=S7xqb7UvzbEnUt6XJ1+tm8jlYeEATOyg2jR5hBQlbVo=; b=h/zZuDRdiYbmRKrish0Tc54TAszq1EtTFctZToyGjNri6iWevr9s5wdj5lnx1IOwSR15gV gj4LuRLxyRxE8ReVpmLQbJnBajNwXMnJKJDiHqRqOE+6bx3+TC9O7WYvki/mlMh+oFXLmU dXVFYWBKXZKjfh1ueP3E1iu2QV/i/F4= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-175-tH5EHz67OeyDOL9pbbFrUA-1; Tue, 17 Nov 2026 15:41:38 -0500 X-MC-Unique: tH5EHz67OeyDOL9pbbFrUA-1 X-Mimecast-MFC-AGG-ID: tH5EHz67OeyDOL9pbbFrUA_1794948095 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7A32518004FE; Tue, 17 Nov 2026 20:41:34 +0000 (UTC) Received: from onestero-thinkpadp1gen7.tpbc.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id D0B70180056E; Tue, 17 Nov 2026 20:41:30 +0000 (UTC) Received: by onestero-thinkpadp1gen7.tpbc.csb (nbSMTP-1.00) for uid 13628 oleg@redhat.com; Tue, 17 Nov 2026 21:41:34 +0100 (CET) Date: Tue, 17 Nov 2026 21:41:29 +0100 From: Oleg Nesterov To: Linus Torvalds Cc: Mani Tofigh via B4 Relay , Breno Leitao , Christian Brauner , Mateusz Guzik , Alexander Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, tz2294@columbia.edu, stable@vger.kernel.org, Mani Tofigh Subject: Re: [PATCH] pipe: keep per-write wakeups for EPOLLEXCLUSIVE consumers Message-ID: References: <20261111-pipe-epollexclusive-wakeup-v1-1-0af6283e9fda@columbia.edu> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 11/17, Linus Torvalds wrote: > > Side note: as part of looking at it, I did look at what it would > involve in our wait.h infrastructure. > > That header isn't _horrible_, but some of it was uglier than needed, > and adding WQ_FLAG_PRIORITY would have been a huge pain because the > code unnecessarily special-cases WQ_FLAG_EXCLUSIVE. > > So while I threw the rest of my trial patch away, this patch remained > as a cleanup. It *looks* sane to me, and I think the end result looks > better and would be more flexible. > > For example, it would have allowed just adding a new user of > ___wait_event() that used WQ_FLAG_PRIORITY to put itself at the head > of the queue. ... > -#define ___wait_event(wq_head, condition, state, exclusive, ret, cmd) \ > +#define ___wait_event(wq_head, condition, state, wq_flag, ret, cmd) \ > ({ \ > __label__ __out; \ > struct wait_queue_entry __wq_entry; \ > long __ret = ret; /* explicit shadow */ \ > \ > - init_wait_entry(&__wq_entry, exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ > + init_wait_entry(&__wq_entry, wq_flag); \ > for (;;) { \ > long __int = prepare_to_wait_event(&wq_head, &__wq_entry, state);\ Damn ;) I simply can't resist. I swear, I was thinking of exactly that same change during our discussion. So I think it is obviously good and makes sense, but I will try to re-check it after sleep. Oleg.