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 3E61EC433EF for ; Mon, 4 Apr 2022 17:15:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC9596B0073; Mon, 4 Apr 2022 13:14:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C795D6B0074; Mon, 4 Apr 2022 13:14:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B417D8D0001; Mon, 4 Apr 2022 13:14:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id A80436B0073 for ; Mon, 4 Apr 2022 13:14:59 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 68A00824C428 for ; Mon, 4 Apr 2022 17:14:49 +0000 (UTC) X-FDA: 79319846298.24.BEAC832 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by imf09.hostedemail.com (Postfix) with ESMTP id E3463140036 for ; Mon, 4 Apr 2022 17:14:48 +0000 (UTC) Received: by mail-pf1-f177.google.com with SMTP id b15so9579180pfm.5 for ; Mon, 04 Apr 2022 10:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9G0a90Ep/Bz5OOoDZhbBO26Y5kHqZZt4pCiJoHTyyw4=; b=dbsKFhi7Qrtq/Rq9OZDWGOfaDFXlehFA5Dvy8IhvRrLeU0T4wP85YNiBqYaU9XUcaR eUVN69DjjMnifijLW25m+YKzc/I0odbx2wV1tPCdU+KBxslLKSqFwvkD4pVvTF50IUQa +QaIH7XLXTeNMaw7eguYI4S17J2ihOJkhUqbubb0twU+NF44WOBEs4KEZwuyI2cQ1OWg DjvmsdfzKYHIffEOCxLZBCluUxcZ7//A9FO1lCcnt+AcAMATqSVWgw8Xu0BUE/Jl7VQw rtUspdPnkhbICsCmzGy+IMML4dl30xRIEscdXvevjnn2tvTt7h6mqDEkiKuyZ7Z/UY9Z FpEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9G0a90Ep/Bz5OOoDZhbBO26Y5kHqZZt4pCiJoHTyyw4=; b=Z0ypG/RaJ5W8gsPAlxZRXNK6+032rk9VDbnwaFLrtNJ/aILYXQlWRWd+WKYG7yzFFs 3Vvky4nyz/HKkOmiQUyAq4iRfbhUb3yZ4MedeGk8kiJBkqA/bhcTX36UJMYLWyWW0EWZ wqDQLUtuWgwW/yQpiB5LaRM6sVOttnu6BYRk0hWE0WY3y+1wWt5qC6JeQpw81676z2sO aICaDznlr/xfWPispc8rAek0IFKsNgg10EED1kRHTUtSgIeDUnSxklZZEZCGH/sVX6OA +qtQujaNJazcRtJ0i+coXT59KMi0lz7YXeRBP1OkP0OYrFN0r9bl4c5pQD8SlYNX0s5s f2eQ== X-Gm-Message-State: AOAM533tyZY0C1FNn4nTm3eojs095KVwmIvcVPGf8yBJvNiikdcTt4cs VE5cR06kPQxWeDMFNSmGHl0qU9H99ebyVLezh3WgBQ== X-Google-Smtp-Source: ABdhPJwExpdEGnyWDK69sFVEHi5zDLcGulVNorqTNcKNzqhC2Qfdem89xzMoC4eHonTJ3Nemx/2dgOoEjbxz5HBpdFw= X-Received: by 2002:a05:6a00:bd1:b0:4fa:a5d7:c082 with SMTP id x17-20020a056a000bd100b004faa5d7c082mr520472pfu.85.1649092487680; Mon, 04 Apr 2022 10:14:47 -0700 (PDT) MIME-Version: 1.0 References: <243A0156-D26A-47C9-982A-C8B0CDD69DA2@linux.dev> In-Reply-To: From: Shakeel Butt Date: Mon, 4 Apr 2022 10:14:36 -0700 Message-ID: Subject: Re: [PATCH resend] memcg: introduce per-memcg reclaim interface To: Johannes Weiner Cc: Roman Gushchin , Yosry Ahmed , Michal Hocko , Andrew Morton , David Rientjes , Tejun Heo , Zefan Li , Cgroups , "open list:DOCUMENTATION" , LKML , Linux-MM , Jonathan Corbet , Yu Zhao , Dave Hansen , Wei Xu , Greg Thelen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: 9kkyg6wfam61bm9ugp3gddax5wz8caft Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=dbsKFhi7; spf=pass (imf09.hostedemail.com: domain of shakeelb@google.com designates 209.85.210.177 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: E3463140036 X-HE-Tag: 1649092488-536001 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 1, 2022 at 2:51 PM Johannes Weiner wrote: > > On Fri, Apr 01, 2022 at 02:21:52PM -0700, Roman Gushchin wrote: > > > On Apr 1, 2022, at 2:13 PM, Johannes Weiner wrot= e: > > > > > > =EF=BB=BFOn Fri, Apr 01, 2022 at 11:39:30AM -0700, Roman Gushchin wro= te: > > >> The interface you're proposing is not really extensible, so we'll li= kely 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 inter= face files > > >> formats and it seems like given the number of potential optional arg= uments > > >> the best option is nested keyed (please, refer to the Interface File= s section). > > >> > > >> E.g. the format can be: > > >> echo "1G type=3Dfile nodemask=3D1-2 timeout=3D30s" > 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=E2=80=99t obvious to me. We spoke about positional arguments an= d then it wasn=E2=80=99t 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=E2=80=99s just describe it properly in the documentation, = no code changes are needed. > > Sounds good to me! To summarize for next version: 1) Add selftests. 2) Add documentation for potential future extension, so whoever adds those features in future should follow the key-value format Roman is suggesting. Yosry, once we have agreement on the return value, please send the next version resolving these three points.