Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp617962rdb; Thu, 30 Nov 2023 13:33:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoU4DsKFcp4fnxLXClGwyVYbz3hswlKO6hXASL9xoFQLkUuXmtB8Qvo4yFjSiBEbDH68XX X-Received: by 2002:a05:6871:a98b:b0:1f9:fa19:75e3 with SMTP id wo11-20020a056871a98b00b001f9fa1975e3mr24204385oab.50.1701380028243; Thu, 30 Nov 2023 13:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701380028; cv=none; d=google.com; s=arc-20160816; b=lFIlXilM62bB12vyJM8qbbSzz2XlXw7P/FuaEiLl18Q75jVf+YeadUslwo0Do6kfN5 /6vckNkayDp+uGLbzp5Zr/ecgT2J98N8H5R4OXj1Ku9Ff3m2qNW31GlWugLn/jRm6nz1 vrmYsqTvwOi6vz3Yiq2e/Qt2eZqyan7hTgQf06Zw6o1vvyaYwf9wnT8xC38MqHtrjPki ko7xs5BnUbQUx/wH0S2G7zxtfom/qMeGrvGXCZ0UeBUim5GwosAtovd4YvwQPwQgk+lM VXXFp23k0wrxs2jj+QniJw2dWqLG4QSYJwdRWJGZECdCHwlxSsmj+2XmBYfJBeX9e6w+ c5Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=B+GFqMJxTCizScPN1QKdX74i94SljIETN0Skd+f/P60=; fh=Sh01qYnoNCQmfTroLPQZY8eNI632CEDPhmEPu6pOgms=; b=K2C4iiF47nhohnEuXwgSpEoS28bTjTJHqF5zewWXF+DgNPfMVqjMXlKR535rLGXfuL 4lrTucQGy3dQNc9TGEfXYpnkFtuUW3v4CKvTmfz/LF1XecPD4Fmv4XrVtNebI7KvWiFH dbS5VFzdy/ht840LOeTd6oVsevgAjZWTWEDK+TilaS7tw5iz3YA4ErQkjNAibFtDMJOB kKI8lsv4l679tInsJzBzuTr/lX4NUp6z5Jrf0Gx5cD0HkPwdCamUSdknu45LxHCaFbMB 607oJlmtDrtVOCtg00/+BrWPCyhRnEH/zwXUvsUM+PuYWhsXrUOpzkt6uZVKAwE41Zp5 H6eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=rq46MTa6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u3-20020a656703000000b005b74ce91e9fsi2097486pgf.672.2023.11.30.13.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 13:33:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=rq46MTa6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 164B580D7E43; Thu, 30 Nov 2023 13:33:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376915AbjK3Vdf (ORCPT + 99 others); Thu, 30 Nov 2023 16:33:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376859AbjK3Vdf (ORCPT ); Thu, 30 Nov 2023 16:33:35 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9DA31B4 for ; Thu, 30 Nov 2023 13:33:41 -0800 (PST) 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) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 13:33:47 -0800 (PST) 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?