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 X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26CA2C2D0EF for ; Fri, 17 Apr 2020 17:36:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DFB76207FC for ; Fri, 17 Apr 2020 17:36:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Vwy15InW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFB76207FC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8C9F48E003D; Fri, 17 Apr 2020 13:36:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 87ABC8E0023; Fri, 17 Apr 2020 13:36:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 768AB8E003D; Fri, 17 Apr 2020 13:36:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 5EABD8E0023 for ; Fri, 17 Apr 2020 13:36:07 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1D8C1181AEF31 for ; Fri, 17 Apr 2020 17:36:07 +0000 (UTC) X-FDA: 76718050374.01.love37_8cac8d6d71821 X-HE-Tag: love37_8cac8d6d71821 X-Filterd-Recvd-Size: 5018 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Apr 2020 17:36:06 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id q22so2911930ljg.0 for ; Fri, 17 Apr 2020 10:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hg6IIRdiW7K53TeUTBkQvnSYbhXlq293hVwvftTtBpY=; b=Vwy15InWoEv70r74M82Y4LbZS+npes2VXDKaQjvNzJCyqXXde6NHxQmepyDO1vO1Ed QDNopRM8cYIGGVlIEjKd+dGyO5LuF1d+Q2N/vxATnmmxvpcx+M0krPVJ1FqlJ7cqNwKo abPmzqwu2buigwodzTtOZwOtMqDaU+rl6ytqqrGgQCavM2QpTg5jlHsA4MT8wIDgkznQ JW2QXCTMfMZAsl8/CeoVzsVwyLAzmmoN1DUqVnO9Xr2rEQjGt+dDHagHVSfVGsFNJCTC n2/DA4IBZ9iunwXNNtnrGUlBMZeYdzqgKOc97c2kAxzVrGkAkc9ui2UYAmYpuHqRWJpF UdGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Hg6IIRdiW7K53TeUTBkQvnSYbhXlq293hVwvftTtBpY=; b=FsPuzQqNNzydCE+1l6T8ANDwObzruhGUBeRP8ryFyaU44vQtPaHX5qGscGv1Xdw/Cr DVvG0+6O99E4/2fHHI0oQ3GywXHY/4VphRBtdTtqVjkobSRfmb248Ix1qZ6U4ELptrnr 89Ji/jqRM3n1Hm4JMlJF9bU1IpJ+BM7BDF1fBPCh8aL82SCWxV0/WOWtMQ18+WJR/4gt oA+GMfK1FrAXtmdABhT1Rm7u9dVNAlc46mFl77l4h6imnuc36vTLgaxvHIxBQLNNtyMM ea82gMBpFPqR1Qs1TTAnAFz2sSHoPANIwJyygCdVzjHsngHBFPkE1EMBj6bEXU6OsbT6 r5hA== X-Gm-Message-State: AGi0Pub6omT1iSRySZrwQvyUv5AM1s8wcNyatSztmHPkufMQDMORe/ki Ghw7JmC/xST3QnhPw++jkqN+M55GCcwPwAhp0bm3OA== X-Google-Smtp-Source: APiQypIr3P5caRZIgT/06laKGzVvRHT8utRwdQ/qnb1JlACKzpb0/PCRDtuT64YI3+taEpCR28vdyYl1i7/WEFf3KvE= X-Received: by 2002:a05:651c:1209:: with SMTP id i9mr2596479lja.250.1587144964706; Fri, 17 Apr 2020 10:36:04 -0700 (PDT) MIME-Version: 1.0 References: <1587134624-184860-1-git-send-email-alex.shi@linux.alibaba.com> <20200417155317.GS26707@dhcp22.suse.cz> <20200417165442.GT26707@dhcp22.suse.cz> In-Reply-To: <20200417165442.GT26707@dhcp22.suse.cz> From: Shakeel Butt Date: Fri, 17 Apr 2020 10:35:53 -0700 Message-ID: Subject: Re: [PATCH 1/2] memcg: folding CONFIG_MEMCG_SWAP as default To: Michal Hocko Cc: Alex Shi , Andrew Morton , Johannes Weiner , Linux MM , Cgroups Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Apr 17, 2020 at 9:54 AM Michal Hocko wrote: > > On Fri 17-04-20 09:41:04, Shakeel Butt wrote: > > On Fri, Apr 17, 2020 at 9:03 AM Michal Hocko wrote: > > > > > > On Fri 17-04-20 22:43:43, Alex Shi wrote: > > > > This patch fold MEMCG_SWAP feature into kernel as default function. That > > > > required a short size memcg id for each of page. As Johannes mentioned > > > > > > > > "the overhead of tracking is tiny - 512k per G of swap (0.04%).' > > > > > > > > So all swapout page could be tracked for its memcg id. > > > > > > I am perfectly OK with dropping the CONFIG_MEMCG_SWAP. The code that is > > > guarded by it is negligible and the resulting code is much easier to > > > read so no objection on that front. I just do not really see any real > > > reason to flip the default for cgroup v1. Why do we want/need that? > > > > > > > Yes, the changelog is lacking the motivation of this change. This is > > proposed by Johannes and I was actually expecting the patch from him. > > The motivation is to make the things simpler for per-memcg LRU locking > > and workingset for anon memory (Johannes has described these really > > well, lemme find the email). If we keep the differentiation between > > cgroup v1 and v2, then there is actually no point of this cleanup as > > per-memcg LRU locking and anon workingset still has to handle the > > !do_swap_account case. > > All those details really have to go into the changelog. I have to say > that I still do not understand why the actual accounting swap or not > makes any difference for per per-memcg LRU. Here is Johannes explanation: https://lore.kernel.org/linux-mm/20200413180725.GA99267@cmpxchg.org/ > Especially when your patch You mean Alex's patch. > keeps the kernel command line parameter still in place. > > Anyway, it would be much more simpler to have a patch that drops the > CONFIG_MEMCG_SWAP and a separate one which switches the default > beahvior. I am not saying I am ok with the later but if the > justification is convincing then I might change my mind. > -- > Michal Hocko > SUSE Labs