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 4832CCD4F5B for ; Thu, 5 Sep 2024 07:31:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CEEFA6B041D; Thu, 5 Sep 2024 03:31:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C9E316B0420; Thu, 5 Sep 2024 03:31:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B65966B0421; Thu, 5 Sep 2024 03:31:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 9900B6B041D for ; Thu, 5 Sep 2024 03:31:50 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 42AF81A17FB for ; Thu, 5 Sep 2024 07:31:50 +0000 (UTC) X-FDA: 82529865180.08.4B9A73D Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by imf06.hostedemail.com (Postfix) with ESMTP id 70C92180009 for ; Thu, 5 Sep 2024 07:31:48 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=JlPfoQrU; spf=pass (imf06.hostedemail.com: domain of yosryahmed@google.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=yosryahmed@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725521380; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nxpm/KRBSaCmPVGMswzvV0ymk6YQb+nmcLd9CWhDjf0=; b=HrcVK1ir1CyMsaPbdzQMLI+B6luwzqvwFOTDVrazzqfkJ7FZlAOs/N128e3J0s99sVFYmM NsHRRI2svT7xzqGds1d7GcnJ94vhVJuc/QrzoXUWgJPKBAq6JBxSI6WanL+SDIjrcdTv/H CyBCFnhY111w+/QcJ4RT5kLXuYiaOSU= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=JlPfoQrU; spf=pass (imf06.hostedemail.com: domain of yosryahmed@google.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=yosryahmed@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725521380; a=rsa-sha256; cv=none; b=WRG/yq6VLKZgRHMlaM2pPHpvHgUcYlH+U2IE9qVP3qLE4OX5EnLyHNTPc1H+FKdUy/9okO gjvNscXf4Kgp9mLgpyF2gtCVXb/1gGD8SrXCpu66SNNHKbSAp9fQnj4PSH594m04qZRzZT qdhqol+pBVi/BTmSQGeNi9H8cQk8CTo= Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5c3d20eed0bso166349a12.0 for ; Thu, 05 Sep 2024 00:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1725521507; x=1726126307; darn=kvack.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nxpm/KRBSaCmPVGMswzvV0ymk6YQb+nmcLd9CWhDjf0=; b=JlPfoQrURHX5/Wf1plW7MAGqRhk+3xboGT9hHeUyLGqS0wpX+Q1HalUw9aeEsnG3yr UEi/ZiHMwl/Up6MCC2jhHPz5rFVBzaGV0aIi0cxHuNQoEFhbefLoZRZyJveKbFS0xWTv CZNCgBMmxqs58uqCabrU3FveAnR72or9z1/f0AOjPDD0VTqwiGeuVc5yeWZTg9+fLoHX ZAMiEVREoAnT1+mZ6GlUvz/mhY79SH7hbheK3ZqQ/jrBNcmbJrVqCCO46Ma26YP6v7Se QKxQI1Qkf988CtQRi8Bg92+glAIBlzUoGe92eXDi8e0+v1a4MI2TFFzIfX9prZk/7oQP CR3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725521507; x=1726126307; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nxpm/KRBSaCmPVGMswzvV0ymk6YQb+nmcLd9CWhDjf0=; b=dbp5pQCCNBkQ8iPiPzAvSK1035mLefxnVmA/NVgM8Utuh+v/KA32qMrVhlwAMqT7PI cTJ0ukR6xG7qiPSenLxbmBhpQ0lATgyGapVleIGNJm3KxrdZ8GIRob1Uxkv3NtfZOWa+ +Z0kfPKhpeEnWXR+JnUcX8Rd6nixqQQ2hyGf2JTsdEUbZLGT8MACnmGsX5K9e/g1rxQs iHYSJiFcOctWlpNuYPmGqDicSnqEySKQKeo+YO3A13UC+XlE9UaJVryooHItgeMCq+bE Dym7RQZZSSpiIY/MOfycYflyg0yspbzhNZETzTeNXadjzGv66rCydFhJm6DLCd1/7GuK Y2yA== X-Forwarded-Encrypted: i=1; AJvYcCVTmb/hPiOHRXcX7QiVLFvmn7wT1KihwpygroNbVMfCHc3AjB00TbDgVjUh00ZgMKVQFUueltwlcA==@kvack.org X-Gm-Message-State: AOJu0YzY4t0dib8OhUwWT5kPCqi7V75BZXC2XyW44lfqEBPn2EZjY2CC vrxNsG0LNfGTHcDL2qNmx1ADS0jZY0/ZObgoND69DV9ScCLPn8UPGr4Ev7QLJ5EgP9f81GTGR2j tqk1ADiGgB/RR1LtFXKDNxOpucC6EFLLtPvlD X-Google-Smtp-Source: AGHT+IEckPel8FsVowyMgk8xK56rxIzk+362fVdZDaK+Gg3yRWkT+ET93Lk5H34vpbOwuDYazBwewCWUcH/bDNo10EA= X-Received: by 2002:a17:907:6d02:b0:a86:a866:9e25 with SMTP id a640c23a62f3a-a89b9727ea8mr1341691766b.56.1725521506371; Thu, 05 Sep 2024 00:31:46 -0700 (PDT) MIME-Version: 1.0 References: <20240904162740.1043168-1-dave@stgolabs.net> <20240904131811.234e005307f249ef07670c20@linux-foundation.org> <20240904181543.02de2242490cf233c7879697@linux-foundation.org> In-Reply-To: From: Yosry Ahmed Date: Thu, 5 Sep 2024 00:31:08 -0700 Message-ID: Subject: Re: [PATCH -next] mm: introduce per-node proactive reclaim interface To: Andrew Morton , linux-mm@kvack.org, mhocko@kernel.org, rientjes@google.com, yosryahmed@google.com, hannes@cmpxchg.org, almasrymina@google.com, roman.gushchin@linux.dev, gthelen@google.com, dseo3@uci.edu, a.manzanares@samsung.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 70C92180009 X-Stat-Signature: w43ggobsbp57jm5yppkxdmisaek4odty X-Rspam-User: X-HE-Tag: 1725521508-903221 X-HE-Meta: U2FsdGVkX19/V5pxvJ3/eU0kGH0XwoBHu2GL7Tabry14Kj+98v+Azc+3JnBN5K4wfwWyoXswq6BsxoURCnVlTFU5GDabKTOfX6WFRF3digRKJOYwQEdlgDbf2rBPgIH/v64mCgFOmlyJ73bpAAUt4Id9ZJhHvHFjnEQ5IMf/qvCE1vslvYU1dGsbxJb8PtgPGvsVr0vGn0pSYsQCuWMKQDSPm6iDflBO5x1X/0UqrqyzqEsxVhl+it3XQE4OC76SD2IZgusZdtv3/mntmMKP9bgaMoTF/jO+VzQi7Q1YzNDUQlU6PicpVF7pYPwm+F2yv3bqqu/IZ/YX6aXEMysaieMaGz70thPrYeiTjZYH3DZlhZe0eAnRCKigqKJ2Bak2GvlaGb5Z5qxh5miNyFlXzvE+vFDHIDbNbrHorssJGVMIGSaqYL7K27Q8Iwbh3P69fjK63koa9EBC9oDpt4APyIUzFp3Bq3vKrrb24jCyBtL+zjPxfaqafTht6CbnJ5gHWmmNEH1rvtXb8R7k1+ICCAIyttfYRplcTdZhkKsJRSJR7GARmnEv4IZtfDAG0aLrLA32Z2tBEgiZkND+pgzG+o713LRCOXJ1lr0yZ0ZyIgZemvDj8xNVgGeh0LU4WjJ95XWNLXxAnG9Ip4lfACeKcx+cqE+IUKFCpc6dl0agd1r5dKBJ6huSD3zgj4kBMA9SJOIIGb3mSRz/RxrJwPwexraXjmtNpZZgW1NQRonqfWQBHBABHlSfgKFnJK9lWSvP9TXOF75CcwjSp9TMxe8p2C7i3qWz6y/1RJORT/CMGvfh0SsNS6zDByNBQD5IBzMjLZ/13MQuIvnKBROQTriBv30WE6uVxtbIyjd6sbxSDY1G5ex1bN6OwR43PreDtp1+6EXeapY74KND5HXbaDva2HUXKG7PEB4H5b2NFGO617IFsHcD8qVQ7XXvCEC8Ct2YerZXRYTPk80yCoPTaWW zt4i3sGB Aymrf/VfUW3o+bXjDm/x8SoGGwJgSNL3lDLGPgJ6bV9i0PCTvth002IC/LFxqEXcGn229LRGlQxkMO/Ae2HrJ/FX7Mw6abJBISYUSdFtxJgIWl/EK8PSAWlZg2Yd92S+hck9JGdL4I7KTzCUdcepwgo2cUJWlmSMHcZl7HsmGzheyWxszRHs/uFUlwiopYMuQtbIXpWCgfX/oWpWh0xfyt7W3555i64rxk0/EHyFM4JHsOmBcLkxUc1nzK+tR/pMUNnyU X-Bogosity: Ham, tests=bogofilter, spamicity=0.000038, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Sep 4, 2024 at 8:35=E2=80=AFPM Davidlohr Bueso = wrote: > > On Wed, 04 Sep 2024, Andrew Morton wrote:\n > >On Wed, 4 Sep 2024 18:08:05 -0700 Davidlohr Bueso wr= ote: > > > >> On Wed, 04 Sep 2024, Andrew Morton wrote:\n > >> >On Wed, 4 Sep 2024 09:27:40 -0700 Davidlohr Bueso wrote: > >> > > >> >> This adds support for allowing proactive reclaim in general on a > >> >> NUMA system. A per-node interface extends support for beyond a > >> >> memcg-specific interface, respecting the current semantics of > >> >> memory.reclaim: respecting aging LRU and not supporting > >> >> artificially triggering eviction on nodes belonging to non-bottom > >> >> tiers. > >> >> > >> >> This patch allows userspace to do: > >> >> > >> >> echo 512M swappiness=3D10 > /sys/devices/system/node/nodeX/rec= laim > >> > > >> >One value per sysfs file is a rule. > >> > >> I wasn't aware of it as a rule - is this documented somewhere? > > > >Documentation/filesystems/sysfs.rst, line 62. Also lots of gregkh > >grumpygrams :) > > > >> I ask because I see some others are using space-separated parameters, = ie: > >> > >> /sys/bus/usb/drivers/foo/new_id > >> > >> ... or colons. What would be acceptable? echo "512M:10" > ... ? > > > >Kinda cheating. But the rule gets violated a lot. > > The only other alternative I can think of is to have a separate file > for swappiness, which of course sucks. So I will go with the colon > approach unless somebody shouts - I still prefer it as is in this patch, > if we are going to violate the rule altogether... I also prefer this patch's approach. It'd be really confusing if the per-node and per-memcg proactive reclaim interfaces have the same semantics but different syntax.