Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6190759rwb; Mon, 14 Nov 2022 16:05:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wVksItnSBoTkVscIB0Z+90ypGze2UPwcqeNg3byTJjIoasn8pCyF3RJ3yCC/OdtqjkZzD X-Received: by 2002:a17:906:c1c6:b0:7ad:7e81:1409 with SMTP id bw6-20020a170906c1c600b007ad7e811409mr12078138ejb.326.1668470700424; Mon, 14 Nov 2022 16:05:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668470700; cv=none; d=google.com; s=arc-20160816; b=VDu5lnl4O59SHkcSKvWnR6NJkvgbAYaeBQYn6cIvJ5aLQHe0UOHkYDlugi+3SOZTBF aYJqGxJjUs7osREWElWjCtjaBZR6aY02qF0O09XJuyRwHZtOhzmDIpL4DbkrVY92stws uvkGxCcsCK5x64wE8sxrpncXJIZLJw89ZNti+Xmavxe6w25B9dUsVWubRpkzWjaF7HBW F71bWyKW8SaUTurCc3bUXz2V1Pqgwi6123hmATkDepfI72NAD8QOgwpyoTwUJ8vY+Tch V4Y6pLkdzN1IFuIY9QojLr4HgLnVkegKjvM3/YimjI/LsrxKgEuu8xusVAZ5ClAWh7+g WZ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=xegt7ptKTtdJNW416eZFU2xzyfbyFyg07lD2i0oq41Q=; b=sZ0tCSlT/m9mLZztot2gtheEzonVtzpkGrnXEk3VkGYFU/PAvFezV4r6rTWJFOQgd7 dMyhe2CeyvST9avKFVRDONhT/sdaw079S9qnsQ84DsV4qOc4Gd+u2Km6Baa1isOQbXCq Gw/BwwwpQCSWqUMW0z/RpZDIzORKCTF1SQ2VNlqFsACagtjBuNw0zw+ZNPMBp6Ska6iZ W/HZSUCBRF2eOahl5b84fjZJbc6Si3Itr5B66+Kmplwh/sylF/5ZCNqEIFq4KLqz7JZG jEXWAE/7t5Cc5A/r67WHqQAOakYslPiFw3ESFA6WFMn5T272QOrgE485Gx1wmKE+/wvw 4Xog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bEarSPNZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ka23-20020a170907991700b0073083c63edcsi7728429ejc.306.2022.11.14.16.04.34; Mon, 14 Nov 2022 16:05:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bEarSPNZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231864AbiKNXKS (ORCPT + 88 others); Mon, 14 Nov 2022 18:10:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231627AbiKNXKP (ORCPT ); Mon, 14 Nov 2022 18:10:15 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E0B22C; Mon, 14 Nov 2022 15:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668467414; x=1700003414; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=xegt7ptKTtdJNW416eZFU2xzyfbyFyg07lD2i0oq41Q=; b=bEarSPNZtvx1T83GZvW9m36KNUTrCZAKbbqhkMxfty356n6/Sl2glriy s8HHrq8+b31UNMmxw4/wMm8M7Q1mW5aT0BotXqqV8dv0Xz/+PBkVeKACy NnpgxT3rwFcOr/T1NYhWl6ePQZjtacz3YpzZltz/J+918Bs1jOQRGA8Xr 42ZElt3RY0EUThXsa+Dv/dc9CSB5NLp0QdV8wmfL9RrT9cB5pXaw3K1EB s8H6X4Ue94zJJXjii4nuZwqv80PDCURgL2DYGKGQF4mdQU8lcYKTLLq/f yOKwTR4xf8tf+IYPhpYLZ+IneqxdAwx5Ved1ZI8wl56w2vGGwarnQZ8nR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="312109889" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="312109889" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 15:10:14 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10531"; a="702198648" X-IronPort-AV: E=Sophos;i="5.96,164,1665471600"; d="scan'208";a="702198648" Received: from tmacfarl-mobl1.amr.corp.intel.com (HELO [10.209.82.47]) ([10.209.82.47]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2022 15:10:13 -0800 Message-ID: <6f7afaa6811cbda30d12c38d73d4b261ab733a9f.camel@linux.intel.com> Subject: Re: [PATCH 17/26] cgroup/misc: Add notifier block list support for css events From: Kristen Carlson Accardi To: Tejun Heo Cc: jarkko@kernel.org, dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, cgroups@vger.kernel.org, Zefan Li , Johannes Weiner , zhiquan1.li@intel.com Date: Mon, 14 Nov 2022 15:10:05 -0800 In-Reply-To: References: <20221111183532.3676646-1-kristen@linux.intel.com> <20221111183532.3676646-18-kristen@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2022-11-14 at 12:42 -1000, Tejun Heo wrote: > Hello, >=20 > On Fri, Nov 11, 2022 at 10:35:22AM -0800, Kristen Carlson Accardi > wrote: > > +/** > > + * register_misc_cg_notifier() - Register for css callback events > > + * @nb: notifier_block to register > > + * > > + * Context: Any context. > > + */ > > +int register_misc_cg_notifier(struct notifier_block *nb) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return > > blocking_notifier_chain_register(&misc_cg_notify_list, nb); > > +} > > +EXPORT_SYMBOL_GPL(register_misc_cg_notifier); > > + > > +/** > > + * unregister_misc_cg_notifier() - unregister for css callback > > events > > + * @nb: notifier_block to unregister > > + * > > + * Context: Any context. > > + */ > > +int unregister_misc_cg_notifier(struct notifier_block *nb) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return > > blocking_notifier_chain_unregister(&misc_cg_notify_list, nb); > > +} > > +EXPORT_SYMBOL_GPL(unregister_misc_cg_notifier); >=20 > So, I'm not necessarily against this but wonder whether it'd be more > straightforward to add sth like struct misc_res_ops which contains > the > optional callbacks and then have an array of pointers to the structs > which > are initialized / registered somehow. What do you think? >=20 > Thanks. >=20 Makes no difference to me TBH - I believe they will be functionally equivalent and from a downstream user perspective equally as easy to use, so whatever you think is easiest for you to maintain.