Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp369833pxa; Wed, 26 Aug 2020 12:55:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBs4l5mdp4MQyJDnED//orjk9cTYOLphkD4gH4rA0nbBT9n8fKCXy1UpSUAOTDW2zR9sBu X-Received: by 2002:a17:906:3e51:: with SMTP id t17mr7703008eji.486.1598471709528; Wed, 26 Aug 2020 12:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598471709; cv=none; d=google.com; s=arc-20160816; b=K1Tz8KFEztNQ6x6qulNq2ZeLauXY8hlqwSqnZWimGJ5Wc50DDLXsVMg8Op7v/l1NGD ARSDByOjEu62WYF+/ziXsNjHI0UvP+ayUv+jxTx5/OG0J0sEWjsCqEw9pSxyGJnCMCzG 7w6HQUC2HK4EIBIM99KgSf4iq/GQqfIa1P3QViyiRqurUfHQ9IY8I8Z5+ZmSj3IU1JF0 WdK+mwKfpZRhVxb4rd5bZ4106AkV5ig+aE2wiHOLs7/tPGWVgPxxGJsFmTqt+D5CTSCi 6bk8J5dNimodxR1G5HcCteBzJfgBmUGUXmRnsu1ypjQZI/9pMtcnEjU4xfBblIJXq8ZW ta1g== 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=GTZBfQJrZmGoOihET1Kwf2wGDuCL4pavAJzlhd2obj8=; b=rBVBJTjelsU3cV01YMBN/zVxcrbQg6OrD+Owbph3lxfzLho/wavxhsHomynszUl+/M ztE7z5WrYcIVjBOdCfUKX6j6PAiP23rgGR+7NSq/OWsX4Dc6f7l3hpK7fy+2AsWfbxsZ nfyn430kW/lyOCxZIserdsgyrILXonIP99Dp4PYYp9SgJ9NZ8/Ot8K1k0UWX6/8m+pc6 8RuyvjcP+T9Pr4ZeQ2MoHjeZ/SzYiO1SP/duu6nApMZV5pcR0kHdTsfB3hlfoKV9C/q9 BggJ2+WkfN0P1D52EbmnifXtfQMQNyFnPPIZ7Pm8fhtBTK4Op02kAGHwgD5sA4gfQH52 UYng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fd75T1FC; 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 p12si8295edi.348.2020.08.26.12.54.46; Wed, 26 Aug 2020 12:55:09 -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=Fd75T1FC; 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 S1726938AbgHZTxZ (ORCPT + 99 others); Wed, 26 Aug 2020 15:53:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47439 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726794AbgHZTxW (ORCPT ); Wed, 26 Aug 2020 15:53:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598471601; 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=Fd75T1FCRJYv7NasWwkOFUNhoXBot2Vfy0viot5CJZQbfLNWpiC17ydU1DtoMvjL8EWUZV 1IVtyCLCk0Glzj9Qur3bz4DFeA8sYz7TfCgm87kcOtDAAjfmBmX8chpHNvdy07vjFz1pwC bD6i2IblAx3oPE2vWE0Lqwgrj/VUiQM= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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