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=1794936348; b=lwv7ZQabGx7RmF8hE9fnCsxXui9cxmcmg9U5qFPBpgJjua92G+u+VG6Lh7mmQqQwaN3d FYCAuAnzox3ffKZxkyuCEdK+cPwdWSl5J9olkEsf03h1GfykAHam94akc3HRjzPQXKPUg hs/8plUFpa9+ymIqI6uHstHyiVDfxEhiXaOz5jnCIHZOFEQ9yoYNsy+neIc5oIAhds23Q RtEjldeW25+jfHHcuRhZ51/css7mBmOM2VGzWvCODr4hy/nAqmoKIYZmQQpzBTevpQSM4 DQQSR1HQd+jJimTQM5dbjbzUA1blPrS9BygiBqMIoawnkNhoJNvBcudxYWGTGhd+zHQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794936348; 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=5HpZNf1p6vQ+Z15EuGtPfQXOlxM7vON26KjcgJWrLvY=; b=VMcsUIr8EMlC8BZCsQYiBGWeF+VqsSJqeq5cJqLKwJwDUe1BhPHkKBrVjgYQG9Bomf16 feuwrk5lLzq2LGcNyqXgC4YWuOY38UUFLMibrz2MdrdlDAfWArUqwPJso9iE4dWXe7bOt jNevFx9YqCNjiSAYS4GABhYv8lhH//pFEuGcFr3L488Ijq54cqhZWZzuX4yU9i0lz/ldK Kj9vm3oeENCr9LGUfbQC951GIzDXAt8vJ7r/hNXP7AdJdGON51QAjliU/NIqFD/hxqAxd U8k5ucmlbQjsY8XTo1KXMq9pTExeOA10MpT6wUzDzVkNj67sEKL1+PgzWKcWK68SNIQ== 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=Y0cAOkcf; 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 DD936606A32C for ; Tue, 17 Nov 2026 17:25:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DD936606A32C 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=Y0cAOkcf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1794936347; 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=5HpZNf1p6vQ+Z15EuGtPfQXOlxM7vON26KjcgJWrLvY=; b=Y0cAOkcfxmvbVcUy2Mymrlgs35i1jUf7NE83emRI/hA1hsWrUYxY8HlAV7xOA5QNog+QBl +M0hp8O/CBYsmeoJvD66wKoKuWcZ33NPsFEij9YbtR3FgG8zVIvqcrq6yEvy4a75TrsWTu ftoHUqsFTxzRimLV//JwDTiEVK0u/HY= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-467-OB_fdnBjM0yJlldqNbt59Q-1; Tue, 17 Nov 2026 12:25:41 -0500 X-MC-Unique: OB_fdnBjM0yJlldqNbt59Q-1 X-Mimecast-MFC-AGG-ID: OB_fdnBjM0yJlldqNbt59Q_1794936339 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6CB201956051; Tue, 17 Nov 2026 17:25:39 +0000 (UTC) Received: from onestero-thinkpadp1gen7.tpbc.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id F27F53001DAD; Tue, 17 Nov 2026 17:25:35 +0000 (UTC) Received: by onestero-thinkpadp1gen7.tpbc.csb (nbSMTP-1.00) for uid 13628 oleg@redhat.com; Tue, 17 Nov 2026 18:25:39 +0100 (CET) Date: Tue, 17 Nov 2026 18:25:34 +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.4 On 11/17, Linus Torvalds wrote: > > On Tue, 17 Nov 2026 at 05:27, Oleg Nesterov wrote: > > > > However, EPOLLEXCLUSIVE breaks this logic. ep_ptable_queue_proc() does > > add_wait_queue_exclusive() if EPOLLEXCLUSIVE is set. > > Christ, how I hate epoll. It's a pile of stinking shit. > > This literally violates THE WHOLE AND ONLY POINT of exclusive waits. > > The rule for an exclusive wait is that it *will* act on the wakeup - > either by consuming the data, or - if it can't consume it all - by > waking up the next waiter itself. > > So it's not that "EPOLLEXCLUSIVE breaks this logic". > > The logic is fine. EPOLLEXCLUSIVE is broken beyond words. Well, I thought so too. That is why initially I replied "we don't care" to Mani. But then I decided to summarize and add CC's. So. Do you agree that we can "ignore" this report from Mani for now? Until we find a user application that already depends on the behaviour before f1cebdec9739 (the next write() wakes up a reader which sleeps on ->rd_wait for no reason). Just in case... io_uring/poll.c:__io_queue_proc does the same: if (poll->events & EPOLLEXCLUSIVE) { add_wait_queue_exclusive(head, &poll->wait); } else { add_wait_queue(head, &poll->wait); } Oleg.