Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp623925rdb; Thu, 30 Nov 2023 13:46:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1fy596ZnGT4oTgYU57F180av/kjRxW8YxutRWRiHxGtFGjv2Xx+PQ9Q6LGsLtSUs/E5kq X-Received: by 2002:a05:6a00:8d93:b0:6cd:e5be:83a6 with SMTP id im19-20020a056a008d9300b006cde5be83a6mr4171151pfb.32.1701380812932; Thu, 30 Nov 2023 13:46:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701380811; cv=none; d=google.com; s=arc-20160816; b=sgtjojPhaKBwb6P7AZV17PcE762elVgXhv6zFMSKjD/KYj4Zh63HeWCRMhVnLp5wjD fFU+MtEvat11T5Z90TA+1Uq9NMBDuPRSvonduz0JUblWLJCdSP8Mv1cWb0Elb2jluARE QAbA1n16lgUkCeZN6zwhok+JpYxQh7V8yD3THQbsV+rGM9OtaNxqwXm24ofNxX72cIKD Aldt/YF+SZg6u5kO7MvOLwjagys0S+pCN9fkVXfF91eI5lDW4wYXVvrrkA582aSRCOeh QsxMOkpGCrHCxddPWSgwdQ7A4Wr9DKW4MTZndlUYaqy0Wt4BRHkoTEbVrvswQda+wcJb 5Big== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=E7kw1SluTyHuS8yhLQtATJ7V+RH9z5AGm8JV2/YS9U8=; fh=uE4f4JMaQJTa4UDZF0EdRp3M2ozWmChkEYldkJhcj7g=; b=UaQxn/vJbtkgZ87MEkpgdS367FP57mXa/sTPlOQL1WGYXYaOAJH2kCRvLIorXoZxAl 47tmvcHbbopzCddFkxttJYgSKColrfZuYaaLP3QYsEsq7WgNsfYBg37sKzt+U1ghwSnV uFYk+tp/b17tHuWeRteIm5+RcfJ/to56ec4vtxqhluXipl1A1YlSDq5AOEewFHBy19my VedqZjcBZPMzPYnmeL3UdDGyvQjELipwGKj5Z/Fd7MNMPsIwaNBBBf6Cax3zz7F0PcNC yndyXX5G9r8nZKiM2xVf7GA0/BqOLuaSW6j0Fz9z5JGHnrwrVRaRqTptWEasPi+/5c83 SJrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="OcfX/OUD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q13-20020a056a00084d00b006cd84a21360si2115293pfk.219.2023.11.30.13.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:46:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="OcfX/OUD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E8AB582ED277; Thu, 30 Nov 2023 13:46:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376980AbjK3Vq2 (ORCPT + 99 others); Thu, 30 Nov 2023 16:46:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376954AbjK3Vq1 (ORCPT ); Thu, 30 Nov 2023 16:46:27 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA1110D9; Thu, 30 Nov 2023 13:46:33 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3b2ec9a79bdso902849b6e.3; Thu, 30 Nov 2023 13:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701380793; x=1701985593; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=E7kw1SluTyHuS8yhLQtATJ7V+RH9z5AGm8JV2/YS9U8=; b=OcfX/OUDOeuukd4WpimK/PFzkflmOaTZlpC/bymlQ4NQ/w942I9yYdmcpFHrcvc1tl bxmDDKwY++cCd0Da+nwa7+OPXY5+haqoNLeDVmffMnTnrm6uwdDYY8vfBROmcra/ylcm ZJsvSum0j3jAwXq8dahFV/pTHMFkgqU3bjoFEAtmA179tnaVHc6dFTJ/qviVAihf5iD1 Wj+InDKMuq5D5Z0obopCjMhkNhTvbAv69VQ4UlAcVgQujeN16lTWOttg23dxaq9/eHxo 9Q7Y2/FvxcL2JmrXh47cRvUsezdbXtOoe5q4DGRBcOh4aZFTSXPVNeCChz8L/URlFDoF acqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701380793; x=1701985593; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=E7kw1SluTyHuS8yhLQtATJ7V+RH9z5AGm8JV2/YS9U8=; b=gtQztwrjsrdlZzSoATF6dhUfTOiW3f7BJp8sAuLp1OZe5IAgTvt6fdFmjmXhzGQrNE KVhN6jlD3YdEV9PGiAKt+jQHoVS5v8x4mQut+taWBmJNLY+hF32P9nYHJQqRFw0psaCk YTV8GF5mDb4f07bu+tScd3A3wXO5s/Gv5oVFD5W7MbeDqwNqk6WhELbYoHIGxsPJfDGy PkY6Tn0pGaZkzfykyWcVHa8wgA7gX6nWs4+WooCCJipCTZlw6EqqIdrODvCXJQoJ9jra phZb330j/LCl153+ZqltgXBT6zYhEuAhvlBnXAhYLeYmV7UbbOSE9Y8/TtznN3T7o4A7 LZ1g== X-Gm-Message-State: AOJu0YyCJ1AJ4K0wDrpUrbNh9LaTuWyD2WGQranQJaI7y/jvcL/RCXfQ UucwMWA8frLueGkTpnnHggU= X-Received: by 2002:aca:f17:0:b0:3b8:79a8:cc7b with SMTP id 23-20020aca0f17000000b003b879a8cc7bmr948016oip.16.1701380793258; Thu, 30 Nov 2023 13:46:33 -0800 (PST) Received: from dschatzberg-fedora-PF3DHTBV ([2620:10d:c091:500::7:5fb0]) by smtp.gmail.com with ESMTPSA id vy13-20020a05620a490d00b0077da601f06csm865412qkn.10.2023.11.30.13.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:46:32 -0800 (PST) Date: Thu, 30 Nov 2023 16:46:30 -0500 From: Dan Schatzberg To: Andrew Morton 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: References: <20231130153658.527556-1-schatzberg.dan@gmail.com> <20231130153658.527556-2-schatzberg.dan@gmail.com> <20231130133340.36140526608289898acb3ac5@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130133340.36140526608289898acb3ac5@linux-foundation.org> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 13:46:50 -0800 (PST) On Thu, Nov 30, 2023 at 01:33:40PM -0800, Andrew Morton wrote: > 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! Oops - total oversight on my part. I'll add docs in a V2 if we can come to consensus on this interface change in general. > > 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? Older kernels will return -EINVAL with such a command - that seems appropriate, indicating that the argument is not supported.