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.3 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,URIBL_BLOCKED,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 CBE6DC38A29 for ; Sat, 18 Apr 2020 16:18:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 685EC206D9 for ; Sat, 18 Apr 2020 16:18:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NXZvRArV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 685EC206D9 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 D31598E0005; Sat, 18 Apr 2020 12:18:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CE1168E0003; Sat, 18 Apr 2020 12:18:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF7568E0005; Sat, 18 Apr 2020 12:18:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id ABBF38E0003 for ; Sat, 18 Apr 2020 12:18:03 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 76FA06882 for ; Sat, 18 Apr 2020 16:18:03 +0000 (UTC) X-FDA: 76721482446.09.crack76_636b8fcb29738 X-HE-Tag: crack76_636b8fcb29738 X-Filterd-Recvd-Size: 5688 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Sat, 18 Apr 2020 16:18:03 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id 198so4337491lfo.7 for ; Sat, 18 Apr 2020 09:18:02 -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:content-transfer-encoding; bh=z4OTNUJkzQtYUty1sAa6R81HMXYdIuuIp9Q+IqWjDtA=; b=NXZvRArVIZGm0xOMHJ1AxybeCL5vwEl7QGKrNf5KPO4fo/pLYoqHTrS+QYklCrr/tJ kjmK52K679KLevGapTyPPSjNgma/HF5WRfjVY1kMECVHYitPVWUMuoVn50ijtVyavVUK +1oqBVnAmjI/tVx8jbW4O3g4rs9jNbTqFetSVxQEjs5232HwDkp26HInIOsF4whyDjDS alyNAAT1cntk9I75q4GJ1fDeCBLD4CQeiOom9OLWsa+Rpo6Q+rpuVHnmGbRPMcSVI6HU 22r4lWdGBKNm9/AUcT+o+ZlpH3uU4XFQz+tRxacIbbFJRhnf2SISVeo0Vx1bttX/VUyJ tt9g== 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:content-transfer-encoding; bh=z4OTNUJkzQtYUty1sAa6R81HMXYdIuuIp9Q+IqWjDtA=; b=ZOjSe5vSgxkO+zj9nHA57elmQvrP3Iay422aCUN5+u6pRLgNeri35vo5KIojIm3G7q gvyYTW/hFVeszPe0DdQAQWm1P8BJjyT/7zX9GMUCZtctk3yYN4lB1kM+SuboI4oegxyO Z3tHoY69tYrtlZDEjQ27WzwskOz4XKw4/GiLh4jAEpaP5i1DN4ONBJ0NcXWzIFoY8fYf IsQPuFg6gg/rRH1MtVnJBwFWgAfD2yaugwoY9SL9xNfkOyk4khjEVA7vPFWNqk3IB7wQ RSfMpy00yQKkNDpIdVvRFr/e68lNPk7wi7Dv11eeC2DSriSZ/r2jTrlG2TbNb48yB9K/ +K+A== X-Gm-Message-State: AGi0PuYD4a7FiaYbl4dOgCg77QqcwT0KoXYG0h/YzBz1lqTFDzn16eQk VLtSpJ+HeOG8kf2CaqhfNu2MYDayzBqmz9qI5KNdDA== X-Google-Smtp-Source: APiQypJIyZ3j5vmsp3fSr0Pr+YmBi9i1LK4GRlc5vUqryl2lPjuK/9v4ZdtzK52kZiG5AyJxiCs41FYPVrrKRZnOCWY= X-Received: by 2002:a19:5206:: with SMTP id m6mr5272610lfb.33.1587226681359; Sat, 18 Apr 2020 09:18:01 -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: From: Shakeel Butt Date: Sat, 18 Apr 2020 09:17:50 -0700 Message-ID: Subject: Re: [PATCH 1/2] memcg: folding CONFIG_MEMCG_SWAP as default To: Alex Shi Cc: Michal Hocko , Andrew Morton , Johannes Weiner , Linux MM , Cgroups Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Sat, Apr 18, 2020 at 6:45 AM Alex Shi wrote= : > > > > =E5=9C=A8 2020/4/18 =E4=B8=8A=E5=8D=8812:54, Michal Hocko =E5=86=99=E9=81= =93: > > 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 mention= ed > >>>> > >>>> "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. Especially when your 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. > > > > Hi Shakeel & Michal, > > Thanks for all comments! > > Yes, we still need to remove swapaccount from cmdline and keep swap_cgrou= p.id > permanently. Just I don't know if this patch could fit into the details o= f > Johannes new solution. > > Anyway, I will send out v2 for complete memcg id record patch, just in ca= se > if they are useful. > I would recommend waiting for Johannes patch series. The cleanup this patch is doing makes more sense to be part of Johannes's lrucare cleanup series. thanks, Shakeel