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=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 8F1ABC433E3 for ; Mon, 17 Aug 2020 14:30:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3722220729 for ; Mon, 17 Aug 2020 14:30:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="qMjHrx7t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3722220729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 900F98D0003; Mon, 17 Aug 2020 10:30:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B29A8D0002; Mon, 17 Aug 2020 10:30:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C73A8D0003; Mon, 17 Aug 2020 10:30:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0048.hostedemail.com [216.40.44.48]) by kanga.kvack.org (Postfix) with ESMTP id 66F7E8D0002 for ; Mon, 17 Aug 2020 10:30:53 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0C94E824556B for ; Mon, 17 Aug 2020 14:30:53 +0000 (UTC) X-FDA: 77160297186.16.ear45_1e10e3727017 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 50FBD100E5A55 for ; Mon, 17 Aug 2020 14:30:47 +0000 (UTC) X-HE-Tag: ear45_1e10e3727017 X-Filterd-Recvd-Size: 3955 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Aug 2020 14:30:46 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id a15so15209016wrh.10 for ; Mon, 17 Aug 2020 07:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=njqeGiWtXLg5+jOB3X5A+tJKa5oFt5uNxmm5GwqrJhw=; b=qMjHrx7t7+r44ug3VoLGOer7utNoQQG6VakgF8M2r1F1bVok4SFkN/vtuqLMQN/+jq in9MgdaZlN/g1nheeMXL0M1J7mEy0Ben0ZovQ/Es3wg1c8xsOXS9Z6p1XfiOBl273060 R5XLxrqxPBXuoAlHrseGf5+k0UeOXGw1BjnIQ= 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:user-agent; bh=njqeGiWtXLg5+jOB3X5A+tJKa5oFt5uNxmm5GwqrJhw=; b=d0qeXivH4ddMJcTHjButpqc4s/BAKOAQX214dnSOn79w5jofJk2DLWh++x3XIXuhgb j62/996yXGRVt4+DkcdZNgMXx94CEXFi72+s+aowqV9kVDEFShF57xXsN+UlragPGo5h STpnKZdsD4SiclbgZN6pBXRzxeGhKP1RN7ejIK8dPGSB9g4vUABrWQovfRO0tKWfYGis 4nufRQSGCqCYlkefMKRTEx3filqbUouZR6zspI7YLMZ77UTbCRka3cSEvt1rlCL2ON03 jWAcN/GCwMR4bmj2uXj0YmBetOTlyDMrwTLYIBPCKI7kgr4aTLswgf5XK0KzdmK+JZld 0/0A== X-Gm-Message-State: AOAM530joGlQAFtQ8rP/6nDIUa5PumXeInV6QYFupNcgFhRqLbaXSF/z jb5jtL4U4YfZOTcJmTQAoaaArg== X-Google-Smtp-Source: ABdhPJwodIZ9VzeppooFZHBp6d/RYmUjf7eNRDcmX5a3kZs1mHhE4oA9pVzsHqo4xWB+RGeWvl0HVQ== X-Received: by 2002:a5d:4d87:: with SMTP id b7mr16755889wru.170.1597674645277; Mon, 17 Aug 2020 07:30:45 -0700 (PDT) Received: from localhost ([2a01:4b00:8432:8a00:63de:dd93:20be:f460]) by smtp.gmail.com with ESMTPSA id z12sm31397694wrp.20.2020.08.17.07.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 07:30:44 -0700 (PDT) Date: Mon, 17 Aug 2020 15:30:44 +0100 From: Chris Down To: Waiman Long Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Vladimir Davydov , Jonathan Corbet , Alexey Dobriyan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 1/8] memcg: Enable fine-grained control of over memory.high action Message-ID: <20200817143044.GA1987@chrisdown.name> References: <20200817140831.30260-1-longman@redhat.com> <20200817140831.30260-2-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200817140831.30260-2-longman@redhat.com> User-Agent: Mutt/1.14.6 (2020-07-11) X-Rspamd-Queue-Id: 50FBD100E5A55 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Astractly, I think this really overcomplicates the API a lot. If these are truly generally useful (and I think that remains to be demonstrated), they should be additions to the existing API, rather than a sidestep with prctl. I also worry about some other more concrete things: 1. Doesn't this allow unprivileged applications to potentially bypass memory.high constraints set by a system administrator? 2. What's the purpose of PR_MEMACT_KILL, compared to memory.max? 3. Why add this entirely separate signal delivery path when we already have eventfd/poll/inotify support, which makes a lot more sense for modern applications?