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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 13886C3F2CD for ; Thu, 5 Mar 2020 15:39:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C89632073B for ; Thu, 5 Mar 2020 15:39:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="st265gUV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89632073B 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 792576B0005; Thu, 5 Mar 2020 10:39:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7425E6B0006; Thu, 5 Mar 2020 10:39:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 657446B0007; Thu, 5 Mar 2020 10:39:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id 4C4D86B0005 for ; Thu, 5 Mar 2020 10:39:51 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4E9E7180AD802 for ; Thu, 5 Mar 2020 15:39:51 +0000 (UTC) X-FDA: 76561718982.21.gate17_731201971e22f X-HE-Tag: gate17_731201971e22f X-Filterd-Recvd-Size: 4930 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 5 Mar 2020 15:39:50 +0000 (UTC) Received: by mail-qv1-f49.google.com with SMTP id r8so2596361qvs.12 for ; Thu, 05 Mar 2020 07:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PHq9PaeVGtyudk0wOTWZY80KOkaKDj/XvNUNHTcU/hU=; b=st265gUVi6yGmxIN+nyLlX9bI0TZYas/Sz1TACzRXEO0WsuHyBBHN+VJCFf49CjWOK O/Kqo75c9VQGL/OBHP+jKGyGvguT1v4JDGpgwSqbi8BlLcePzstMqZu3B7ljA0i0m1zn Pn9/sKYplZJfqEPkySASJ2XYQCboTZZSQIgqYReLFiukIgvov+qJnOdVPb52daw8SipC ZKlqq0Xs0QXTo/Q79Lijg7YZCvpe9D/p1yf1i+oTH0TeNV3ju4wZSgYs15DjwMm4QIdB GJwSOhKCZ08ksO0b2LR2UOP0tHQN+hmJwB0KKr9R8E1XQykMTfuObZfEeVhcEQ9KRscb zAVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=PHq9PaeVGtyudk0wOTWZY80KOkaKDj/XvNUNHTcU/hU=; b=T6dEJIvYr1UDdmlx3rQz/CqxFQ0igIrUoQoPbKFNnj0HZPZBOn/ip8DFpzxlvFmA9q 7V5rX459nGhUMW3xcR5L7iQEbe+Iz5KGlFLQPxjQw0PbZxlBdkKT3y3aM8w3htTFOGkk lqs/moaQ1tbUl5WL+tNCgIY/vpuPb3DvyTJTKwqoaehZ2fydViF345/KiQkRlLN1E03+ zoB3Ot2nzljnQzQjj1XSRPutPeaGQedv0yFqUonjH8Sj3BQGGyxLna/8aXEW7cx+KUor 2kmyLvkUBTxHckdTLJGJzjLjc6cLKCCvoyajPY1MY5loBUJzSt9lSfZYIPTy9yKPIeZN tPGQ== X-Gm-Message-State: ANhLgQ0lkQCOBZWXJLbwyt5lqw9LginN53mnaXBxokSrHka/NKatTIJu kGAR9+NbTxts8DCG45ON+Tg= X-Google-Smtp-Source: ADFU+vsusAzsBilBFjI2IBRT4Sfk+DxKTs5DRQsO4Wm7pe1X3aYRLzAkICbGN7BYLfq09B8rXsH7ng== X-Received: by 2002:ad4:58ea:: with SMTP id di10mr2868486qvb.101.1583422789703; Thu, 05 Mar 2020 07:39:49 -0800 (PST) Received: from localhost ([2620:10d:c091:480::1:e7c7]) by smtp.gmail.com with ESMTPSA id u49sm15111060qtj.42.2020.03.05.07.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 07:39:49 -0800 (PST) Date: Thu, 5 Mar 2020 10:39:48 -0500 From: Tejun Heo To: Benjamin Berg Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner Subject: Re: Memory reclaim protection and cgroup nesting (desktop use) Message-ID: <20200305153948.GB6939@mtj.thefacebook.com> References: <20200304163044.GF189690@mtj.thefacebook.com> <4d3e00457bba40b25f3ac4fd376ba7306ffc4e68.camel@sipsolutions.net> <20200305145554.GA5897@mtj.thefacebook.com> <7ce3aa9cf6f7501ce2ce6057a03a40cd5e126efd.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ce3aa9cf6f7501ce2ce6057a03a40cd5e126efd.camel@sipsolutions.net> 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: Hello, Benjamin. On Thu, Mar 05, 2020 at 04:27:19PM +0100, Benjamin Berg wrote: > > Changing memory limits dynamically can lead to pretty abrupt system > > behaviors depending on how big the swing is but memory.low and io/cpu > > weights should behave fine. > > Right, we'll need some daemon to handle this, so we could even smooth > out any change over a period of time. But it seems like that will not > be needed. I don't expect we'll want to change anything beyond > memory.low and io/cpu weights. Yeah, you don't need to baby memory.low and io/cpu weights at all. > > Sounds great. In our experience, what would help quite a lot is using > > per-application cgroups more (e.g. containing each application as user > > services) so that one misbehaving command can't overwhelm the session > > and eventually when oomd has to kick in, it can identify and kill only > > the culprit application rather than the whole session. > > We are already trying to do this in GNOME. :) Awesome. > Right now GNOME is only moving processes into cgroups after launching > them though (i.e. transient systemd scopes). Even just that would be plenty helpful. > But, the goal here is to improve it further and launch all > applications directly using systemd (i.e. as systemd services). systemd > itself is going to define some standards to facilitate everything. And > we'll probably also need to update some XDG standards. > > So, there are some plans already, but many details have not been solved > yet. But at least KDE and GNOME people are looking into integrating > well with systemd. Sounds great. Please let us know if there's anything we can help with. Thanks. -- tejun