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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 018A6C2D0EF for ; Fri, 17 Apr 2020 16:54:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B604320771 for ; Fri, 17 Apr 2020 16:54:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B604320771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B8308E0037; Fri, 17 Apr 2020 12:54:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 341E18E0023; Fri, 17 Apr 2020 12:54:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 230BB8E0037; Fri, 17 Apr 2020 12:54:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0095.hostedemail.com [216.40.44.95]) by kanga.kvack.org (Postfix) with ESMTP id 08E948E0023 for ; Fri, 17 Apr 2020 12:54:46 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CADBD2C1E for ; Fri, 17 Apr 2020 16:54:45 +0000 (UTC) X-FDA: 76717946130.02.cow59_46a86d465001b X-HE-Tag: cow59_46a86d465001b X-Filterd-Recvd-Size: 4364 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Apr 2020 16:54:45 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id t14so3799714wrw.12 for ; Fri, 17 Apr 2020 09:54:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FW0vSyyo0qvVOuBi7CQAsNq0t4MXGsecyCjJ8GqgamE=; b=jDQ7/K7KVCb3sGR5xF2MML2FBqFLBIvMhpxZqQJEb7wNLuPJqXZoKMuKfK9y/3r+GH Lo1sAYLuSkH9XmoCgW1+jebk99nFM2lJdwt1DWK36bGsDvat1V4zoDnilVjLYs7wAPuo D7jUBec92pcbNaRaW8mogMcbeL8H+ftrXQrivsagZ3oBLK+s3CF9PG/iJqG9GmTP4HsJ /B/tPCxPSvDYLWc5g8aq+f/OPfB5Xk0Prksd4oZmq9URQ0b9ZWCvN60zIvkIBVYCc4HO UjBBrh++LmLyLjwZogaBKpTbkqRTilEM78OBL95XdT8aNKmMcXu3qwXqYebhutN1WQIH rRVw== X-Gm-Message-State: AGi0Pua56mypjZO1mVBJqiOVcUIX/9BEzPS1Af2hMIYTDftnrmxiIpzE aDn2q0ZiPZgbikt4/oQ+9Y8= X-Google-Smtp-Source: APiQypLDd3ekreCu05R3EPJB+e14qhGROBncfuiFEbfkX5EiySZqM1NiQIoSNMIoKwphZdkSVXX5Pw== X-Received: by 2002:a5d:6582:: with SMTP id q2mr4898992wru.343.1587142484406; Fri, 17 Apr 2020 09:54:44 -0700 (PDT) Received: from localhost (ip-37-188-130-62.eurotel.cz. [37.188.130.62]) by smtp.gmail.com with ESMTPSA id 91sm19080391wra.37.2020.04.17.09.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2020 09:54:43 -0700 (PDT) Date: Fri, 17 Apr 2020 18:54:42 +0200 From: Michal Hocko To: Shakeel Butt Cc: Alex Shi , Andrew Morton , Johannes Weiner , Linux MM , Cgroups Subject: Re: [PATCH 1/2] memcg: folding CONFIG_MEMCG_SWAP as default Message-ID: <20200417165442.GT26707@dhcp22.suse.cz> References: <1587134624-184860-1-git-send-email-alex.shi@linux.alibaba.com> <20200417155317.GS26707@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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. 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. -- Michal Hocko SUSE Labs