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=-4.0 required=3.0 tests=INCLUDES_PATCH, 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 DE583CA90AF for ; Wed, 13 May 2020 08:38:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A9C0920740 for ; Wed, 13 May 2020 08:38:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9C0920740 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 35E84900116; Wed, 13 May 2020 04:38:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 30F549000F3; Wed, 13 May 2020 04:38:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2243C900116; Wed, 13 May 2020 04:38:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id 09D729000F3 for ; Wed, 13 May 2020 04:38:18 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B77C72471 for ; Wed, 13 May 2020 08:38:17 +0000 (UTC) X-FDA: 76811043834.21.teeth96_e2dccd4d740b X-HE-Tag: teeth96_e2dccd4d740b X-Filterd-Recvd-Size: 3686 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 May 2020 08:38:17 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id m24so16002839wml.2 for ; Wed, 13 May 2020 01:38:17 -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=oFsa0LErIymXz9nEeCHbYZeDaAUm0vYvIFciXQM1UZ0=; b=lCcYZ6aiHRaqmxhaxcEfm6hSOMm6GCTXs8bZTaYkBaHy3vJyctx3qUFzxlMymDfMaV edhHo87p0axmbIoUcj78glcyeq3JHMDmjdV6Hl4iosiLcvpW1t3sr8QOHuq+VuNgqDu7 PB/a2sdoHC1G1x7ETwAx59gRv3tuPVICBrPPz84kRKN3R/FaAcvBVli+pSUz9g+8LrO3 hWcMQRh6OCTdxt3G28BKqGMb++nxQDaPL6UcTd7KMnqW1Rcr4Z0hnvFx3je85KFYdtKN ONr5yuk7Umesop/WjZQD3NhRI3cDsx+QIEhk+DK3bTpY+S9pq2DN+kxa+i9ItDgGaaIn mvcQ== X-Gm-Message-State: AGi0PubLYxMk4a2/fFsHbcojLgxOoqJDz4g1Bw0FFzCshbm67opdRo5w NSTf6wNlTBatMKP+iq45wHI= X-Google-Smtp-Source: APiQypLN3NH5oB3pG5WZOnYlbIG9ZnAPA9fHndBOkVLpR2E+bgJBOtS0RvbIZ9Ok5yWxJrSqLWPaAw== X-Received: by 2002:a7b:cd04:: with SMTP id f4mr40091267wmj.3.1589359096391; Wed, 13 May 2020 01:38:16 -0700 (PDT) Received: from localhost (ip-37-188-249-36.eurotel.cz. [37.188.249.36]) by smtp.gmail.com with ESMTPSA id j2sm26800817wrp.47.2020.05.13.01.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 01:38:15 -0700 (PDT) Date: Wed, 13 May 2020 10:38:14 +0200 From: Michal Hocko To: Jakub Kicinski Cc: akpm@linux-foundation.org, linux-mm@kvack.org, kernel-team@fb.com, tj@kernel.org, hannes@cmpxchg.org, chris@chrisdown.name, cgroups@vger.kernel.org, shakeelb@google.com Subject: Re: [PATCH mm v2 3/3] mm: automatically penalize tasks with high swap use Message-ID: <20200513083814.GT29153@dhcp22.suse.cz> References: <20200511225516.2431921-1-kuba@kernel.org> <20200511225516.2431921-4-kuba@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200511225516.2431921-4-kuba@kernel.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 Mon 11-05-20 15:55:16, Jakub Kicinski wrote: > diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst > index 5f12f203822e..c60226daa193 100644 > --- a/Documentation/admin-guide/cgroup-v2.rst > +++ b/Documentation/admin-guide/cgroup-v2.rst > @@ -1374,6 +1374,22 @@ PAGE_SIZE multiple when read back. > The total amount of swap currently being used by the cgroup > and its descendants. > > + memory.swap.high > + A read-write single value file which exists on non-root > + cgroups. The default is "max". > + > + Swap usage throttle limit. If a cgroup's swap usage exceeds > + this limit, all its further allocations will be throttled to > + allow userspace to implement custom out-of-memory procedures. > + > + This limit marks a point of no return for the cgroup. It is NOT > + designed to manage the amount of swapping a workload does > + during regular operation. Compare to memory.swap.max, which > + prohibits swapping past a set amount, but lets the cgroup > + continue unimpeded as long as other memory can be reclaimed. > + > + Healthy workloads are not expected to reach this limit. > + Btw. I forgot to mention that before but you should also add a documentation for the swap high event to this file. -- Michal Hocko SUSE Labs