Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp503567ybe; Fri, 6 Sep 2019 02:54:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSpPfWcyzB9rp+i1udciTbc8/DTm+N7w6aHUXBdbkbnuv9iu/8pbHF4RBzEBUDF+cukBCr X-Received: by 2002:aa7:99da:: with SMTP id v26mr9584056pfi.258.1567763650407; Fri, 06 Sep 2019 02:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567763650; cv=none; d=google.com; s=arc-20160816; b=Dk43H8NAfM+5jxQa1G8Rq9lgrVkSplrHK3OVnqKZSm16g2FBEBDX/DsukPFNl/M52h klksn2AtsJo4ofO3VO3PSPX2VMhQV5kJZtBRFBIJFJ4Y8r3ov+Vonnjs/JYZfbO7tF7b 85Pr35QIGiRB1yJLnosjtMgWXEVoOJwhfHwy5yMOXOPlYMc46nJIzSKbFOBESUepwAYg uEJeYDnv6myZyQ1erk94R4E3jKT6SCPQ8apuJsDjZs4RHydZ/bX6rcjEcMVdSMRNAkhT GpMrHWNNx8pAUXv9KNXOx57/a9TMDN+0Q+ZYPnO5MHcHUsgU+HsZKg8eW6qaOaPlhHhu GDiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=M+5ZnddIpyZ41qm3i/o6ZVhnWnMKC+lfJBmlRIy+dqM=; b=fUekWhe4HGSbv1v+Vhvmf6/HulrhNnctdCqvNT/rEFT2QGX2D01XPhe8IYOr3FxtVX RMGsIC+K8SDXISKY6YdK180qdmc1JVAXxDfGSySS0hrGFc4zVzG8cHWqMlqhYTeUC0AZ jOP5laqpXTlQcF+J9tfwHGhIN7dBHEIm31Ki/fQSEeG0iaeRcAbv8prCH+bogNjAap4g Uy/KJHDYxOjlDwnKvbTn4o4DbeaoJOZaDeafVDSqtMT6sq2WQn3wYajs2CiqhfVi3o9s OrdRNFMaxXuR9B9JvgLyL1bwewUWo+5CWABqtsTpDRYCePxLzWIDBjli8sOOg2aG/zoj yMfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si4227624pgl.343.2019.09.06.02.53.54; Fri, 06 Sep 2019 02:54:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730615AbfIEXSe (ORCPT + 99 others); Thu, 5 Sep 2019 19:18:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33794 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbfIEXSd (ORCPT ); Thu, 5 Sep 2019 19:18:33 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 08B4DC057E9A; Thu, 5 Sep 2019 23:18:33 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-255.rdu2.redhat.com [10.10.120.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9AB5E60BE1; Thu, 5 Sep 2019 23:18:29 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <156763534546.18676.3530557439501101639.stgit@warthog.procyon.org.uk> <17703.1567702907@warthog.procyon.org.uk> <5396.1567719164@warthog.procyon.org.uk> To: Linus Torvalds Cc: dhowells@redhat.com, Ray Strode , Greg Kroah-Hartman , Steven Whitehouse , Nicolas Dichtel , raven@themaw.net, keyrings@vger.kernel.org, linux-usb@vger.kernel.org, linux-block , Christian Brauner , LSM List , linux-fsdevel , Linux API , Linux List Kernel Mailing , Al Viro , "Ray, Debarshi" , Robbie Harwood Subject: Re: Why add the general notification queue and its sources MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14882.1567725508.1@warthog.procyon.org.uk> Date: Fri, 06 Sep 2019 00:18:28 +0100 Message-ID: <14883.1567725508@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 05 Sep 2019 23:18:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > But I know - we *have* one of those. There's already a system call for > it, and has been forever. One that we then extended to allow people to > change the buffer size, and do a lot of other things with. > > It's called "pipe()". And you can give the writing side to other user > space processes too, in case you are running an older kernel that > didn't have some "event pipe support". It comes with resource > management, because people already use those things. Can you write into a pipe from softirq context and/or with spinlocks held and/or with the RCU read lock held? That is a requirement. Another is that messages get inserted whole or not at all (or if they are truncated, the size field gets updated). Since one end would certainly be attached to an fd, it looks on the face of it that writing into the pipe would require taking pipe->mutex. David