From patchwork Wed Dec 1 14:30:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 12650037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11BCAC433F5 for ; Wed, 1 Dec 2021 14:38:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE8206B008A; Wed, 1 Dec 2021 09:31:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BA52E6B008C; Wed, 1 Dec 2021 09:31:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C30A6B0092; Wed, 1 Dec 2021 09:31:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id 8C6BB6B008A for ; Wed, 1 Dec 2021 09:31:08 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 52EBF89D4D for ; Wed, 1 Dec 2021 14:30:58 +0000 (UTC) X-FDA: 78869462196.10.E5D5CA4 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf22.hostedemail.com (Postfix) with ESMTP id CCFB519A1 for ; Wed, 1 Dec 2021 14:30:57 +0000 (UTC) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B1EKL1j012056; Wed, 1 Dec 2021 14:30:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=EsJfyzPo9tWJqTPZ1s6+81dW8LZmPTH+qE5l1a5c/r0=; b=o8bPiLjg0RM0SDuOwE9xk37lWnq7k7atCq1C0t2yOG9u1l71tvYfN2y4ZuDPg0HYEouq 4dSW/eQ+/iyBUCsPX04YPYsIvACDGKez+UvdjuPpriNdVBOeCWRZLbbL0TLBD3oV9J9b rsCJcvv99f5aGYu5/Fdo3dEca6BCTngjNX5e3BhBdO0FZSZM1KeDGKdyM78J+fzP58mw dPJmMEmI/h00/3fyZvp1Yw+hMyMxt6+Z4fQBIEAdVxGO1r9biG2bYVxRAVdEYA+mUyrY 1KrQ2wt1Jb0HvG+aLJ4xjMwuzuYcYD2x2Ybncl24c2e0RzN7uxGnehZ52uhneFsNTSHE /Q== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3cp7t1h0x9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Dec 2021 14:30:46 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1B1EBov4037539; Wed, 1 Dec 2021 14:30:44 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by userp3030.oracle.com with ESMTP id 3ck9t1v6xx-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Dec 2021 14:30:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kMXF10hmRfAm/2iX4u7GlhvgVHVGSnW7sxh6MA6EknDJVdZI8MdGraZfxt4vPK1ipYJHIa1YRnlACtr9HF992gw/M80/ev/bsQyLe48DttlZ/g6dapaBaqLfY93CibBYYeSxHXD5XMFQII0mHxZl7wtXOsO7vMrXy4fjxJf3jHcakXynm/VN28m2QIoiNPFbu87c0mwudC5+63KPKrGB1GX8EOROwRoZPSyVnP51KzpbSTB2P+vr59pUpQuF2fbzH7Gh4Q8A4V1tnzkm0sVUyfU9X3JuL6j0vSYJBXoE/NyRkibeykb3jutGbRe2vDgHRYf2JI+Eq6muM9/Ybz3AEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EsJfyzPo9tWJqTPZ1s6+81dW8LZmPTH+qE5l1a5c/r0=; b=dsaQA0ap1S6PoKpy5bLMcFj8ZFe+6MGHE2Aw5XNxjdA8WHGGjz2o1VcXLvP02yiOfVupwwXQ3ldSMU2ZW/mo0mQ8Bf8G2hbZ6G4f6Z47lIZWRvpfZjNImuR85DBhddHtuAzCriD772Q9z0yr3oA0oB4l+k1/8wMJZEDxyIDdq9NTWhYTEHnFtifdJ3Y0csICVkYf8cLJw0LwuQSr0ux2HEm7E0PZnDnq8uhZ96ckzs4Tmxg8NjANdt1AzFabw3CUaWXc5JmEOF8986QgoW4mZ4+Cbd6Vs5UzLDnMhSIPnisFf60WXM4VGnne8VW9EayhCQkqwFz6gCOrv0syUroB5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EsJfyzPo9tWJqTPZ1s6+81dW8LZmPTH+qE5l1a5c/r0=; b=OE5QwHPCxaXKqC2k1t1n7XzzQMW8VDWAKV3jyDH05dCNN9yFDp65mEIzidE2DS4O1wsQrhMUNVraLOrS8DN1d5x668wn23w4zc20htjM0uhq5p/jvq+t87Ziz9rKwNpWsd2XAek1KC3B4mZT7vnfz+SNwQTHQfzHD4GnrgR5Kfo= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by SN6PR10MB3021.namprd10.prod.outlook.com (2603:10b6:805:cc::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11; Wed, 1 Dec 2021 14:30:40 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::c4d0:8291:84d:ac66]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::c4d0:8291:84d:ac66%7]) with mapi id 15.20.4734.027; Wed, 1 Dec 2021 14:30:40 +0000 From: Liam Howlett To: "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton CC: Song Liu , Davidlohr Bueso , "Paul E . McKenney" , Matthew Wilcox , Laurent Dufour , David Rientjes , Axel Rasmussen , Suren Baghdasaryan , Vlastimil Babka , Rik van Riel , Peter Zijlstra , Michel Lespinasse , Jerome Glisse , Minchan Kim , Joel Fernandes , Rom Lemarchand , Liam Howlett Subject: [PATCH v4 54/66] mm/memcontrol: Stop using mm->highest_vm_end Thread-Topic: [PATCH v4 54/66] mm/memcontrol: Stop using mm->highest_vm_end Thread-Index: AQHX5r/0O9Cuh4hAxUG/bXy3RaGp8A== Date: Wed, 1 Dec 2021 14:30:14 +0000 Message-ID: <20211201142918.921493-55-Liam.Howlett@oracle.com> References: <20211201142918.921493-1-Liam.Howlett@oracle.com> In-Reply-To: <20211201142918.921493-1-Liam.Howlett@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.30.2 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 622bb822-964e-49bc-9892-08d9b4d7269f x-ms-traffictypediagnostic: SN6PR10MB3021: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3383; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2wCS0LwQzRD23bhNaqGtVkigbU89f9W0wx+II51VaJzkMlYrGf7jtB9gj2x5G/2XZFdXxeQ6HOOcOhmOfKYDVR5NdR5i6JY1jJw1HvAwe/Nfy58NGtq1Yb+sewy5EL7ZUIuynApURCI/YAv+b6hqmSK0ruTpKT2SLtMP/4q36rbZNDSZaLBXGXB+r1Np4d3qF1Kt1M6fqni8sV9rWaOjETD2UBYRyMkMONUUnEdbRTWeBLN28bNF/+CxyJGlCcrsI2ulAPXxU/8yrErHoxE4/5KHdTAv8EG2UrBd4k/ZZM0GyGF6XtX2LxGiFVKyf7OkuX5xSEGiCHVz764yCOY/7zbskzjcu08MdYdSSr+0GrBfqA/7jeZeWYByj4uo8BbTQ22MMcy/2hCydiXBfJoor3as9L2J1SEibhrUGPsFe7tWCbfFeqY7/VyU0UcarmUbhvoqKE7TyfZ02ajrUp3vIiWFKBMH2N+b5gVbQrIDwj0WNUNIzpkx5zNnG8t3bxNqNN7UYuK7/KLNzwp4U6gsOdPyxFBo0RKKQClJ2JUeRPfH65HNK/3gqp6n0E/f1ae59jZrg2vRPGKqYq9ep2tXZ44ewBWb4z8lfuLEG1vIuRzI7KBz0PKrsLhkpqrLKl35XhkbReMbNR/Yl9YhIJsmnCHHoe9ylRZXWXgD/lvOxpCgzVm0bMeXbt7suXxEjAOY99QNNiiLI0tE/ezfbKCyOw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(66556008)(7416002)(38100700002)(107886003)(38070700005)(316002)(66446008)(76116006)(64756008)(66476007)(2616005)(122000001)(83380400001)(2906002)(6512007)(91956017)(508600001)(66946007)(71200400001)(8936002)(54906003)(186003)(86362001)(44832011)(4326008)(6486002)(6506007)(5660300002)(6666004)(36756003)(8676002)(110136005)(4744005)(26005)(1076003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?wgBugT7gOreNEuZRK7kEyfF?= =?iso-8859-1?q?grKW5TaYdC6rT+DK+R2eHl9Q2BZv38L6vpnQumTg57NU02+G8IlfC5z1qJFC?= =?iso-8859-1?q?0PEJEYxbgrdywjuxl1+X+RoUUUgB/+PjuG00H2SRcR6vXJc6nDW4uagoJyMJ?= =?iso-8859-1?q?XhjNIJXXHMGmDlpnRJbjnijqRlMswC/KUwNwZaLfxUyi/8bURUM8/T7299nY?= =?iso-8859-1?q?+Cew9kXjRwJ2IU4wxNxVg6a67fNSjmEDA0hF7IapgNDI2d9l2DAbaqSHPBxt?= =?iso-8859-1?q?JKLMjF8kUqVsqPEeEDnjLdL5Br1v1nYXYmWRdQTOO6xrPgOfEU0tRdIaYuA7?= =?iso-8859-1?q?SWEXHas/KyojJ7AtFa+kjozqd2R+sDzvHCkRTsUtxNGg1I70jxsTzhFQGUW7?= =?iso-8859-1?q?vM0cpmp7MGbVE2ZdkJs5IRB6qVe9jEBxTJROXWKSpQUbIGQtQee1gL1tUcqq?= =?iso-8859-1?q?1tHFytimVgt5nki5ZNc/A8ArQPBGfmNcZCjf8JRiS4ODFAd7FWIEFHpR3tU2?= =?iso-8859-1?q?8BKG1TgCAmfhic3AuczEl6UlsgV9Kb1BK+7aXJ2xKioTKNC5NA5m4DHE8FYf?= =?iso-8859-1?q?+W7RiKSGwcvyGcJgOPLq0ebE36GnKImrV0JMxaYgk5uG3eaVOfNI0TZpYQe/?= =?iso-8859-1?q?3rydhP8sME1tWt4eyX+Q2e/aBcB9ukZJxvoUx/WS+T20OaUC1yp6w/FONXjT?= =?iso-8859-1?q?JGi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5+1qRarkIlbJVvTNBuKez8uO4V0n?= =?iso-8859-1?q?wMycW+2I1giLidsT2V7ffiye+hHdTSYrsSYUlhh49ni3sfGlw0MpJfTQ56VY?= =?iso-8859-1?q?=3D?= MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 622bb822-964e-49bc-9892-08d9b4d7269f X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Dec 2021 14:30:14.5517 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rxDV1sUt/g8MHh5GG5mLe3dLH6MewPsgROijm5X0cudnSiHlKUBIzB4HikUtZ20w6WEktXjEcQ2XE9bO3khAoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB3021 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10184 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 malwarescore=0 spamscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112010081 X-Proofpoint-ORIG-GUID: NNno2eRTlWa5-GpFNhD34Cyt2A9iJ0VD X-Proofpoint-GUID: NNno2eRTlWa5-GpFNhD34Cyt2A9iJ0VD X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CCFB519A1 X-Stat-Signature: usuwdoebi1kjd4hysofe3cbusxfg18jp Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2021-07-09 header.b=o8bPiLjg; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=OE5QwHPC; spf=none (imf22.hostedemail.com: domain of liam.howlett@oracle.com has no SPF policy when checking 205.220.177.32) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com X-HE-Tag: 1638369057-878955 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: From: "Liam R. Howlett" Signed-off-by: Liam R. Howlett --- mm/memcontrol.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 781605e92015..ac95b3eca557 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5808,7 +5808,7 @@ static unsigned long mem_cgroup_count_precharge(struct mm_struct *mm) unsigned long precharge; mmap_read_lock(mm); - walk_page_range(mm, 0, mm->highest_vm_end, &precharge_walk_ops, NULL); + walk_page_range(mm, 0, -1, &precharge_walk_ops, NULL); mmap_read_unlock(mm); precharge = mc.precharge; @@ -6106,9 +6106,7 @@ static void mem_cgroup_move_charge(void) * When we have consumed all precharges and failed in doing * additional charge, the page walk just aborts. */ - walk_page_range(mc.mm, 0, mc.mm->highest_vm_end, &charge_walk_ops, - NULL); - + walk_page_range(mc.mm, 0, -1, &charge_walk_ops, NULL); mmap_read_unlock(mc.mm); atomic_dec(&mc.from->moving_account); }