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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 8A8BAC11F66 for ; Mon, 12 Jul 2021 07:24:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2FA8661249 for ; Mon, 12 Jul 2021 07:24:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FA8661249 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 479056B0098; Mon, 12 Jul 2021 03:24:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4293B6B0099; Mon, 12 Jul 2021 03:24:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C9D86B009A; Mon, 12 Jul 2021 03:24:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 0A5C26B0098 for ; Mon, 12 Jul 2021 03:24:29 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2126818338215 for ; Mon, 12 Jul 2021 07:24:28 +0000 (UTC) X-FDA: 78353097816.01.0E3BEA5 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf23.hostedemail.com (Postfix) with ESMTP id BB5C190000BA for ; Mon, 12 Jul 2021 07:24:27 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 9F9A7220B5; Mon, 12 Jul 2021 07:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1626074666; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Ga96rYfOhZ936qPkgzzgegVhNigCT8utIq+5j8Vq0uM=; b=rUG+yRDPioETsxv4p88tf/AJBNhWDsw/mVnSAL0wTJkn/MFg6jb7XMaoN37r7qyswt4hnl kJGyBuq83F2YapHXXsdtHnatJhlLv8DGqC/CkEYuU3Uc7jnJzNu/e5ehL6GIQscwh5jK5A wRhbKUybFMyxnavjV54qn15ncM11g0I= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1D507A52B1; Mon, 12 Jul 2021 07:24:26 +0000 (UTC) Date: Mon, 12 Jul 2021 09:24:25 +0200 From: Michal Hocko To: Miaohe Lin Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, vbabka@suse.cz, axboe@kernel.dk, iamjoonsoo.kim@lge.com, alexs@kernel.org, apopple@nvidia.com, willy@infradead.org, minchan@kernel.org, david@redhat.com, shli@fb.com, hillf.zj@alibaba-inc.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] mm/vmscan: remove misleading setting to sc->priority Message-ID: References: <20210710100329.49174-1-linmiaohe@huawei.com> <20210710100329.49174-3-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210710100329.49174-3-linmiaohe@huawei.com> Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=rUG+yRDP; spf=pass (imf23.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam02 X-Stat-Signature: hqfq1o7a94z4pzmhazctfk4e37oxshuf X-Rspamd-Queue-Id: BB5C190000BA X-HE-Tag: 1626074667-885303 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: On Sat 10-07-21 18:03:26, Miaohe Lin wrote: > The priority field of sc is used to control how many pages we should scan > at once while we always traverse the list to shrink the pages in these > functions. So these settings are unneeded and misleading. I dunno. I agree that priority is not really used as these operate on page lists but I am not sure this is worth touching. > Signed-off-by: Miaohe Lin > --- > mm/vmscan.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 6483fe0e2065..fbe53e60b248 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1702,7 +1702,6 @@ unsigned int reclaim_clean_pages_from_list(struct zone *zone, > { > struct scan_control sc = { > .gfp_mask = GFP_KERNEL, > - .priority = DEF_PRIORITY, > .may_unmap = 1, > }; > struct reclaim_stat stat; > @@ -2327,7 +2326,6 @@ unsigned long reclaim_pages(struct list_head *page_list) > unsigned int noreclaim_flag; > struct scan_control sc = { > .gfp_mask = GFP_KERNEL, > - .priority = DEF_PRIORITY, > .may_writepage = 1, > .may_unmap = 1, > .may_swap = 1, > -- > 2.23.0 -- Michal Hocko SUSE Labs