Message ID | 20221201223923.873696-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 48A74C3A5A7 for <linux-mm@archiver.kernel.org>; Thu, 1 Dec 2022 22:39:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9315D8E0006; Thu, 1 Dec 2022 17:39:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BA1D8E0003; Thu, 1 Dec 2022 17:39:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 70D598E0006; Thu, 1 Dec 2022 17:39:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 557968E0003 for <linux-mm@kvack.org>; Thu, 1 Dec 2022 17:39:53 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1C929AAFFD for <linux-mm@kvack.org>; Thu, 1 Dec 2022 22:39:53 +0000 (UTC) X-FDA: 80195206266.14.4E4C520 Received: from mail-io1-f74.google.com (mail-io1-f74.google.com [209.85.166.74]) by imf24.hostedemail.com (Postfix) with ESMTP id B193B180012 for <linux-mm@kvack.org>; Thu, 1 Dec 2022 22:39:52 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=i2B3oY+S; spf=pass (imf24.hostedemail.com: domain of 3OC2JYwYKCNkTPUC5JBJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yuzhao.bounces.google.com designates 209.85.166.74 as permitted sender) smtp.mailfrom=3OC2JYwYKCNkTPUC5JBJJBG9.7JHGDIPS-HHFQ57F.JMB@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=1669934392; 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=Tf2mk5xivjN9zWbWWQQFqtvwZGiYn802bc7GbPor4PM=; b=L54UWMPUEV2JrJFpJiirXdfRxrKnvqHXZOZNS2K7dj7GgVnxde4a3rYNSpduFK13saAnHz R3zbQbN9kG2GhfNgZ+J8ST0N2GfhvAo5rBZIZOuK9JWyMaOloYflrey3hWkfOYeTmZM9Wn /Ur875F3BkRUpI6sk9nQPmxp4IX9umU= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=i2B3oY+S; spf=pass (imf24.hostedemail.com: domain of 3OC2JYwYKCNkTPUC5JBJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yuzhao.bounces.google.com designates 209.85.166.74 as permitted sender) smtp.mailfrom=3OC2JYwYKCNkTPUC5JBJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yuzhao.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669934392; a=rsa-sha256; cv=none; b=M1rzkloO5n/MZwrXvVXk5IRiAlsOgukKcS4yXUmZOrq76zaCcZyi2Sq86gJO013rd3wQdk j135Cm7y1hf8oYFf9dl/rw2pTLVdW/MyYKTaa0GeCIhdmVH3LJjl+0THUfECZtW/p8NW87 3DDQ28pzXktx/IVFURt3J/kHAhRzyZ8= Received: by mail-io1-f74.google.com with SMTP id n8-20020a6b4108000000b006de520dc5c9so2910591ioa.19 for <linux-mm@kvack.org>; Thu, 01 Dec 2022 14:39:52 -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=Tf2mk5xivjN9zWbWWQQFqtvwZGiYn802bc7GbPor4PM=; b=i2B3oY+SMRNmEpbZRQCeIbFih6YbvqEnPTFZiN9hVG5t3QOQzoSe+l/KIXrLMGbnNL 29n9Ia2rDjkSsgbQQ/MxxZuRuAoKqL5eMjD+VlKWwofiK+FR8WEosx0Vd3XcGP7E22+q rRIKj1c4MUALlRfm8ECdcukwv7QN74na1G4XdxIZtXZwyL6E89lFK/BVd/HFKxpIQGfW ODkb+jcop4TEfW1KOsWqFtRUGakKyAvfCvdFTIoVnw49on8vW4fQhWoPmFnYCCKyQrSv 8Es0dQQ7c95B5PCBVozQHX2vu0f7iPSQ999hnj8darcm+YBVb07+s3aJwL5X/RYCLX8l 0G/w== 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=Tf2mk5xivjN9zWbWWQQFqtvwZGiYn802bc7GbPor4PM=; b=Of1ZhugFys8Cnz5PnVosy4xt5+dXtSYeo8cwL1zDylWHb9KhYN57Qx4v2Z1d+3jnKl fyD9aM0MfD2vTYXcqk4KOazxditZTHJrHZE6E5DjzDyJsGn/Yx/zf/15DEpwfc9pG3Nd BUGBn8JjexN19/3Ay+ET/o8tDbmj/0S/x7ISWPzbmJDe3FS6IX8323NfRRGC5akjRKYr 9A5QPB1ZXlYDx/Kr/xTgW+a7AGI4iPBPa3F1fWqAUzQeffqMj5KbnLPTywGduaGbDh/8 fyxKx83XnBJ6RR52rQzVJyye3Pqd9ksQE+5bjfzR2+sKXO/QkkoMmkX2De1U+D3CTDPv ZAYQ== X-Gm-Message-State: ANoB5plIHBrK0PlfhBz4uGUh9GmX9w7nF1s3wyXKzn8+Gpkw3A48VZJm I4TomS98dLhyvLPGpoA211xctHxLkB8= X-Google-Smtp-Source: AA0mqf4WbXEse5Izu5KRISp7nUEqmxo/6ym38RNrOlKYkM8tNbyDlcq5pn65NFJqlpq+5g+VfbZ7eK8zPJs= X-Received: from yuzhao.bld.corp.google.com ([2620:15c:183:200:1d8c:fe8c:ee3e:abb]) (user=yuzhao job=sendgmr) by 2002:a5e:aa07:0:b0:6bc:5d7b:2b9f with SMTP id s7-20020a5eaa07000000b006bc5d7b2b9fmr28153947ioe.38.1669934392148; Thu, 01 Dec 2022 14:39:52 -0800 (PST) Date: Thu, 1 Dec 2022 15:39:24 -0700 In-Reply-To: <20221201223923.873696-1-yuzhao@google.com> Message-Id: <20221201223923.873696-9-yuzhao@google.com> Mime-Version: 1.0 References: <20221201223923.873696-1-yuzhao@google.com> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog Subject: [PATCH mm-unstable v1 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-Spamd-Result: default: False [3.03 / 9.00]; SORBS_IRL_BL(3.00)[209.85.166.74:from]; BAYES_HAM(-2.87)[99.44%]; MID_CONTAINS_FROM(1.00)[]; SUBJECT_HAS_UNDERSCORES(1.00)[]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[yuzhao@google.com,3OC2JYwYKCNkTPUC5JBJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yuzhao.bounces.google.com]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; PREVIOUSLY_DELIVERED(0.00)[linux-mm@kvack.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_DKIM_ALLOW(0.00)[google.com:s=20210112]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; R_SPF_ALLOW(0.00)[+ip4:209.85.128.0/17]; RCPT_COUNT_TWELVE(0.00)[12]; DKIM_TRACE(0.00)[google.com:+]; ARC_SIGNED(0.00)[hostedemail.com:s=arc-20220608:i=1]; DMARC_POLICY_ALLOW(0.00)[google.com,reject]; FROM_NEQ_ENVFROM(0.00)[yuzhao@google.com,3OC2JYwYKCNkTPUC5JBJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--yuzhao.bounces.google.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: B193B180012 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: zicu6tkaj8zmaatzn5bsb4j6au83nxsa X-HE-Tag: 1669934392-850579 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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 39724e7ae837..5994592c55fd 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4412,7 +4412,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(-)