Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp803242pxa; Wed, 12 Aug 2020 13:49:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOrhDaFPTWz5KRK1OEr2XoY8G/D9ar1iXeacs5ehdFCncBaI7b9BIxokCjPA2UpyD8qDZ4 X-Received: by 2002:a17:907:4064:: with SMTP id nl4mr1680843ejb.342.1597265346467; Wed, 12 Aug 2020 13:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597265346; cv=none; d=google.com; s=arc-20160816; b=naiyDcIrgY0kpMeYhH/27JQUtM++pSCmhaH/3ZGmiER3gida+LIcz4IHnSNfka/wyH YLkhDbMC570vIScJ5S+Duvb/UofBsyfxuqMBNAqgeGO9dCILEa10QKRNiyNhSScpWv5s Xr2p6r0kE3jWUbmnoESXmGbFAUe9EZ2OcjKaqU7LrgUji89i3QUv6/CFTevnLARJtYkk G3hNTWav148spb11p5taw6bQby1QMyUHRZ2b/NV1YDEw/Y3n1xv/PgxetxCGKNAoYReR 6q9Vn4hjsPlxosGlkqAbrX5iI03iylu7oOXcHKLlzxLSlLK76FgZhaeoli7b8FqVbdS3 FURA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YMlwqJSUWt1i6F6iEK9tCz9nN1m89EegznfYz1dxWM0=; b=iM9QWcR+Co9tx4enAbEpA8/u82BNlXcVU7tZSLmsT2e3p5hgQ320FOE89R8dw+v8kO HMFVRlEMey/4b4i3XbnPHzdMLjC28mXAm9+IzvtmlKPnmkXNQ5BjUDzaTK6eiOFJYKOb 4qRZwCC0dA4V5ja0Vd7mwASoX96NbfYNiVkFNY+YJn+clXPRxOzchkv36g8uYwkIx18P WbaPJxd3FM8AXMQonx19Mvuj25YLThMvaWsjoTnBkbiRtrf3UxSkv4RceGEpYaNMCzDc CLwqNEm6fJLbzj+bRbXyZYFO5BeaU12trrDOQhI+TN3oWX+f1XoYXjjhn0rIb5uNSld3 lf6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Is7wIv1r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si1997110ejx.645.2020.08.12.13.48.42; Wed, 12 Aug 2020 13:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Is7wIv1r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbgHLUry (ORCPT + 99 others); Wed, 12 Aug 2020 16:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbgHLUrx (ORCPT ); Wed, 12 Aug 2020 16:47:53 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C0AC061384 for ; Wed, 12 Aug 2020 13:47:53 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id m22so3764616ljj.5 for ; Wed, 12 Aug 2020 13:47:52 -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=YMlwqJSUWt1i6F6iEK9tCz9nN1m89EegznfYz1dxWM0=; b=Is7wIv1rlekdHNR2ib1o3cMo7WVrmIWWC+LnWxvZAwG92uGCGXtX+YtRbd5ROD2lgh Mpge5B1FXl6BaNj26hyaOzPPnA/QNeUNdczVSHNUJaIOR0yCrpT0DSqce2Ygglc5BYhQ ro0sx555IRcMIxwNlNfuI02xPmAvGNvYsb++W590hadWc97jyGgtLkvZHj2gF8ZOzG++ n115EKAR5i7tUZQBbP7f9U2RCDZrj6qoW32soFk4Ha4K37OBfgrq3+Bw86zdjTYqLCu4 ZPqFwWhZ0aQtyUiu/o3CIhSt6o8RAzjriZE/ElCU67i76Ue+4gB1Brnbzon9m2IGI/Lx /H7Q== 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=YMlwqJSUWt1i6F6iEK9tCz9nN1m89EegznfYz1dxWM0=; b=czVrWi1I7vLT0SzbvVHKJTqRTIkjWEoogpGrmGLktiu+IcrKv18oi8xfOxLDkQF3kK xIkJC5XehG3VApAkR8r6HxLRZP4kXIexTMGRFa1mAc1rour1QKqx6V7H0QDateM4rb+w Y6oOLSe/XW5oBD7hpMnRn1tuaB1usnF4Nn8Byaxs6BE4zXHkm+1E5rzIIyXGrtwrHEy4 QdJRDRVLko8rHpIvw0vd4Ie4PCmFmG68MY2TiiRnd00R2JnHELEAvlWO5pvmNkPGd7vv 0l0ogLB3wvlVlmQfgnAugwDJxSqcgwzT+tMuh8CexEFu7N30kNAczV1bc7GWvUyq6pvd twKg== X-Gm-Message-State: AOAM533KpyqgbjAk5JAZ5AWMclyUYd6Tz3Alt8HmCU8/Ozt+vHj7ieB3 moZIQMsQfr6FaRkTXg6bGz2B7C+Z6xP7N5wQ99AWKg== X-Received: by 2002:a05:651c:330:: with SMTP id b16mr461290ljp.77.1597265270865; Wed, 12 Aug 2020 13:47:50 -0700 (PDT) MIME-Version: 1.0 References: <20200702152222.2630760-1-shakeelb@google.com> <20200703063548.GM18446@dhcp22.suse.cz> <20200707121422.GP5913@dhcp22.suse.cz> <20200811173626.GA58879@blackbook> In-Reply-To: <20200811173626.GA58879@blackbook> From: Shakeel Butt Date: Wed, 12 Aug 2020 13:47:39 -0700 Message-ID: Subject: Re: [RFC PROPOSAL] memcg: per-memcg user space reclaim interface To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Michal Hocko , Johannes Weiner , Roman Gushchin , Yang Shi , David Rientjes , Greg Thelen , Andrew Morton , Linux MM , LKML , Cgroups Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On Tue, Aug 11, 2020 at 10:36 AM Michal Koutn=C3=BD wrot= e: > > Hi Shakeel. > > On Tue, Jul 07, 2020 at 10:02:50AM -0700, Shakeel Butt wrote: > > > Well, I was talkingg about memory.low. It is not meant only to protec= t > > > from the global reclaim. It can be used for balancing memory reclaim > > > from _any_ external memory pressure source. So it is somehow related = to > > > the usecase you have mentioned. > > > > > > > For the uswapd use-case, I am not concerned about the external memory > > pressure source but the application hitting its own memory.high limit > > and getting throttled. > FTR, you can transform own memory.high into "external" pressure with a > hierarchy such as > > limit-group memory.high=3DN+margin memory.low=3D0 > `- latency-sensitive-group memory.low=3DN > `- regular-group memory.low=3D0 > > Would that ensure the latency targets? > My concern was not "whom to reclaim from" but it was "If I use memory.high for reclaim, processes running in that memcg can hit memory.high and get throttled". However Roman has reduced the window where that can happen. Anyways I will send the next version after this merge window closes. Shakeel