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=-4.8 required=3.0 tests=BAYES_00,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 AD2ABC433DF for ; Wed, 26 Aug 2020 19:53:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 810F4207BC for ; Wed, 26 Aug 2020 19:53:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="K415wm9y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727104AbgHZTx1 (ORCPT ); Wed, 26 Aug 2020 15:53:27 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:22179 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726798AbgHZTxZ (ORCPT ); Wed, 26 Aug 2020 15:53:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598471603; 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=GTZBfQJrZmGoOihET1Kwf2wGDuCL4pavAJzlhd2obj8=; b=K415wm9yuEeDF/wWaixP7b00KfzBhhaPSJr0Jj2iVtFcgn+1dfTbSyg8l9n4+jfJTnDpEu lMR0qqdB9LVfPpm99OKzmWcfBYb2Lg3g+CzxIkZUt4VKmSj5VQwCtPcy9tY6PzRQUHCqxA RKmk8WZ5FHxX66A+GApELlVV0RrplfE= 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-577-F0p-GF9QNC20GO3wYDSSDA-1; Wed, 26 Aug 2020 15:53:19 -0400 X-MC-Unique: F0p-GF9QNC20GO3wYDSSDA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2139E1074646; Wed, 26 Aug 2020 19:53:18 +0000 (UTC) Received: from horse.redhat.com (ovpn-115-36.rdu2.redhat.com [10.10.115.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53B8719C58; Wed, 26 Aug 2020 19:53:12 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id A14A6223C69; Wed, 26 Aug 2020 15:53:11 -0400 (EDT) Date: Wed, 26 Aug 2020 15:53:11 -0400 From: Vivek Goyal To: Miklos Szeredi Cc: "Dr. David Alan Gilbert" , Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm , virtio-fs-list , Dan Williams Subject: Re: [PATCH v3 11/18] fuse: implement FUSE_INIT map_alignment field Message-ID: <20200826195311.GB1043442@redhat.com> References: <20200819221956.845195-1-vgoyal@redhat.com> <20200819221956.845195-12-vgoyal@redhat.com> <20200826155142.GA1043442@redhat.com> <20200826173408.GA11480@stefanha-x1.localdomain> <20200826191711.GF3932@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Aug 26, 2020 at 09:26:29PM +0200, Miklos Szeredi wrote: > On Wed, Aug 26, 2020 at 9:17 PM Dr. David Alan Gilbert > wrote: > > > Agreed, because there's not much that the server can do about it if the > > client would like a smaller granularity - the servers granularity might > > be dictated by it's mmap/pagesize/filesystem. If the client wants a > > larger granularity that's it's choice when it sends the setupmapping > > calls. > > What bothers me is that the server now comes with the built in 2MiB > granularity (obviously much larger than actually needed). > > What if at some point we'd want to reduce that somewhat in the client? > Yeah, we can't. Maybe this is not a kernel problem after all, the > proper thing would be to fix the server to actually send something > meaningful. Hi Miklos, Current implementation of virtiofsd reports this map alignment as PAGE_SIZE. /* This constraint comes from mmap(2) and munmap(2) */ outarg.map_alignment = ffsl(sysconf(_SC_PAGE_SIZE)) - 1; Which should be 4K on x86. And that means if client wants it can drop to dax mapping size as small as 4K and still meeting alignment constratints. Just that by default we have chosen 2MB as of now fearing there might be too many small mmap() calls on host and we will hit various limits. Thanks Vivek