Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4451689pxf; Tue, 23 Mar 2021 10:53:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySO2GJt0SHxddieOaDBUom3jVTZdt94DZp+ZGshAj73dV9CnEeR8souLA2MCbYBtpxpzJi X-Received: by 2002:a05:6402:42c9:: with SMTP id i9mr5809946edc.35.1616522029737; Tue, 23 Mar 2021 10:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616522029; cv=none; d=google.com; s=arc-20160816; b=rfNPsATmCwEJQ3NCsHqNDqMUocwr1CIT2o3Od1Y8DRz5ZQPtppNJB+lzk6hG8PTRCA kWsfb5cnWxZMH8caj+wfIulPKyI4E4MDEYfReGdnVOtksFpLdA2GEJLAkRVY8r9dJyKb tk0UQTPc1HLMooLf7Wau0KOWwn3MnLjMshux9Epm7Q8H7Sg1oHp/mke0Hd/yyDsXIaaW Mp3BBGRyzQlXKtKrP32hObxpxbvN6Ym4JP7nw2PkIfJmVMu7ZWN/ymvpjukVgVAobh4W 3ROj9ltX7i/rHd6h9dPvW6WQVB34MwRgm5aWtkjQFHx/xKJHdL91y7POKJnbPVXiPgn1 9LGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=LouRr+fCG0OmszLhP6L8WRvJgJF/XEnWkAzpMfXY6u4=; b=GLlcjJROnQm/7HyigRkgsG68+BkP4XjAwo5k3jqeFvEch4EUqGgtSn176T7Bje45cT dbPwIelFFM3yRfBHyrZB36caSuKRVXwQ7u8gZn8iigZhT2hbuYvfvFfC7SueHaujxn60 lVJtT3jh9lAXmgaAH9iEtnzmGcGXYRgehq9QU7iIVjEiZvYIZ0woVpRIYaxZrRXAKstn NrbXSImdAHGs5PqbX7B2mp9aLpVgGC9M4o6+kjSyU/bhjbRHYseID8AIy0sJqKhabzR4 QJbWsxVOMDAR21dajRTnDtyqY+NMT3u9gSpygh+wkmzXrO971zuSjV72BIa72JFR+CcR z9oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZeCFpsYM; 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 m19si14172983eds.451.2021.03.23.10.53.18; Tue, 23 Mar 2021 10:53:49 -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=ZeCFpsYM; 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 S230190AbhCWRvT (ORCPT + 99 others); Tue, 23 Mar 2021 13:51:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33511 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231233AbhCWRvB (ORCPT ); Tue, 23 Mar 2021 13:51:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616521860; 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=LouRr+fCG0OmszLhP6L8WRvJgJF/XEnWkAzpMfXY6u4=; b=ZeCFpsYMf6XdBAaQcxlV1Ayo1Hp9Mm7pu+DTPf6MgkIOqT6vWfGmv60Bv6soXRh76RYjZQ Mr1492+Cu/+iK58eKojgV20Djq5dcjUfSi4NeAP0VHDywkbvpTjWytajjJAUa1Bw/mgqNE OqII3EX3JUC0PHcl5uivUJlWKROmZnQ= 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-232-02Qt-z3bNpaoL_QStgOmuw-1; Tue, 23 Mar 2021 13:50:56 -0400 X-MC-Unique: 02Qt-z3bNpaoL_QStgOmuw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F5D387A83E; Tue, 23 Mar 2021 17:50:55 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-58.rdu2.redhat.com [10.10.112.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id C517C6E6FB; Tue, 23 Mar 2021 17:50:32 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20210320054104.1300774-1-willy@infradead.org> To: Johannes Weiner Cc: dhowells@redhat.com, "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org Subject: Re: [PATCH v5 00/27] Memory Folios MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2749828.1616521831.1@warthog.procyon.org.uk> Date: Tue, 23 Mar 2021 17:50:31 +0000 Message-ID: <2749829.1616521831@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes Weiner wrote: > So I fully agree with the motivation behind this patch. But I do > wonder why it's special-casing the commmon case instead of the rare > case. It comes at a huge cost. Short term, the churn of replacing > 'page' with 'folio' in pretty much all instances is enormous. > > And longer term, I'm not convinced folio is the abstraction we want > throughout the kernel. If nobody should be dealing with tail pages in > the first place, why are we making everybody think in 'folios'? Why > does a filesystem care that huge pages are composed of multiple base > pages internally? This feels like an implementation detail leaking out > of the MM code. The vast majority of places should be thinking 'page' > with a size of 'page_size()'. Including most parts of the MM itself. I like the idea of logically separating individual hardware pages from abstract bundles of pages by using a separate type for them - at least in filesystem code. I'm trying to abstract some of the handling out of the network filesystems and into a common library plus ITER_XARRAY to insulate those filesystems from the VM. David