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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 45F8EC2B9F4 for ; Mon, 28 Jun 2021 14:09:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EC88661C75 for ; Mon, 28 Jun 2021 14:09:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC88661C75 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0F6A08D0057; Mon, 28 Jun 2021 10:09:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CD1B8D0016; Mon, 28 Jun 2021 10:09:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EFDEC8D0057; Mon, 28 Jun 2021 10:09:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id BDBF78D0016 for ; Mon, 28 Jun 2021 10:09:31 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 93898127BD for ; Mon, 28 Jun 2021 14:09:31 +0000 (UTC) X-FDA: 78303315342.16.5EE5690 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 00DA05001709 for ; Mon, 28 Jun 2021 14:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qF4WpNkFtCRbCathzIpkiay56Nr1UozBxL+oLmBQsSA=; b=DGjhcOBHY9eRKSwrf2zrOTdeIN L8ySZ3asDUouy7r+aspOyt0v+QRJyksNE9MnmyTXJE9F9QoT18vGNORlInzkli+zn7Kwb6c8+JDxA uxGdTdBWSnelX6HWLkX0kYKFittJN8Dk9zK+S71kncg3ljarmiijpwi9H4+FhSGAjjKCNXLHOMEVc DLsGRRInGx8WjOSlELynIp9CHoz8XT2w72c8GigLjj/Go1jzgdZbOGTxjrsIQz6hXofBFQG1qhfK1 Zqotj+3vF+Un6Wmeqe1MPcXf1KAlaUDpts+5IcOMeVLvf3IcKRjJD08paw/x2W8ErnWz2zrsvjEXA jbEpZItg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxrvL-0032i4-6g; Mon, 28 Jun 2021 14:08:10 +0000 Date: Mon, 28 Jun 2021 15:07:43 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 05/46] mm: Add arch_make_folio_accessible() Message-ID: References: <20210622121551.3398730-1-willy@infradead.org> <20210622121551.3398730-6-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 00DA05001709 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=DGjhcOBH; spf=none (imf01.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: tgrzi4jprhsouxeus8yoqpd8k7be5o1a X-HE-Tag: 1624889370-522077 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 28, 2021 at 07:21:01AM +0100, Christoph Hellwig wrote: > On Thu, Jun 24, 2021 at 04:57:29PM +0100, Matthew Wilcox wrote: > > On Wed, Jun 23, 2021 at 10:00:37AM +0200, Christoph Hellwig wrote: > > > On Tue, Jun 22, 2021 at 01:15:10PM +0100, Matthew Wilcox (Oracle) wrote: > > > > As a default implementation, call arch_make_page_accessible n times. > > > > If an architecture can do better, it can override this. > > > > > > > > Also move the default implementation of arch_make_page_accessible() > > > > from gfp.h to mm.h. > > > > > > Can we wait with introducing arch hooks until we have an actual user > > > lined up? > > > > This one gets used in __folio_end_writeback() which is patch 24 in this > > series. > > With arch hook I mean the ifdef to allow the architeture to override > the folio function. Same for the previous patch, btw. Ah. Actually, I hope that all architectures override this. Ideally 'accessible' and 'dcache flush needed' would be per-folio flags, set only on the head page, but the different architectures are inconsistent about this. So I've gone with "safe and slow" for the default, and maybe when all architectures have decided that they'd rather be fast than safe, we can fix this up. As you know, I want to get rid of tail pages eventually, so I'm trying to enable other people to do parts of that work for me.