Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2000041rdb; Tue, 3 Oct 2023 07:31:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHG3Ji1LXdIFo8d5wEbqizQtnXImsyOjzhalSYgetQLznhn89G5cJrGbGNhFO1cuacprpiv X-Received: by 2002:a17:90a:e38a:b0:26f:b228:faea with SMTP id b10-20020a17090ae38a00b0026fb228faeamr11519861pjz.18.1696343466188; Tue, 03 Oct 2023 07:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696343466; cv=none; d=google.com; s=arc-20160816; b=mkdsGLBO37a2tod7OFb5WNB/uUmj1k5bTm1pBZmRTd8ahcdvylKh3O4F3Yi/KnNgpu CfhtSVkY97uI0jbZxoXUTY5hnnGPMkPfsIU1QT5SN4tNwlCVLMozps29MMSJDSifWgst 6hEiq/hO3PWOODP1XLdKD4ksflJH3jpEZo63w8wMoqXtHEXu16dIC1OtGk0XaGwuf/Pl 4w4p+ZWBZuoCnSJbV+G8BQN2b6wDf0b6X+3ZIF1KBPQ9U2Wyj4d8aRuiYbriWw50lGBo 3A+aqsyMB+2ZGMXlqmmo03Ma5sdfNeaDdP2CC7RC3b4cEJY6RWKc815INRyLKxjdhx5S ItGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:message-id:organization :from:content-transfer-encoding:mime-version:date:references:subject :cc:to:dkim-signature; bh=bz8dB4Hq12LEqtXuGRrkkwGCRDzTIcbeclBeGKdQkV8=; fh=tZ0ljGQAridDd4+mN98seoaTsH38UJCx95eOKQNre5s=; b=bDsQXinO6SujbR4QshRyLwmq6SjBB9kLL1Lj7ulfKYZ2TTC+2Rdj6F/20OHWMIM/y/ oe9lfTrwvkFTwHp6sdw3DDN5oZTP/XRJQ/kTWsle+ZNAm/T58E1hvee+hHiEUMpVnn+F XTZuhxa9XqASDNMg90f4vf4OCtq1UdYOq65otK1k350EtsdDwj+T/fs0invzLw2SnR3V ZmapOD2SaGXKxJATkS8Ex9qqriFKwfOLLh56DmPYNJTP3OJz/zN7dMKRIEhYCZ3nK9SX PtxamsdROCgcV1ETaceLTbPFF5P8lULzS3S/8JjomnXvyK51ZvvB3pL5sULWUiywf/Ey f3xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VMrvM8Cv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bt24-20020a17090af01800b002770c306d55si10118991pjb.87.2023.10.03.07.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VMrvM8Cv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 92AE280713E4; Tue, 3 Oct 2023 07:30:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240055AbjJCOaS (ORCPT + 99 others); Tue, 3 Oct 2023 10:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240060AbjJCOaQ (ORCPT ); Tue, 3 Oct 2023 10:30:16 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B31D7; Tue, 3 Oct 2023 07:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696343412; x=1727879412; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=UCQJOYqv97Otv7CHu/YgGsnF34DQhXKpnmZyn56+66U=; b=VMrvM8Cv7VaaPHf1EpcL7duora/oBx5Mvin/jI0/pjMw466UNxkbylwj a0iBhuSMEyp0+oHUBhb4cE4f0IAnSe9biuQuaGBkfut2wxH12sAFRaduu nVdT5uIExE96FPaX8vj6EXFWw7pf9IN3NtpdCHjHJrf6aE0ZPalKqwp0S eVXtFYUCZePWRo/0mhCsmiPZrwtNV/D9qot9Dl65Ycfa5YZpX0XuSNSo/ VjVzGu6jKyfMGvBwGFKvUerfCoSr83jroLgsgMFin8+y7fpLdYaYRpf6Q sGBmPvyBF44gpKYNZeKzEbrKTbzCGFrd7aKl0BqULfM3lCGeykuAN9YD6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="413798077" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="413798077" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 07:29:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="1082038574" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="1082038574" Received: from hhuan26-mobl.amr.corp.intel.com ([10.92.96.100]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 03 Oct 2023 07:29:49 -0700 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "hpa@zytor.com" , "linux-sgx@vger.kernel.org" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "cgroups@vger.kernel.org" , "bp@alien8.de" , "linux-kernel@vger.kernel.org" , "jarkko@kernel.org" , "tglx@linutronix.de" , "Mehta, Sohil" , "tj@kernel.org" , "mingo@redhat.com" , "Huang, Kai" Cc: "kristen@linux.intel.com" , "yangjie@microsoft.com" , "Li, Zhiquan1" , "Christopherson,, Sean" , "mikko.ylinen@linux.intel.com" , "Zhang, Bo" , "anakrish@microsoft.com" Subject: Re: [PATCH v5 01/18] cgroup/misc: Add per resource callbacks for CSS events References: <20230923030657.16148-1-haitao.huang@linux.intel.com> <20230923030657.16148-2-haitao.huang@linux.intel.com> <8f08f0b0f2b04b90d7cdb7b628f16f9080687c43.camel@intel.com> Date: Tue, 03 Oct 2023 09:29:48 -0500 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: <8f08f0b0f2b04b90d7cdb7b628f16f9080687c43.camel@intel.com> User-Agent: Opera Mail/1.0 (Win32) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:30:22 -0700 (PDT) On Wed, 27 Sep 2023 04:20:55 -0500, Huang, Kai wrote: > On Fri, 2023-09-22 at 20:06 -0700, Haitao Huang wrote: >> From: Kristen Carlson Accardi >> >> The misc cgroup controller (subsystem) currently does not perform >> resource type specific action for Cgroups Subsystem State (CSS) events: >> the 'css_alloc' event when a cgroup is created and the 'css_free' event >> when a cgroup is destroyed, or in event of user writing the max value to >> the misc.max file to set the usage limit of a specific resource >> [admin-guide/cgroup-v2.rst, 5-9. Misc]. >> >> Define callbacks for those events and allow resource providers to >> register the callbacks per resource type as needed. This will be >> utilized later by the EPC misc cgroup support implemented in the SGX >> driver: >> - On css_alloc, allocate and initialize necessary structures for EPC >> reclaiming, e.g., LRU list, work queue, etc. >> - On css_free, cleanup and free those structures created in alloc. >> - On max_write, trigger EPC reclaiming if the new limit is at or below >> current usage. > > Nit: > > Wondering why we should trigger EPC reclaiming if the new limit is *at* > current > usage? > > I actually don't quite care about why here, but writing these details in > the > changelog may bring unnecessary confusion. I guess you can just remove > all the > details about what SGX driver needs to do on these callbacks. > > Okay, I'll remove the three bullets on the SGX drive implementation details. Thanks Haitao