From mboxrd@z Thu Jan 1 00:00:00 1970 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 E8B9FC4332F for ; Fri, 9 Dec 2022 08:08:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 683B68E0003; Fri, 9 Dec 2022 03:08:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 60CF78E0001; Fri, 9 Dec 2022 03:08:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 487018E0003; Fri, 9 Dec 2022 03:08:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 38FA58E0001 for ; Fri, 9 Dec 2022 03:08:54 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 033C3141230 for ; Fri, 9 Dec 2022 08:08:53 +0000 (UTC) X-FDA: 80222041788.27.FA9C359 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf11.hostedemail.com (Postfix) with ESMTP id 50F3F40003 for ; Fri, 9 Dec 2022 08:08:51 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=kt27pZWY; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf11.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670573331; 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=Zk/7g2NOg2HJyBROjss9mdodMQJ6cfF7LYrKlfrzRSY=; b=bDFR26JD1he5xWcbB+kycGgGggIQNrdm/4Y/bENUxGmbp0lg3jbGmNQuA3kdCQGpI8SYrT E6acNvRsklwz/vlxe7Mz0jqW6Dp9ksd0SsUSP4aNVxru96xAtHEqDwRGXfJo5f7HrqeN5y cZnCF0QsSkmZjU7NXJvCXiiWsr1n/jA= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=kt27pZWY; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf11.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670573331; a=rsa-sha256; cv=none; b=bVw6xTj14zFKmlIsi6HXdjx5TQy5A7Ff8btPq17+XQco1SiG84P97/Oi5RWDtVYBoPBB7k yyi0/gCjji+IcI73VEKbMvsLf/yP8liX2g8HjpT/uANmyMnSCbfseuxXUWD9zUVNqYxbPm mZvqxXPO8Gqcp24ga21/DEfVYGNP3+c= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B651C1FE95; Fri, 9 Dec 2022 08:08:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1670573329; 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=Zk/7g2NOg2HJyBROjss9mdodMQJ6cfF7LYrKlfrzRSY=; b=kt27pZWYH/kFXb3m0QK81ZdpgOZUQ5G7mlGGV9PW9fbhRUmCvwYh/S6je3mCV+Y9srLzzz 4l+WbhypNKZE1LpuzrMKjAzjXfcV73yP05VdCmGj/Ki0lKvyLNQBGa8ozBJMMLiE/QE8wl FsnxbS7qejzA1JaFeMeuaBaeSayzlG8= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 949AD138E0; Fri, 9 Dec 2022 08:08:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vfT8IRHtkmP4OAAAMHmgww (envelope-from ); Fri, 09 Dec 2022 08:08:49 +0000 Date: Fri, 9 Dec 2022 09:08:48 +0100 From: Michal Hocko To: Wei Xu Cc: Mina Almasry , Andrew Morton , Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , Huang Ying , Yang Shi , Yosry Ahmed , fvdl@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] [mm-unstable] mm: Fix memcg reclaim on memory tiered systems Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 50F3F40003 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: t9fhesu4nrkh9h8fhp3c3c7urmw8kyhw X-HE-Tag: 1670573331-30982 X-HE-Meta: U2FsdGVkX1+e/GH9Jv0wvIM/88tKBjn4d4ZY+xTPt9q2BIAWOAVHbDjaJCMwFbHQ7PDjoux25xUo/UcaVe+YcG6YhyO0Y6KHaNQeW7oPw3lq+XP8jcaoOMtxCHrRbMf3luR9R16Er8HcnmVBa3VSjEhz8GCzCqZ8srE7fI1vaSbyAep3Rse2vI1guaA1LHP6lW9OJHnystxtkRdL75f4bqgW3Ygd6B0/obJmpbK38ZjYIZNv8ikX0pfkYx71P9LeMjyxPxUxucjFkx2fUpQQwJ9/go5eb9LGhJPwr81Svm2togIlyc7iFFILfcbq8hNkjW5tz1APXban/A43uWXarbiC2u6SBjt0UUSKuzpDLMW/LMoZVzkodS6O930ngN9KNZL3sD4RP/BqDgKquDPjHcanMUnR/s09zZv/3+r96+sl4B3PwRgebvaLLN61trTVWs1abQYWEvkzjT2CbK7aReLAdRlOgJYOTAbnIYmETmYz7CRo47fETbHHsYxQ+XdrmCcSZwiJjKXTTlAso9VAvauRK1uBOz1IQQVkybrgFLvnXwpPqN4+5FayqP67h6SUXh5G6PX1jO6ajbd9dipW1lS+GLKW/nEYnveskaebzwmf20GsJumLWVQiiP2aj1JZKxVD4GYRL2zc0NfjXZGx0TmtW+oTUjBIWV/LHsjQyINzXQLqdbiIuoX0Op6TrlAjQwMPY1K1Y70ksgdSeQJ+F149nHzRsOuNIIH3tlRhLmNXo8s8iV8PtOo6v+9vtwQu+ZOgtFsN5RnZ6QDGdNl8fu/v6Ei/HCXewLqsBm662e5BJ6aOkw6oZDjHBA89dgOiM6htDBWdNm6u/BTV7uEI86+lW8TLBSJbWBXz4H4Nqm+YTUsjnQN7Xw== 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 Thu 08-12-22 16:59:36, Wei Xu wrote: [...] > > What I really mean is to add demotion nodes to the nodemask along with > > the set of nodes you want to reclaim from. To me that sounds like a > > more natural interface allowing for all sorts of usecases: > > - free up demotion targets (only specify demotion nodes in the mask) > > - control where to demote (e.g. select specific demotion target(s)) > > - do not demote at all (skip demotion nodes from the node mask) > > For clarification, do you mean to add another argument (e.g. > demotion_nodes) in addition to the "nodes" argument? No, nodes=mask argument should control the domain where the memory reclaim should happen. That includes both aging and the reclaim. If the mask doesn't contain any lower tier node then no demotion will happen. If only a subset of lower tiers are specified then only those could be used for the demotion process. Or put it otherwise, the nodemask is not only used to filter out zonelists during reclaim it also restricts migration targets. Is this more clear now? -- Michal Hocko SUSE Labs