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=-5.8 required=3.0 tests=BAYES_00,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 5C57DC49EA3 for ; Mon, 28 Jun 2021 14:09:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40739619A3 for ; Mon, 28 Jun 2021 14:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232356AbhF1OLp (ORCPT ); Mon, 28 Jun 2021 10:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbhF1OLo (ORCPT ); Mon, 28 Jun 2021 10:11:44 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9034BC061574; Mon, 28 Jun 2021 07:09:18 -0700 (PDT) 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.