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 010FDC54FC9 for ; Tue, 21 Apr 2020 16:11:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BFB962068F for ; Tue, 21 Apr 2020 16:11:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFB962068F 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 5BD478E0005; Tue, 21 Apr 2020 12:11:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 593508E0003; Tue, 21 Apr 2020 12:11:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4826B8E0005; Tue, 21 Apr 2020 12:11:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 32DC48E0003 for ; Tue, 21 Apr 2020 12:11:43 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id EFA634FFA for ; Tue, 21 Apr 2020 16:11:42 +0000 (UTC) X-FDA: 76732352844.24.girls04_491f543319d47 X-HE-Tag: girls04_491f543319d47 X-Filterd-Recvd-Size: 4612 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Apr 2020 16:11:42 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id j1so11659222wrt.1 for ; Tue, 21 Apr 2020 09:11:42 -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=7xGOHcB1wdXfLpDSjYFqP5FMVUkbxcEYVFuq7uOGvyw=; b=Ek9N3wUNoRKhNCYv4tdnf5ePgn8E2eEL04GXFOqQPXnvNIAZwYyb9sk81Q1HcnQPK7 XbDpLsehQrw1ZD0H20xs0ibMGkFT0/rPOu4cNa2eHj+IjrkPnAukP1KSPtM2YpM8fs1X 13lpK9bwYyh9RxYvHmmngVMRh/0MCrZguEcDWpxOZ6Q1t7CntZXPlLoWrgMO1HL/HG4O +kxj9QzEak7nYYpssj9y6rqVyJuiIQbrPeNlszMib7DEKxjRJzcDp+uKj/DUidsSSliT JyMzOF+6KyLsfPsFNrcHqNzxamRTDul3rhIDuCj/7lr42RalkMgW+MmgWyitugI/8heq CFgg== X-Gm-Message-State: AGi0Pubem8naWQS9/K5jsul5rLoeNnmrbgp54WHIGpFLUvykfulzQ2EI cmSJMBJeBm9ftCKGwiHtzYw= X-Google-Smtp-Source: APiQypKS8jKnIGiQyPPCQosgOYHv5MHCWZ8AHYPCghFIWT4yfUyjRCRiF6lOgnoHwFYeudLGhF2leQ== X-Received: by 2002:a5d:6945:: with SMTP id r5mr27002238wrw.363.1587485501193; Tue, 21 Apr 2020 09:11:41 -0700 (PDT) Received: from localhost (ip-37-188-130-62.eurotel.cz. [37.188.130.62]) by smtp.gmail.com with ESMTPSA id m8sm4394137wrx.54.2020.04.21.09.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 09:11:40 -0700 (PDT) Date: Tue, 21 Apr 2020 18:11:38 +0200 From: Michal Hocko To: Johannes Weiner Cc: Tejun Heo , Shakeel Butt , Jakub Kicinski , Andrew Morton , Linux MM , Kernel Team , Chris Down , Cgroups Subject: Re: [PATCH 0/3] memcg: Slow down swap allocation as the available space gets depleted Message-ID: <20200421161138.GL27314@dhcp22.suse.cz> References: <20200417193539.GC43469@mtj.thefacebook.com> <20200417225941.GE43469@mtj.thefacebook.com> <20200420164740.GF43469@mtj.thefacebook.com> <20200420170318.GV27314@dhcp22.suse.cz> <20200420170650.GA169746@mtj.thefacebook.com> <20200421110612.GD27314@dhcp22.suse.cz> <20200421142746.GA341682@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200421142746.GA341682@cmpxchg.org> 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 Tue 21-04-20 10:27:46, Johannes Weiner wrote: > On Tue, Apr 21, 2020 at 01:06:12PM +0200, Michal Hocko wrote: [...] > > I am also not sure about the isolation aspect. Because an external > > memory pressure might have pushed out memory to the swap and then the > > workload is throttled based on an external event. Compare that to the > > memory.high throttling which is not directly affected by the external > > pressure. > > Neither memory.high nor swap.high isolate from external pressure. I didn't say they do. What I am saying is that an external pressure might punish swap.high memcg because the external memory pressure would eat up the quota and trigger the throttling. It is fair to say that this externally triggered interference is already possible with swap.max as well though. It would likely be just more verbose because of the oom killer intervention rather than a slowdown. > They > are put on cgroups so they don't cause pressure on other cgroups. Swap > is required when either your footprint grows or your available space > shrinks. That's why it behaves like that. > > That being said, I think we're getting lost in the implementation > details before we have established what the purpose of this all > is. Let's talk about this first. Thanks for describing it in the length. I have a better picture of the intention (this should have been in the changelog ideally). I can see how the swap consumption throttling might be useful but I still dislike the proposed implementation. Mostly because of throttling of all allocations regardless whether they can contribute to the swap consumption or not. -- Michal Hocko SUSE Labs