Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3314444ybf; Tue, 3 Mar 2020 03:47:22 -0800 (PST) X-Google-Smtp-Source: ADFU+vtp9aczemkfMxX8KIFrmIrOTjwtRltbULVGz/qRRhcp4TBX9MaDiX2rIKH9xVWfFcQVwnya X-Received: by 2002:aca:1a17:: with SMTP id a23mr2062402oia.84.1583236042488; Tue, 03 Mar 2020 03:47:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583236042; cv=none; d=google.com; s=arc-20160816; b=0vc4uThS3nLHy9+BrN7XAmvP5OXv8hADJQkIq4MK7pIxMysnqLnN5D0V+VkJwA4nsj dwMRLtTgU6L6ByrBHJiRRGFzsHkna2/ZH8/fW5G3wQZuN0H9u3/cGimvs5GU2IFKcTym AEXVNHPAUySbfnHLRw2CZU6un+ODys6IVk4qQynwI6UpSDh64vp2yO7Hq4AAtnUE9MH6 oMKmjl79XhkZUwEjlH38qukbh92AOeSEyzLNB69OTVnAp7CWTej4CnFWqY2YEP/3I3sa svgsyhPqzq9BoIsOXFRm3ZzShAOlwP4q812K2ZRkO7Mj4iEySFK46Na4pqPr2GVfKdai aDqQ== 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=fIZBQcraJWIdCfUdrH86BxQG+Yi3qUfO5GviBKtOEc4=; b=MOplAnTgtJO9sy+64S2a1VzQmbV0kcaKze7IXwTWldBrq3CXlLXXAs/82hBZ92cZh6 L8AmOUtFdwEX8ygzBYkCWUlvRQkvTu1R1oXh+0LSm+K4aEpBOAuUmyJBFSKq5dhCnb58 JZ+xPiCYrTrOwgKmAsbhoABCc8YAbK7cEgOZYOrnYwW9sCjRxC0P0FJZRjgXGu1rwKvj 84OKnKWD6g5aoGyfmbRlBhwscRv/X7r4OxGqM1fIcWdwUOBkGcYYmFc/R+8NJuRKC5u9 c6mNFej7G9KFnGW5PboTWdRC8FmHWdcekfMFjAd19aP7cPCVRHF/psQZ1VFMnA5lE39p m7sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LiahLl7C; 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=pass (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 t10si8413669otp.310.2020.03.03.03.47.10; Tue, 03 Mar 2020 03:47:22 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=LiahLl7C; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729026AbgCCLi1 (ORCPT + 99 others); Tue, 3 Mar 2020 06:38:27 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:24429 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729020AbgCCLi1 (ORCPT ); Tue, 3 Mar 2020 06:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583235506; 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=fIZBQcraJWIdCfUdrH86BxQG+Yi3qUfO5GviBKtOEc4=; b=LiahLl7ChBdvQHkYZ1V4qDhS/g7X7CVrlEfy3BAUB37a/A8+zc7G9alzGVntA0BlMjcqv8 HyHDwRcL2lCyUhUrVpkF6QP1AE+tMpdBsrZDrh4F0mu+w36Kx4BoEc+eBs6QLdfIVy9h7l k0jmiEdEhKWDGh0Ksoe60ADYuyypm0Y= 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-266-zBLiqMUOMa2KdYWw5C1e-g-1; Tue, 03 Mar 2020 06:38:23 -0500 X-MC-Unique: zBLiqMUOMa2KdYWw5C1e-g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 733AF100550E; Tue, 3 Mar 2020 11:38:20 +0000 (UTC) Received: from ws.net.home (ovpn-204-202.brq.redhat.com [10.40.204.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED87C73861; Tue, 3 Mar 2020 11:38:16 +0000 (UTC) Date: Tue, 3 Mar 2020 12:38:14 +0100 From: Karel Zak To: Miklos Szeredi Cc: David Howells , Ian Kent , Christian Brauner , James Bottomley , Steven Whitehouse , Miklos Szeredi , viro , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml , Greg Kroah-Hartman Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] Message-ID: <20200303113814.rsqhljkch6tgorpu@ws.net.home> References: <1582644535.3361.8.camel@HansenPartnership.com> <20200228155244.k4h4hz3dqhl7q7ks@wittgenstein> <107666.1582907766@warthog.procyon.org.uk> <0403cda7345e34c800eec8e2870a1917a8c07e5c.camel@themaw.net> <1509948.1583226773@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 03, 2020 at 10:26:21AM +0100, Miklos Szeredi wrote: > No, I don't think this is going to be a performance issue at all, but > if anything we could introduce a syscall > > ssize_t readfile(int dfd, const char *path, char *buf, size_t > bufsize, int flags); off-topic, but I'll buy you many many beers if you implement it ;-), because open + read + close is pretty common for /sys and /proc in many userspace tools; for example ps, top, lsblk, lsmem, lsns, udevd etc. is all about it. Karel -- Karel Zak http://karelzak.blogspot.com