From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4956A5FF0A for ; Thu, 30 Nov 2023 21:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="rq46MTa6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE82EC433C7; Thu, 30 Nov 2023 21:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1701380021; bh=zoLX8EMoe/pefdEhZ5q+qBiLo3+H4+isUNHHBqOWkyw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rq46MTa6E0BZ7P6nDMGVHEIbqrT6a/+4vxnV3EWD+gk1kkiul2VBJcj2srNAhI2cM BW10h4l1E1kHdzFRlLa2Ltn3kO9sPFHN5kHpR5qkNCox7dCislZrvCIUfaSMwsErPm MpPwSzA5zgropOxblSm5gTHS6+dUOpzIZqDtgWXI= Date: Thu, 30 Nov 2023 13:33:40 -0800 From: Andrew Morton To: Dan Schatzberg Cc: Johannes Weiner , Roman Gushchin , Yosry Ahmed , Huan Yang , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Shakeel Butt , Muchun Song , David Hildenbrand , Matthew Wilcox , Huang Ying , Kefeng Wang , Peter Xu , "Vishal Moola (Oracle)" , Yue Zhao , Hugh Dickins Subject: Re: [PATCH 1/1] mm: add swapiness= arg to memory.reclaim Message-Id: <20231130133340.36140526608289898acb3ac5@linux-foundation.org> In-Reply-To: <20231130153658.527556-2-schatzberg.dan@gmail.com> References: <20231130153658.527556-1-schatzberg.dan@gmail.com> <20231130153658.527556-2-schatzberg.dan@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 30 Nov 2023 07:36:54 -0800 Dan Schatzberg wrote: > Allow proactive reclaimers to submit an additional swappiness= > argument to memory.reclaim. This overrides the global or per-memcg > swappiness setting for that reclaim attempt. > > For example: > > echo "2M swappiness=0" > /sys/fs/cgroup/memory.reclaim > > will perform reclaim on the rootcg with a swappiness setting of 0 (no > swap) regardless of the vm.swappiness sysctl setting. > > Signed-off-by: Dan Schatzberg > --- > include/linux/swap.h | 3 ++- > mm/memcontrol.c | 55 +++++++++++++++++++++++++++++++++++--------- > mm/vmscan.c | 13 +++++++++-- Documentation/admin-guide/cgroup-v2.rst is feeling unloved! Please check whether this interface change can lead to non-backward-compatible userspace. If someone's script does the above echo command, will it break on older kernels? If so, does it matter?