Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp779443ybg; Fri, 12 Jun 2020 14:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsfcZ3qolHF8h+l103Z8Q7/FVOEZosuCOGUnreKRgrQhXCaLtIPss8GAQ5nsSGcjrqF0zQ X-Received: by 2002:a05:6402:1812:: with SMTP id g18mr13431397edy.96.1591997844965; Fri, 12 Jun 2020 14:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591997844; cv=none; d=google.com; s=arc-20160816; b=i3lcNLrCgGt5K5PV+llfy32e39nfSy/qSt/3XWc2k6/Q5Of3yW3d76QFX9gOqjGxbO 0JGKOwfzXgOQtlfgpVe1BGjBWvJB+tZ3Oi2boclK3gh/9ytCvaHSpfkbf4NLxU1fg6TY DFOJsC29Azm7o6MVV6tl2WIHl/70iVwJO6idRclLAed7AZRulwvYXlsxnkkKnLhsirm6 YB0mBHew7vRrg68VwGYbx8gYnko+MBQEDj6KBJuBX+KasRtEM0opceQBjniUmWpr8kC2 J8rRZDGr29E+5/LTfV7xFxrO4UZ8RUK2g7U7np/YfSW8NdKzf0LBWbO2+m+dt5Kx3ufD CLvQ== 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=pL7avKA2KDNOM9X/kgFl9MqbEPb7aiLKYA3rHavzFAQ=; b=xPwQIrwgnaAbqa4z7sZbaGd7mMAjQh8yKEdtEffcyQqNWAeJzjn/AdM7uOjeRwXYkN RfHfv3vNBJHoUywNxBDJH4sr9Qf9ZV3njha4UDPozJfBKyX9/6BSAKjDrkOwDqrLu/Ue 0Ga7H1njSeutQf1JlHZZ7XbT2C3ZDIit4W95NdiynNjFVFUGKgIOQngbp6sIrwThae6j 3CwwTqXvl5u5LkMiBpCDpGnrZkIv+O0dLH8DS/iUhPJYJphA6LHujvPGI95yb+DhXxDH qa8K8/jV1eEgnv2WPRiXmBkTOgyAS0vu60dXY83w3DxORzzTMbLRy+hIaoEeMG334mUj LR1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DUXfZ05d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ha25si4724787ejb.180.2020.06.12.14.37.02; Fri, 12 Jun 2020 14:37:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DUXfZ05d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726377AbgFLVdC (ORCPT + 99 others); Fri, 12 Jun 2020 17:33:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgFLVdB (ORCPT ); Fri, 12 Jun 2020 17:33:01 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3846AC03E96F for ; Fri, 12 Jun 2020 14:33:01 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id x18so12675090lji.1 for ; Fri, 12 Jun 2020 14:33:01 -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=pL7avKA2KDNOM9X/kgFl9MqbEPb7aiLKYA3rHavzFAQ=; b=DUXfZ05dc4FLn033pP/DvBQEoDqo9l9I/qr+GeWTXdccy9NPuiJFBm8tJ6Ag/uVtPs HfhkXSv/7Jz63j3e9CKigwf5GeXP332/vjJYhT7vhVEnuBNN/DA1L+yF7svDbU0axGyW OJ7DBcOv91xpWm6tDakYfFrQRMOPXMXKekM4g= 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=pL7avKA2KDNOM9X/kgFl9MqbEPb7aiLKYA3rHavzFAQ=; b=MCmhtCGMPRCCzyBbNk75jyeRjgQnXBt5ww/DmoMLd4ZXjCC44xwwHQ1N6Ma+u2XCJz mD8w9AKAB+yFX0qzsRj11SkBIoyNf8BXv3Xr4xn6dqbCAVUGFN5H7oAXijzk8aOy0VGt 163Lbskvk671DNW6kRR1DlD+WA9QRm6B75woevf9YDgjN7orqnZwS4HenBtVXlnVHkb0 CPWcEPMq05Y3NR1gjAy56nPHhgY80BgSn7x6OgCFOq++LuI1IsxWEw53Je8i44fonDVi uyZsuzsPFIyVKAOjYhCd3xKkCrMDu82PCDG0BkTg41PfNwaPwWoCTFUOkjYaO0Y0w2R2 goIg== X-Gm-Message-State: AOAM531ZD4qcjgbQwBWq8Sxy8ScBI2xOl42CZLfAkI5Ou4SAcgzf9aCc 5W83lNd90/nVeD4EQjEI8KvfSjA5onc= X-Received: by 2002:a2e:9a09:: with SMTP id o9mr7558908lji.323.1591997579735; Fri, 12 Jun 2020 14:32:59 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id o16sm2495412ljg.90.2020.06.12.14.32.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jun 2020 14:32:59 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id e4so12723175ljn.4 for ; Fri, 12 Jun 2020 14:32:59 -0700 (PDT) X-Received: by 2002:a2e:974e:: with SMTP id f14mr7467995ljj.102.1591997578744; Fri, 12 Jun 2020 14:32:58 -0700 (PDT) MIME-Version: 1.0 References: <1503686.1591113304@warthog.procyon.org.uk> <20200610111256.s47agmgy5gvj3zwz@ws.net.home> In-Reply-To: <20200610111256.s47agmgy5gvj3zwz@ws.net.home> From: Linus Torvalds Date: Fri, 12 Jun 2020 14:32:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] General notification queue and key notifications To: Karel Zak Cc: David Howells , Al Viro , dray@redhat.com, Miklos Szeredi , Steven Whitehouse , Jeff Layton , Ian Kent , andres@anarazel.de, Christian Brauner , Jarkko Sakkinen , keyrings@vger.kernel.org, linux-fsdevel , Linux Kernel Mailing List 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 [ Finally getting around to this since my normal pull queue is now empty ] On Wed, Jun 10, 2020 at 4:13 AM Karel Zak wrote: > > The notification stuff looks pretty promising, but I do not understand > why we need to use pipe for this purpose The original intent was never to use the "pipe()" system call itself, only use pipes as the actual transport mechanism (because I do not for a second believe in the crazy "use sockets" model that a lot of other people seem to blindly believe in). But using "pipe()" also allows for non-kernel notification queues (ie where the events come from a user space process). Then you'd not use O_NOTIFICATION_PIPE, but O_DIRECT (for a packetized pipe). > Is it because we need to create a new file descriptor from nothing? > Why O_NOTIFICATION_PIPE is better than introduce a new syscall > notifyfd()? We could eventually introduce a new system call. But I most definitely did *NOT* want to see anything like that for any first gen stuff. Especially since it wasn't clear who was going to use it, and whether early trials would literally be done with that user-space emulation model of using a perfectly regular pipe (just with packetization). I'm not even convinced O_NOTIFICATION_PIPE is necessary, but at worst it will be a useful marker. I think the only real reason for it was to avoid any clashes with splice(), which has more complex use of the pipe buffers. I'm so far just reading this thread and the arguments for users, and I haven't yet looked at all the actual details in the pull request - but last time I had objections to things it wasn't the code, it was the lack of any use. Linus