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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 4CE84C433B4 for ; Fri, 9 Apr 2021 19:41:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C166C610FB for ; Fri, 9 Apr 2021 19:41:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C166C610FB 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 DCC276B006C; Fri, 9 Apr 2021 15:41:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D56A36B006E; Fri, 9 Apr 2021 15:41:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF4EE6B0070; Fri, 9 Apr 2021 15:41:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id A016A6B006C for ; Fri, 9 Apr 2021 15:41:25 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5154D5DED for ; Fri, 9 Apr 2021 19:41:25 +0000 (UTC) X-FDA: 78013847730.11.6650E60 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf22.hostedemail.com (Postfix) with ESMTP id 27EF2C0007CA for ; Fri, 9 Apr 2021 19:41:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=wO/sC5No3kUj5SjPijizwqvcx+tKlq7DkfM462oHc/U=; b=nRZ+I2nTvnQQqZVH6T9L2qGCpG EA5pqzswHMrFVnongAK29CFZIs22UpPUjkefiA7zhbk4mo4NPWOAe536HZ7b9LqjpygbF2hyKUog0 G02pT4AVPG/1Y8btkx32MFjcKQ0cy2JGTY/ukJ/XMyXXRk46wV1BPL+YqN6Q5dK+QWZerSHmMHSZ9 lp98q85Mk+H8mRC/4ALTZXqieWGEMcU6CztgxzYUg/i9sFZx2pUjfoB+r5094TKfvXSjXiBKt/hOi aOEjq4Mu2z591PVo3c8SspxXsl/5oRi5MEFeydBJZuF1wAI5dh+Z+e/TFHrN2wIuRidOfE5WekVzD /XizPSSw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lUwzz-000qar-Us; Fri, 09 Apr 2021 19:41:09 +0000 Date: Fri, 9 Apr 2021 20:40:59 +0100 From: Matthew Wilcox To: Claudio Imbrenda Cc: linux-mm@kvack.org, linux-s390@vger.kernel.org Subject: Inaccessible pages & folios Message-ID: <20210409194059.GW2531743@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: ifezsx49aczmzjm1zui1ukk51s6ayof4 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 27EF2C0007CA Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617997282-924157 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: Hi Claudio, I'm working on making the page cache manage memory in larger chunks than PAGE_SIZE [1] [2]. In doing so, I came across this call that you added: @@ -2807,6 +2807,13 @@ int __test_set_page_writeback(struct page *page, bool keep_write) inc_zone_page_state(page, NR_ZONE_WRITE_PENDING); } unlock_page_memcg(page); + access_ret = arch_make_page_accessible(page); I'm going to change __test_set_page_writeback() to take a folio [3] and now I'm wondering what interface you'd like to use. My preference would be to rename arch_make_page_accessible() to arch_make_folio_accessible() and pass a folio, at which time you would make the entire folio (however many pages might be in it) accessible. If you would rather, we can leave the interface as arch_make_page_accessible(), in which case we'll just call it N times in __test_set_page_writeback() (and I won't need to touch gup.c). Let me know what you want. [1] https://lwn.net/Articles/849538/ [2] https://lore.kernel.org/linux-mm/20210409185105.188284-1-willy@infradead.org/ [3] https://git.infradead.org/users/willy/pagecache.git/commitdiff/85297eb08f1b034b9652ea63dd053e3be4d7de7f PS: The prototype is in gfp.h. That's not really appropriate; gfp.h is about allocating memory, and this call really has nothing to do with memory allocation. I think mm.h is a better place for it, if you can't find a better header file than that.