From patchwork Thu Oct 10 13:40:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Hellstr=C3=B6m_=28Intel=29?= X-Patchwork-Id: 11183629 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBACA1709 for ; Thu, 10 Oct 2019 13:41:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AF12821D82 for ; Thu, 10 Oct 2019 13:41:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=shipmail.org header.i=@shipmail.org header.b="Rix0aEWR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF12821D82 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shipmail.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DEB996B0003; Thu, 10 Oct 2019 09:41:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D9BB56B0005; Thu, 10 Oct 2019 09:41:21 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CB2658E0003; Thu, 10 Oct 2019 09:41:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id AA6216B0003 for ; Thu, 10 Oct 2019 09:41:21 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 52098181AC9AE for ; Thu, 10 Oct 2019 13:41:21 +0000 (UTC) X-FDA: 76027986762.29.quill33_800d9eb2d6f40 X-Spam-Summary: 2,0,0,08de3a71e3dc4128,d41d8cd98f00b204,thomas_os@shipmail.org,:linux-kernel@vger.kernel.org::torvalds@linux-foundation.org:kirill@shutemov.name:thomas_os@shipmail.org,RULES_HIT:41:355:379:541:966:988:989:1260:1261:1311:1314:1345:1437:1515:1534:1540:1676:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2915:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3871:3872:3874:4385:4423:5007:6119:6120:6261:6653:7903:9707:10004:11026:11473:11658:11914:12048:12297:12438:12517:12519:12679:13069:13180:13229:13255:13311:13357:13894:14096:14384:14721:21080:21212:21433:21627:30054:30056:30070,0,RBL:213.80.101.71:@shipmail.org:.lbl8.mailshell.net-62.2.203.100 64.100.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: quill33_800d9eb2d6f40 X-Filterd-Recvd-Size: 3353 Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Oct 2019 13:41:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 741453F49B; Thu, 10 Oct 2019 15:41:18 +0200 (CEST) Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=Rix0aEWR; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cahSb6bMUdIh; Thu, 10 Oct 2019 15:41:17 +0200 (CEST) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 493113F218; Thu, 10 Oct 2019 15:41:17 +0200 (CEST) Received: from localhost.localdomain.localdomain (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 0DD4D36016C; Thu, 10 Oct 2019 15:41:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1570714877; bh=n0r0/gr5DGR8PKfDTpl5xOseUsgi8gjV64mOMzX31mg=; h=From:To:Cc:Subject:Date:From; b=Rix0aEWR6MmQ3IMpwzhAJ7nxL1ZmI7koM15not/pYLFsz5Q96lP3VpexvNYEOq43t IevhIYzceltokMIkYLDVJUA69uoPPp3B95Iuam64ihG5ZXnj5raBIayjng0fq1GQQr 3RibwTeSADJ13s7gNhiUWxjcFTy9i5HZh8EHcKEI= From: =?utf-8?q?Thomas_Hellstr=C3=B6m_=28VMware=29?= To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, torvalds@linux-foundation.org, kirill@shutemov.name Cc: =?utf-8?q?Thomas_Hellstr=C3=B6m?= Subject: [RFC PATCH 0/4] mm: pagewalk: Rework callback return values and optionally skip the pte level Date: Thu, 10 Oct 2019 15:40:54 +0200 Message-Id: <20191010134058.11949-1-thomas_os@shipmail.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.079143, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This series converts all users of pagewalk positive callback return values to use negative values instead, so that the positive values are free for pagewalk control. Then the return value PAGE_WALK_CONTINUE is introduced. That value is intended for callbacks to indicate that they've handled the entry and it's not necessary to split and go to a lower level. Initially this is implemented only for pmd_entry(), but could (should?) at some point be used also for pud_entry(). Finally the mapping_dirty_helpers pagewalk is modified to use the new value indicating that it has processed a read-only huge pmd entry and don't want it to be split and handled at the pte level. Note: This series still needs some significant testing and another re-audit to verify that there are no more pagewalk users relying on positive return values.