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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42C9BC433F5 for ; Fri, 1 Apr 2022 21:52:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC4416B0071; Fri, 1 Apr 2022 17:51:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B73858D0002; Fri, 1 Apr 2022 17:51:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3B528D0001; Fri, 1 Apr 2022 17:51:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 964776B0071 for ; Fri, 1 Apr 2022 17:51:54 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6CEA125389 for ; Fri, 1 Apr 2022 21:51:44 +0000 (UTC) X-FDA: 79309657728.15.37A3914 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by imf23.hostedemail.com (Postfix) with ESMTP id 85DDE14001D for ; Fri, 1 Apr 2022 21:51:43 +0000 (UTC) Received: by mail-qk1-f181.google.com with SMTP id v13so3221670qkv.3 for ; Fri, 01 Apr 2022 14:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=M11X+y56T/1F4fHNq5auQu00TlcNFHXDYbY/RsKteOE=; b=c99U3qkEZHhIEc7ajhsZpxJqU4l3cAi/NL5cixEEbUy7C6XoKYSnxPRQBhDUZTmgW3 CdaWd0g1Bby07fp/jIyG1J3+95Fzgp/LQjARdfXbFBUkPZqyz7od9HefPpO8KeihaS2q AlvwqXjClIn82Ow/qtMIqMEuy5CmEAoKGT4g+DwYdedW4fXEssdeJNdj65X6UuIG3Gye uo1vCgIZbKpkm4ga/owAOGsj/OUuejccn7DdhxMou/c44twsSE4v7r5tzRnQ3jKJpheT vGlmiuBEeWfJ6E0nzDdCP0Neo+0FVxArhDDUs374m/wmtChQS97scg1pGgtlfoHSbhwi XX8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=M11X+y56T/1F4fHNq5auQu00TlcNFHXDYbY/RsKteOE=; b=CLnJT3QbJS4vsGk7kJVg+Yw9LZf+3jdHfKkT5bv5a5TiErAvxD2RJ5wm1loSsCj1u7 FfyazL9xmAKk34dzx6KXWynNa0V9kI8GdCuOCpNuUDwS/JG26f2xtJlfnWxGe2QF2Oxu /lUVAp6t4bBei7vN+AB5MR/0Nv8lZci9VRmVfTADRfEIv9VftZEuzWDraaekCpwruUjK zWm69dsn3k9MzWVopFAEtNYo3TKkvPQStc4+bLI/7iwaOMZuIiP59oXr6FY2GcsdNnl4 QyFdSN4IAP08mEtgqVUToqb9iOCICPONEXWCbW7JPhn2bPV3laAaG/8z7KbJtsBfCttv IRVQ== X-Gm-Message-State: AOAM530NpoSh5Vb3ezj21aoqmoC1J1fxWTUzYhmMnDi5YDi9PyB1SkDr RXKeWTEWtZuT7q9RSsa2ByqdSg== X-Google-Smtp-Source: ABdhPJz5e+/qhWGXkOB2Pdg+sYmL/Wm7bmIqKPSDgyhO5CcEvxS029Di2b+ofW5VEbb4r0PJYsKguA== X-Received: by 2002:a05:620a:25a:b0:67d:43a6:8892 with SMTP id q26-20020a05620a025a00b0067d43a68892mr7881250qkn.659.1648849902837; Fri, 01 Apr 2022 14:51:42 -0700 (PDT) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id 188-20020a3709c5000000b0067b147584c2sm1897184qkj.102.2022.04.01.14.51.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 14:51:42 -0700 (PDT) Date: Fri, 1 Apr 2022 17:51:41 -0400 From: Johannes Weiner To: Roman Gushchin Cc: Yosry Ahmed , Michal Hocko , Shakeel Butt , Andrew Morton , David Rientjes , Tejun Heo , Zefan Li , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Linux-MM , Jonathan Corbet , Yu Zhao , Dave Hansen , Wei Xu , Greg Thelen Subject: Re: [PATCH resend] memcg: introduce per-memcg reclaim interface Message-ID: References: <243A0156-D26A-47C9-982A-C8B0CDD69DA2@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <243A0156-D26A-47C9-982A-C8B0CDD69DA2@linux.dev> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 85DDE14001D X-Stat-Signature: qt3oi186k8hsqnpncj5ur9dtizm6si8a Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=c99U3qkE; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf23.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.222.181 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspam-User: X-HE-Tag: 1648849903-948755 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 Fri, Apr 01, 2022 at 02:21:52PM -0700, Roman Gushchin wrote: > > On Apr 1, 2022, at 2:13 PM, Johannes Weiner wrote: > > > > On Fri, Apr 01, 2022 at 11:39:30AM -0700, Roman Gushchin wrote: > >> The interface you're proposing is not really extensible, so we'll likely need to > >> introduce a new interface like memory.reclaim_ext very soon. Why not create > >> an extensible API from scratch? > >> > >> I'm looking at cgroup v2 documentation which describes various interface files > >> formats and it seems like given the number of potential optional arguments > >> the best option is nested keyed (please, refer to the Interface Files section). > >> > >> E.g. the format can be: > >> echo "1G type=file nodemask=1-2 timeout=30s" > memory.reclaim > > > > Yeah, that syntax looks perfect. > > > > But why do you think it's not extensible from the current patch? We > > can add those arguments one by one as we agree on them, and return > > -EINVAL if somebody passes an unknown parameter. > > > > It seems to me the current proposal is forward-compatible that way > > (with the current set of keyword pararms being the empty set :-)) > > It wasn’t obvious to me. We spoke about positional arguments and then it wasn’t clear how to add them in a backward-compatible way. The last thing we want is a bunch of memory.reclaim* interfaces :) > > So yeah, let’s just describe it properly in the documentation, no code changes are needed. Sounds good to me!