From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCB04C3F2CD for ; Tue, 3 Mar 2020 11:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A02F22083E for ; Tue, 3 Mar 2020 11:38:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LiahLl7C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbgCCLi1 (ORCPT ); Tue, 3 Mar 2020 06:38:27 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45328 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729018AbgCCLi0 (ORCPT ); Tue, 3 Mar 2020 06:38:26 -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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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