Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp968260pxb; Thu, 24 Mar 2022 10:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9rMw/Q3GJ3WK9cpIsgjDxmnndA8lk3kNwOl8suh/S5GncWvmbyvnOizir7HQCsI3UZcUe X-Received: by 2002:a17:902:ec8c:b0:154:7cee:774e with SMTP id x12-20020a170902ec8c00b001547cee774emr6899912plg.61.1648141760332; Thu, 24 Mar 2022 10:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648141760; cv=none; d=google.com; s=arc-20160816; b=PsizE+z+dW5BTS8Jv0UceR7VgDCrsjn/1N6S6E0Q6Sg4dPHnrDn0PUvh78ZFOc9WLq BtO4khGQI1H5fEvHBWwggPfmnHOWCobZQ6eWjCa87gCNu5qS9onTJ+e9LW/hA5QWNunO MaT38WNF5SKbebolNOnmkIewujfdtYjKj+NduOTJ0FEY4gl2SvyvP75o02A0WY5/v0lg DgOhQGSu2zC7JymCAYglY50YRyDbe1/yN7RRYzwBbhd6FX5kzLzwQhDKmy7A4Iqj1zmJ FXwI29VAwZZYNilEGn/wJFQUQauFellyNKFIR5MAi4AEsEMtpEF7bCYwnn9Sevrdz1E+ 7LLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t+LODRVTb2l5A+DlRsu9HomazfBssXHN27kKTnsGh7k=; b=OMZoQhyGk2749rUyoZI3DMPynUiSEPweVI51chsdBLiY4BPueG3c2CdnQO6EjBoOOH t6RySqsMNPYNuqzCBukXEM6MY0Nb+uI6rtNdirD3zZu/hMxs0IlAyBmgnq/pFwls2FzP /tIFn/mkb0oMF/bS7y0cSv+wjwKQz34oB2u1mQVfBDupvVf8j3fHMHsO8/4fmFfYbs8W uP7uDUuyx6LC6Yg46FG8cndgR+xQe7Boyk+9ual3V+vFFT2DAS0Z0iP6qCGQOopNY0Yu AO8NIrtqKT0YgRhBTSc+Evl1oi86db+yyZ/GoiwMheFh3l0gTajWMfaLb6IT4zzvu0Sb Euaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1B6Uyghh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a170902c1ca00b00153b2d16455si14378059plc.93.2022.03.24.10.08.53; Thu, 24 Mar 2022 10:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1B6Uyghh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234553AbiCWMPK (ORCPT + 99 others); Wed, 23 Mar 2022 08:15:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbiCWMPJ (ORCPT ); Wed, 23 Mar 2022 08:15:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E6A2B24D; Wed, 23 Mar 2022 05:13:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7B24261503; Wed, 23 Mar 2022 12:13:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C3ACC340E8; Wed, 23 Mar 2022 12:13:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648037618; bh=Pzh608QrQ7xU6mIbYsCn3URrjiRl8YnAA8J+KTcdshw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1B6Uyghh9z+w+NcWCNVYN763GZYDICUQ259jF9WZxQlY8db1lFM9zhH61eauh5Dv3 4Ad7pdb5XiSEo9hDg+n/WaMz9LSuPjaYI105eqd+P373l510RUj+YxiIANz0ZrHCnV 4qXSgtMLmBuLpY2nqneFP90nOhZj+Y73kY5Bbbq4= Date: Wed, 23 Mar 2022 13:13:36 +0100 From: Greg KH To: Bernd Schubert Cc: Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-man@vger.kernel.org, linux-security-module@vger.kernel.org, Karel Zak , Ian Kent , David Howells , Linus Torvalds , Al Viro , Christian Brauner , Amir Goldstein , James Bottomley , Dharmendra Singh Subject: Re: [RFC PATCH] getvalues(2) prototype Message-ID: References: <20220322192712.709170-1-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 23, 2022 at 01:06:33PM +0100, Bernd Schubert wrote: > > > On 3/23/22 12:42, Greg KH wrote: > > On Wed, Mar 23, 2022 at 11:26:11AM +0100, Bernd Schubert wrote: > > > On 3/23/22 08:16, Greg KH wrote: > > > > On Tue, Mar 22, 2022 at 08:27:12PM +0100, Miklos Szeredi wrote: > > > > > Add a new userspace API that allows getting multiple short values in a > > > > > single syscall. > > > > > > > > > > This would be useful for the following reasons: > > > > > > > > > > - Calling open/read/close for many small files is inefficient. E.g. on my > > > > > desktop invoking lsof(1) results in ~60k open + read + close calls under > > > > > /proc and 90% of those are 128 bytes or less. > > > > > > > > As I found out in testing readfile(): > > > > https://lore.kernel.org/r/20200704140250.423345-1-gregkh@linuxfoundation.org > > > > > > > > microbenchmarks do show a tiny improvement in doing something like this, > > > > but that's not a real-world application. > > > > > > > > Do you have anything real that can use this that shows a speedup? > > > > > > Add in network file systems. Demonstrating that this is useful locally and > > > with micro benchmarks - yeah, helps a bit to make it locally faster. But the > > > real case is when thousands of clients are handled by a few network servers. > > > Even reducing wire latency for a single client would make a difference here. > > > > I think I tried running readfile on NFS. Didn't see any improvements. > > But please, try it again. Also note that this proposal isn't for NFS, > > or any other "real" filesystem :) > > How did you run it on NFS? To get real benefit you would need to add a > READ_FILE rpc to the NFS protocol and code? Just having it locally won't > avoid the expensive wire calls? I did not touch anything related to NFS code, which is perhaps why I did not notice any difference :) thanks, greg k-h