Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15789653ybl; Tue, 31 Dec 2019 15:18:54 -0800 (PST) X-Google-Smtp-Source: APXvYqz5xqMAKSuXjgWGkp9bFguFrYwlCCgD3wTPhUaFAzn2lEgU+4DYyvoW3GEW9R5ip1IWsU/9 X-Received: by 2002:aa7:cfd5:: with SMTP id r21mr79051632edy.248.1577834334036; Tue, 31 Dec 2019 15:18:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577834334; cv=none; d=google.com; s=arc-20160816; b=hjgwhznEJiJOGzqaHoyTpIyAZLjSmgrHGKfccax1uame2gSVFyd466xe/zjtX/dJxd zKxPBAJ66RcABy6qvRNinN7f+lICQrH95F6SkUBo6nz0IZQCkPKFmNDI661uCMTpsxMX eLS4JgZEMXciEPvI+YRtq3pvkegFZPGjeZWhd22nfQutdEcHQOoD2BMFwOe14xt5pv1g 2bycAqUD55ZVDS0DXsHy6R9QzLxqtqV5ZGc1rWeCWKfbno7f03C06xO3zy9qASohDhd9 EHyuGs0muPesZi6oYI7mKXqhZ31FVc/HdFHUh3JjIDCCFA8Eweu2kTXWswlRCq/YMZNC Se9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=pXp/oP0nEbf3reSpM2gCdFHx2Ku9UAbE7BpyFlN0JGw=; b=dEqXd1Jb5bx2lrmLcjaEJyBJe4XphesB7w80urUjLY3a5genLZZeNQDQeLGzdm8sF7 ntI5um7Qlm2yXjXIqODKolrnz0RPug2zbT66sos1ozxGzZ0YmYiCGSCwoKIoe1xraEVF Nj4Q0ENjAt7yOw2X+pQUZKsDtdXiYf9YelBskSPSOVBzwFUzozgpPX0DrnajeDDiQe5I 4c8qOjnVOIBQAVyHziS2C4zrDCFWgbF1nzAFCEMe1NnmSPTxWg6ovLlsQMrkQnGIZe6j LPN72CnYAJ9BHo90ekIqsS+lLA/AaYYrpT1rtBhp5D0E2g6/9OYlcGo4WLIuHEXFDy8g 0TWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H8M60uzp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si32441609ejj.4.2019.12.31.15.18.15; Tue, 31 Dec 2019 15:18:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H8M60uzp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbfLaXQX (ORCPT + 99 others); Tue, 31 Dec 2019 18:16:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:34530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727085AbfLaXQX (ORCPT ); Tue, 31 Dec 2019 18:16:23 -0500 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1117B206E6; Tue, 31 Dec 2019 23:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577834182; bh=T1TP9OS5NPYDy/yeJXg2yUzaWY4igVKAIiTXgalOvCw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=H8M60uzpbqD2/72X0HwITZluZ6clbGOPd0ijAz1VhVr5Z3LM/3znM7GQRZUzyjNBR xvZ7i5CxutBqkLsKTIoT323gNM9oT82/jm2X97XHDvrHW2KzDaxjgLPiE3uwaTW9W9 rk/vwiiwutPleNfxOzsVVXKrv0aHHhiWL2fqqikU= Date: Tue, 31 Dec 2019 15:16:21 -0800 From: Andrew Morton To: Hui Zhu Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Hui Zhu Subject: Re: [RFC] memcg: Add swappiness to cgroup2 Message-Id: <20191231151621.8f1565ef8736233dbf60bca7@linux-foundation.org> In-Reply-To: <1577252208-32419-1-git-send-email-teawater@gmail.com> References: <1577252208-32419-1-git-send-email-teawater@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Dec 2019 13:36:48 +0800 Hui Zhu wrote: > Even if cgroup2 has swap.max, swappiness is still a very useful config. > This commit add swappiness to cgroup2. > > ... > > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -7143,6 +7143,11 @@ static struct cftype swap_files[] = { > .file_offset = offsetof(struct mem_cgroup, swap_events_file), > .seq_show = swap_events_show, > }, > + { > + .name = "swappiness", > + .read_u64 = mem_cgroup_swappiness_read, > + .write_u64 = mem_cgroup_swappiness_write, > + }, > { } /* terminate */ > }; There should be a Documentation/ update with this?