Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp522537rdb; Thu, 30 Nov 2023 10:44:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqgeYfcVVdD6UKAYzhVQ3znPCcU9roPPXbAJQKUdxPyNlCowZ5R77XZp0Cas7HMSnFXEZp X-Received: by 2002:a05:6808:3089:b0:3b8:65a3:1ca5 with SMTP id bl9-20020a056808308900b003b865a31ca5mr520726oib.17.1701369879741; Thu, 30 Nov 2023 10:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701369879; cv=none; d=google.com; s=arc-20160816; b=R13hgizex6uqbOIolFoSxM3j1r3OSwqRIzt3E5kMdkVbYVl11ADMGuQcyGr3vdyPU+ /iv3/JRRinpIgn93QZZiH/70N3NIh0h6xeI37jxL19ua2KpRTKI3vZSVfNxRRK/RD96z 7hPtZ7/RBV/9kEOO/SILKLTFW8KSyTeN4TOwcOl5K6ZM5bcOYRkvvA3TrQkNwApb5BrV xBKUDL/+1XsmeyZMOhGEwKMfMd9ctWMKmMCeCVRFPMlntjg67nzSXLijCrdY9aiSNkp0 C7n89jV+cnwn2sO8yTwCBawsxXGogh3J0NiVw4lLyTB2PpeFn3S7EJIbJGR4ph5euaXM EBww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=upiPnSdDPUq7hHtl9SwPR71HvOH0YDjoF8X3pVlx4do=; fh=350iC59TVe0XVVWH3pc7mrpQCvi6F7aQ/UpNWOfZujQ=; b=f9yMadjH8kknf3JP64tjbYcd8CFxmD9oNPiG0bTugpzg64tjAvFkImjvlUaCIa/s8n //OFJwo2xPLWqRxFeKFVZuvek8DjzrGUF/seY3F8TcF40x+9Bmv/pfhNNG7q0cpV+2vt kF9iO8AmVXhlU2wPmHGFHhcpvn1SgN4YFAVOTbByvPXgDV4z1mVMgekdPDPM3bwYCsVC D3rpNEAyHrWXY8GVg4oA275CtwQB90+IKdFdvKYq1xrzGFUc74wk/LcpkvbZnv9pEwEN c3yVi1IYogPDocZ4DnVV+E1tf8ic+KqKEdHDCKvJLCOQntPBsVoaoMrQxgMBUXYH56Od oZyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=d39xz5aC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z22-20020a656656000000b005c62adcc87csi1421699pgv.882.2023.11.30.10.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 10:44:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=d39xz5aC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 560AF82CD60F; Thu, 30 Nov 2023 10:44:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbjK3SoW (ORCPT + 99 others); Thu, 30 Nov 2023 13:44:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbjK3SoU (ORCPT ); Thu, 30 Nov 2023 13:44:20 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555C910D0 for ; Thu, 30 Nov 2023 10:44:27 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5d39d74bc14so9068327b3.3 for ; Thu, 30 Nov 2023 10:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701369866; x=1701974666; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=upiPnSdDPUq7hHtl9SwPR71HvOH0YDjoF8X3pVlx4do=; b=d39xz5aCp98Lkh7pxGFZZQJMBD1zYF0AJLTaiDVC5H7RTxwh3JnHvby2naCv3aIqA+ q1mpKQnQsIjTu8IR38LwTPx9TG2UHGobO9Mi5+YIp+j65tw1T6VuCvF8KU3MeqEAWbIg tf3ewXbNZQLxcOqFKdu2tx1I59wph0is3ZnYJQgcZSppxa2JuATU+VxES7ClZd0HFF9v H8v+WAOf6PGkOqFtxrqhk2gd63/e9skSxiNLYxcMcRQR/tLOF9eZ6qyrI46v5aZnylXA FV/lHNXBVwg2A2h5lP9EFhOZWKxLz22Jwn7q0HHwYC1Atu/dUvblLw1ArGhcTUFz/7u6 tYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701369866; x=1701974666; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=upiPnSdDPUq7hHtl9SwPR71HvOH0YDjoF8X3pVlx4do=; b=ioM77lkCvGL1Pnuq0fd7Z/reolCLwH/tddsSfyaP3rkYJoO6dovzrV2jQGjC/YKlZj rlcpZQuzFuaCcLqkiXMFjVOvNuSH6gFzfJtoiYHC8dyuLpMw2utiEqCuNQILb7dGqSbk eojZNKVLhYJrVkAqRc4S/BIgDnayeznsrQ2PfMsRtT0a4BDfG4ktQpK8ETiwMOmCWscI BDQtAJSBBUArf2+7XdwJrvWQnjfXrjEduC9j9KxcdiSOnPYgt2KIGFfHWHGmzl4K8orv 6Cm8fJCfqJD/55crAVAyC/I4cFrOpAEnR4CEFKBJmmsPjgB0+kJEHswY8vH8kPez/pYr +/EQ== X-Gm-Message-State: AOJu0YxXOWPGTw5LLNqVurH9be6aURd0OClbX9E1GAQyIH6c2rcWoEQG Di1Yfewot9/p/MkYHL96jRDssnUnMeoVhA== X-Received: from shakeelb.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:262e]) (user=shakeelb job=sendgmr) by 2002:a05:690c:2e04:b0:5d3:cca8:1d59 with SMTP id et4-20020a05690c2e0400b005d3cca81d59mr26337ywb.5.1701369866502; Thu, 30 Nov 2023 10:44:26 -0800 (PST) Date: Thu, 30 Nov 2023 18:44:24 +0000 In-Reply-To: <20231130153658.527556-1-schatzberg.dan@gmail.com> Mime-Version: 1.0 References: <20231130153658.527556-1-schatzberg.dan@gmail.com> Message-ID: <20231130184424.7sbez2ukaylerhy6@google.com> Subject: Re: [PATCH 0/1] Add swappiness argument to memory.reclaim From: Shakeel Butt 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 , Muchun Song , Andrew Morton , David Hildenbrand , Matthew Wilcox , Huang Ying , Kefeng Wang , Peter Xu , "Vishal Moola (Oracle)" , Yue Zhao , Hugh Dickins Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 10:44:37 -0800 (PST) On Thu, Nov 30, 2023 at 07:36:53AM -0800, Dan Schatzberg wrote: > (Sorry for the resend - forgot to cc the mailing lists) > > This patch proposes augmenting the memory.reclaim interface with a > swappiness= argument that overrides the swappiness value for that instance > of proactive reclaim. > > Userspace proactive reclaimers use the memory.reclaim interface to trigger > reclaim. The memory.reclaim interface does not allow for any way to effect the > balance of file vs anon during proactive reclaim. The only approach is to adjust > the vm.swappiness setting. However, there are a few reasons we look to control > the balance of file vs anon during proactive reclaim, separately from reactive > reclaim: > > * Swapout should be limited to manage SSD write endurance. In near-OOM Is this about swapout to SSD only? > situations we are fine with lots of swap-out to avoid OOMs. As these are > typically rare events, they have relatively little impact on write endurance. > However, proactive reclaim runs continuously and so its impact on SSD write > endurance is more significant. Therefore it is desireable to control swap-out > for proactive reclaim separately from reactive reclaim This is understandable but swapout to zswap should be fine, right? (Sorry I am not following the discussion on zswap patches from Nhat. Is the answer there?)