Message ID | 20221222041905.2431096-9-yuzhao@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 C0978C46467 for <linux-mm@archiver.kernel.org>; Thu, 22 Dec 2022 04:19:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4AE6C94000E; Wed, 21 Dec 2022 23:19:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 437D6940007; Wed, 21 Dec 2022 23:19:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23E6E94000E; Wed, 21 Dec 2022 23:19:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 12CD8940007 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 23:19:55 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D0B5780DE2 for <linux-mm@kvack.org>; Thu, 22 Dec 2022 04:19:54 +0000 (UTC) X-FDA: 80268639108.09.D5CA72E Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf06.hostedemail.com (Postfix) with ESMTP id 4789A180002 for <linux-mm@kvack.org>; Thu, 22 Dec 2022 04:19:53 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=FaAk0+Io; spf=pass (imf06.hostedemail.com: domain of 36NqjYwYKCFEHDI0t7z77z4x.v75416DG-553Etv3.7Az@flex--yuzhao.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=36NqjYwYKCFEHDI0t7z77z4x.v75416DG-553Etv3.7Az@flex--yuzhao.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671682793; a=rsa-sha256; cv=none; b=TAWOK1omFjxUbdViX1oBZV30dNibmxxfeUdg2m++lKwdBAFR2PTnUze1252g/XMQUiVjBY Qpir9JVpFmKAfFiJLItFjoYnCLKVZWcT0o1IPk3XRhH6JwedSFsxCCeYgi7wXbGL3Zm/Va gUMF3Hd3d7XvRX1dsW4lBOhe+7hPbkQ= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=FaAk0+Io; spf=pass (imf06.hostedemail.com: domain of 36NqjYwYKCFEHDI0t7z77z4x.v75416DG-553Etv3.7Az@flex--yuzhao.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=36NqjYwYKCFEHDI0t7z77z4x.v75416DG-553Etv3.7Az@flex--yuzhao.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671682793; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=wqbMgd0zowymzGskr7701SDcBxSEYhpmKyp2L4CmwQc=; b=j3IMDlzNolebg6hRMoToUmysdhCabhhXJ8oBordXNhuwGHQlutF76JFz3ZY/a+Y61iWA0O Mh6jvWGTTgLJAW2oTFVTEPllDzknn9q/lE8Hv0RUVBk8KQI9/JZTmBumwUmqJm4MLS+yPy z/FxmB/YNNGCTVFb5cqnchT+V/dtjk0= Received: by mail-yb1-f201.google.com with SMTP id u17-20020a25f811000000b007647eca7d01so129858ybd.14 for <linux-mm@kvack.org>; Wed, 21 Dec 2022 20:19:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=wqbMgd0zowymzGskr7701SDcBxSEYhpmKyp2L4CmwQc=; b=FaAk0+IovKrA30gqzGnUXCgvxnAEqM9RNUrx6/qbk2dXbMev+aX6+TBCBI++qJqoJh DHNBFkCo27K0mtm3kCypi0Ii7FLQEyOoUcXG+t83h3xzdMvkNUCkZTP8OrqRsYYWm0el eWwdtsGBlfK8BfaDX27IjQxVLcqXb9rSOW0ntCxNjAM2Cim1CHaEVKSL6BfOAxE/zGHv zshIYCJIZ+wR/JAB7hswAHRV8jE3CLxEuhhNl1iaGkZYIJeIjSv9yuHWpAemQnptTj9G AsAn5TBRtcqHkkCAS4JOx0xwOehAeuT/Kj0REFHOiEd6bNs1NdquJnCAzj9joH3GCGp1 aNTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wqbMgd0zowymzGskr7701SDcBxSEYhpmKyp2L4CmwQc=; b=qEb4UI4ieccy5mQfLiUjX38EnMFwH+J7Hqbexbi2XVu0v9BVcxfHiFpxocJF45AGHw VK2RkwxZmrLsuFAjiySNMcupkSYwQLl1tu4cKqOL9zA8yy9DNSrvnXbtCStxbYZOx2OT DQBiIcTfSsAZ6eciL4YpTETZsh065hwfzSnG86OkNfx3m/Q4FAgDKcCJhVyT0+D3MMvR DjTo9pwzr/0psbJ5qsz971GkPAv864fPJnrteBy3UmQG2FX0exMwUnK9iNoY/6SvY6NH hXWShYL96DlvICZH2rjcaicSAbxIwVJW+YiXhKe716vD2sLnnhUPyC2Upe1xrvrZCyKs Idvg== X-Gm-Message-State: AFqh2koGh01AmZ3UVTDULiEPVcImP/YVs02KVf/mBlWg7Ho1UBeEpwxT vQ4rbvYyIcAvzA4ju770ZBla+6kHDGI= X-Google-Smtp-Source: AMrXdXtoQV2nYQsCRHGYe9z8m7Uo+pjFU+YdC4C/Y+Mib9s2WlE6ZwrTFMZkcNSCiAcHyEFs+f2bQg5UyD0= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:a463:5f7b:440e:5c77]) (user=yuzhao job=sendgmr) by 2002:a25:3c85:0:b0:6dc:b9ec:7c87 with SMTP id j127-20020a253c85000000b006dcb9ec7c87mr460947yba.322.1671682792499; Wed, 21 Dec 2022 20:19:52 -0800 (PST) Date: Wed, 21 Dec 2022 21:19:06 -0700 In-Reply-To: <20221222041905.2431096-1-yuzhao@google.com> Message-Id: <20221222041905.2431096-9-yuzhao@google.com> Mime-Version: 1.0 References: <20221222041905.2431096-1-yuzhao@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Subject: [PATCH mm-unstable v3 8/8] mm: multi-gen LRU: simplify arch_has_hw_pte_young() check From: Yu Zhao <yuzhao@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Johannes Weiner <hannes@cmpxchg.org>, Jonathan Corbet <corbet@lwn.net>, Michael Larabel <michael@michaellarabel.com>, Michal Hocko <mhocko@kernel.org>, Mike Rapoport <rppt@kernel.org>, Roman Gushchin <roman.gushchin@linux.dev>, Suren Baghdasaryan <surenb@google.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-mm@google.com, Yu Zhao <yuzhao@google.com> Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Queue-Id: 4789A180002 X-Rspamd-Server: rspam01 X-Stat-Signature: q38635cjxjjwoyygtmen3hso755qtpfa X-HE-Tag: 1671682793-715919 X-HE-Meta: U2FsdGVkX19qxZgHCDyB+sxv4MzLsIYILRd8I9TgOxXiW+JLIFugsc+atCaNfMKHJjTD3kJdM/HBytEA4VH8co4EdkBqAb397OgjZvLAsv9z+Izl7shtC33v4vnoBgukf50I6Bbde4ZliTPD135kRcgtrZqym2zVd/gSggn2CNrP22augU6upYaS9VJ8Qf0MjZKjKUESI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OxFhPrMq2nokBoSBd/xlHXokFaUZEayoz/nnO2Hv+Yq56OdF+7tx1oxe+DjG14URxeFilh1BX8yOFKWbo1caLjxbHxBpMreiNbVe1wanvro3TY15LW9XpG764GVd45bG/fGgq 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: <linux-mm.kvack.org> |
Series |
mm: multi-gen LRU: memcg LRU
|
expand
|
diff --git a/mm/vmscan.c b/mm/vmscan.c index a9b318e1bdc2..71d13c969b52 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4428,7 +4428,7 @@ static bool try_to_inc_max_seq(struct lruvec *lruvec, unsigned long max_seq, * handful of PTEs. Spreading the work out over a period of time usually * is less efficient, but it avoids bursty page faults. */ - if (!force_scan && !(arch_has_hw_pte_young() && get_cap(LRU_GEN_MM_WALK))) { + if (!arch_has_hw_pte_young() || !get_cap(LRU_GEN_MM_WALK)) { success = iterate_mm_list_nowalk(lruvec, max_seq); goto done; }
Scanning page tables when hardware does not set the accessed bit has no real use cases. Signed-off-by: Yu Zhao <yuzhao@google.com> --- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)