Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp580557ybg; Wed, 10 Jun 2020 08:18:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxRV8j9Xrn5y0tMYnZ+hDp/j2HLLEXVLNjqQpEB9UGa5RUoM904reG0jI/G9SVB7aOE3aB X-Received: by 2002:a05:6402:3044:: with SMTP id bu4mr2891201edb.69.1591802307725; Wed, 10 Jun 2020 08:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591802307; cv=none; d=google.com; s=arc-20160816; b=cs0k7wBMFXUP0iq6dw+SPk48S6YfTEp188NP/ZkCJ3dvIjGxymXXEy+F2WQX4QVi9K M25YYRFJ634T1b0gel7mlyaDOXlKyDwWyFeWZiQDYdKgQ1nkXucUcJvmHnugIytftgA8 MtiwFnX2eD76Rf10/ih84RFnvJMnJVTgGdTgNtKGdaqPH9KjjdAu7VAW+GTgj+N1gyH3 Bdar/3Yw/QfTGm8vdFNcld2e9cODEi91ZUUbnQF/v+N7KuMSt//YcGIIJVdagnA6Hnkb O/R5xOanrKblhtyuolvScu6Ugn7uyRA+zq1ghWevlizWDuN69wmkXvdooSECDr+xmggQ frkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=c1vvhL5/pBKghY8N9JMTo024Z+Z84+uHOU1WR4qioPc=; b=MooGU2/sHq4f8ylXM18c7468H/cASmO2BFgcJBOs6l3ZPVlyXsmLQuoUC/E38tRpRE bScm4horGm44P0/NhQuUTF6402GB37tY2VbcUirGnb3ukVDQy7K2H++V8JMWQfbpZM3X x1w6HchbVcdJ6Lzd2A0h1VnGklzuUavDQcFiEtsDZ1c2mWpJu5Kg5n8qqFopyHOIJ3p/ ZANhuQbaFfHj4kCHLXeTBopiX3XfmlNosV/k1wBK+Anw2iUR+XMDR63Zu19ED6019cr4 RZUKH8HA1tGMTtXFGmeqhbDEgnRrxTbpIcPowwFEuhEb9GzBXKRBqbqR1gw+m9l4shvu 8GDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="WEVh9/Yg"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si164757ejs.458.2020.06.10.08.18.04; Wed, 10 Jun 2020 08:18:27 -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=@redhat.com header.s=mimecast20190719 header.b="WEVh9/Yg"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728424AbgFJLNJ (ORCPT + 99 others); Wed, 10 Jun 2020 07:13:09 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:60440 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728392AbgFJLNJ (ORCPT ); Wed, 10 Jun 2020 07:13:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591787588; 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=c1vvhL5/pBKghY8N9JMTo024Z+Z84+uHOU1WR4qioPc=; b=WEVh9/YgGk8Xj6vdThGqkAAlZyrjmnwRuG64XtFtBtOLypibKXBZbdpjq0M2rfVUTxMce8 OcaNAb8nDJJdGszri4zKafyyeoTmY14mBj9BNWM33GH8TShOoSchqSjSl5K9Q7rN0gd1e2 52emB81iihMQkSl2OQiLlUXhgdErUcU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-414-cphq5XgkPyqtK4p8qDCL6g-1; Wed, 10 Jun 2020 07:13:04 -0400 X-MC-Unique: cphq5XgkPyqtK4p8qDCL6g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B479318A8234; Wed, 10 Jun 2020 11:13:02 +0000 (UTC) Received: from ws.net.home (unknown [10.40.194.133]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77933600F7; Wed, 10 Jun 2020 11:12:59 +0000 (UTC) Date: Wed, 10 Jun 2020 13:12:56 +0200 From: Karel Zak To: torvalds@linux-foundation.org Cc: David Howells , viro@zeniv.linux.org.uk, dray@redhat.com, mszeredi@redhat.com, swhiteho@redhat.com, jlayton@redhat.com, raven@themaw.net, andres@anarazel.de, christian.brauner@ubuntu.com, jarkko.sakkinen@linux.intel.com, keyrings@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] General notification queue and key notifications Message-ID: <20200610111256.s47agmgy5gvj3zwz@ws.net.home> References: <1503686.1591113304@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1503686.1591113304@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Tue, Jun 02, 2020 at 04:55:04PM +0100, David Howells wrote: > Can you pull this, please? It adds a general notification queue concept I'm trying to use David's notification stuff in userspace, and I guess feedback is welcome :-) The notification stuff looks pretty promising, but I do not understand why we need to use pipe for this purpose, see typical userspace use-case: int pipefd[2], fd; if (pipe2(pipefd, O_NOTIFICATION_PIPE) == -1) err(EXIT_FAILURE, "pipe2 failed"); fd = pipefd[0]; All the next operations are done with "fd". It's nowhere used as a pipe, and nothing uses pipefd[1]. The first impression from this code is "oh, this is strange; why?". 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 have signalfd(), no O_SIGNAL_PIPE, etc.) Karel -- Karel Zak http://karelzak.blogspot.com