Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp386406ybe; Fri, 6 Sep 2019 00:43:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1bQ8RaKv9TGphzoY+LO2WuGk79xpZEGwCypzM99Lv+S29+f+QydQMvjTYPNlp9VXT1RxR X-Received: by 2002:a17:90a:8d03:: with SMTP id c3mr8098251pjo.120.1567755780478; Fri, 06 Sep 2019 00:43:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567755780; cv=none; d=google.com; s=arc-20160816; b=0JD3oRlYK1ClcabIZU78q7PI81MNXvM1q/873pFBGCxN3sPtp7uUdcW8Of8uqPFCcJ oyqabqdKop7rV9w9SihASQSeg2aF5qYw85aWeq+NnCZQWDWBTqVGSCBsOjZiyKGBDBRg XaM/x5M3xt3qoX7FDnnuKIMSdviC6OBQ5ffytPt8Bv48gh9IjVsLoYhTDS5g3SroY6fL 9co3bAO1jjf/f1l4TGuAQzgpRA9vSNZd9XOYsEbG5t4On+QWvPKzTinW7RQfqPJ4Dmtm 5hmM56h5nLjOSvMgLVai3++UEPI8JgVqtlAGKcanM+k9VFrwuL/dXRdIjzlM9DfJPoPM UH1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3+bS8S77AzTpTBzzxsdlLs0HnCbtRjNnmkiZK0MPy0c=; b=ySCsC7+fGgXD4IS/dqPpPTZ58ArottJJgb4lKOurSZeK0xRwDnX9cMFDvuZb/ejxNq RHiyzUoHmDGbajIbIkzgpgbdXSG8cQBT7EZOdjGNY41huLG7KoXPmhnEuXc9zq6ztiLW 2F3OJhw8XnIioOa9/mBdrrMa7ocn2UxFnYp1Ubk2bP2Y1Zmv4SNnGnl706AFS6Ob9IkV tKSYmSkX241S40xW05T8Yi9IN7bAlT7UEVepthGnxHxk4b6GpgPdHGDEzC15L2SZCUWa ZbYv/3J8/AFVv1A0z2JCm0AgIq0+a+ODhIFVYIennE1xidzHMQTcmXP6zeLhT4Am/VAb Z68g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=LbASCsGx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si4753502pfh.279.2019.09.06.00.42.44; Fri, 06 Sep 2019 00:43:00 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=LbASCsGx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391103AbfIEWQx (ORCPT + 99 others); Thu, 5 Sep 2019 18:16:53 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:38842 "EHLO mail-lf1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388847AbfIEWQw (ORCPT ); Thu, 5 Sep 2019 18:16:52 -0400 Received: by mail-lf1-f49.google.com with SMTP id c12so3336364lfh.5 for ; Thu, 05 Sep 2019 15:16:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3+bS8S77AzTpTBzzxsdlLs0HnCbtRjNnmkiZK0MPy0c=; b=LbASCsGx0k6udtd2AsgFeBhmCaCLrlsklx+62iSSE5Gkytkq0WN1acnDpFn5oCNEQS KMkfsxyWBngO5Ing5S64rk5RN/Socr904CmKtCx01r5GqFjCKXQfIr7B9uXv9DslB2br 7qADnXCimEFjoVvgCL5m3EkgAFlL+VHV2J5FE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3+bS8S77AzTpTBzzxsdlLs0HnCbtRjNnmkiZK0MPy0c=; b=iWU6y9LAEsw4sPJgB/hkh29hO5aGwBZybR8+p4WyqQHEHxOkqlo9X6vXAW2UEmowce ciE8xBrZ7jmlRoEB0mutipGG0rjIU3d8aeCmRiBY1F3uILD+Y1WmeD9p91yzHW+JZinH WeXWcyV52C2jmLl1W26ZlsQSxZXf2AD+BA99r0JF7EHlCzDICwcjYpQkJ49DWWvOgjkm NTVkJNtoqao2Ze+BVvQjBvcRWBxVHfoR80Ww9BD7LIqSADOLWPicKgG6BxR+xUVrO3jh WHSJrMZECcFu4Rh4vYetxzaFyw2Pg6rJNb7I60/tqTMfc7YqyjJAJm4AZGZ17OJRBtuJ qslQ== X-Gm-Message-State: APjAAAX+UFiDQkQqDu6Mxq2GXF8Qy/LXptuVxNLz+9fUn49A5E+JgqNt nANumH9P+3UjAjzUX2a8Uv8Re23yj3A= X-Received: by 2002:a19:cc15:: with SMTP id c21mr3988984lfg.64.1567721810235; Thu, 05 Sep 2019 15:16:50 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id q13sm684203lfk.51.2019.09.05.15.16.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Sep 2019 15:16:49 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id x80so3344855lff.3 for ; Thu, 05 Sep 2019 15:16:49 -0700 (PDT) X-Received: by 2002:a19:f204:: with SMTP id q4mr3910741lfh.29.1567721338167; Thu, 05 Sep 2019 15:08:58 -0700 (PDT) MIME-Version: 1.0 References: <156763534546.18676.3530557439501101639.stgit@warthog.procyon.org.uk> <17703.1567702907@warthog.procyon.org.uk> <5396.1567719164@warthog.procyon.org.uk> In-Reply-To: <5396.1567719164@warthog.procyon.org.uk> From: Linus Torvalds Date: Thu, 5 Sep 2019 15:08:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Why add the general notification queue and its sources To: David Howells Cc: 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 5, 2019 at 2:32 PM David Howells wrote: > > (1) /dev/watch_queue just implements locked-in-memory buffers. It gets you > no events by simply opening it. Cool. In-memory buffers. 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. If you want to make a message protocol on top of it, it has cool atomicity guarantees for any message size less than PIPE_BUF, but to make things simple, maybe just say "fixed record sizes of 64 bytes" or something like that for events. Then you can use them from things like perl scripts, not just magical C programs. Why do we need a new kind of super-fancy high-speed thing for event reporting? If you have *so* many events that pipe handling is a performance issue, you have something seriously wrong going on. So no. I'm not interested in a magical memory-mapped pipe that is actually more limited than the real thing. Linus