Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp501875rdb; Thu, 1 Feb 2024 15:24:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKFDarUwUpL96q4QD4qbu2oCb5N1OGtYF/Ww7cDokHVHyTx2BU7l6Xl4XwiuJUf3IkjhND X-Received: by 2002:a17:907:3602:b0:a35:6c2f:f0e7 with SMTP id bk2-20020a170907360200b00a356c2ff0e7mr427358ejc.74.1706829896205; Thu, 01 Feb 2024 15:24:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706829896; cv=pass; d=google.com; s=arc-20160816; b=jR+dLn3gNANSOQDUdOKm92chhNTb1WvvoLZ+8X6rYv4+oGTM9/o4citxefVdNtuLpj 2DIhsbL63CfxCP38OJ/YV9XdQzvySrQIyOlHI4BDaxqmZukbyS83rPIllUHHCsdbZ6Rt Hy9LXAVLKqEFc93j8XiHJNEke/h4hR9QiFU24wSZOiXGwsiRGjkd+0KKTP26UDJJppYu Z4Rpj0hBe//E31cPSN6N3q/b6rvh4eJaYCNoF0zbwn77ssqtGB2XEal8XIALCEeyBuRH i4RKYz3LAMs268qB3ntAPJ6z6+XVDwIn57e8uewarwngCEfSqKbYPaoecdVRtbT1LAmH PFug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=29ymSF83LMCAgc8Jc+xdiNbStl96qMAKQ7peACjIdJE=; fh=E6IY7pIjDDFLoo0PWYHzNSPHrhtP/+jDT0SUZeDYRtI=; b=xiUsUmhoBQTlbaO5Kkt4ZPLELFD3YzUW8V+cT4RUXyVdwxKjvVlY2kMe9PHr+WQzDo 7XsKqeXqCT1pQcS42oBN4tzkzWo85CDYijbUyEpKOhJA9ycucN8iwX4RFxh4rHfnqLrh +/XeI1gS7Kva8SerKZTBLziXpd/MKqBvwph75FRPSuu22gZlM0eEIO+A1ytvEl4gPr6s znEYau6xmWlRP7OMGdtKc0CpSH7OuW1fGOjp034gOLplUyuUMsjKDjdMttL/GC3ZPZLq +JYnPA5fQL++Qxw2W8CdCV7Ji95FPFIdCvlja2RXJkYJnEkdHaFrPdHgmlBqZb4T9MwE 9USg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X0XzMuOd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWFC9Gdu+myCnS+ZfOrT0SdATPqW2isgks/DYftV8JVOomiJG9SZ+M3/Lfh2n4za4U2NbT3Ye25n3RmXxWipr366BPQyBRxbIAc/ABVqA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b22-20020a170906039600b00a3671d5fd31si263304eja.991.2024.02.01.15.24.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 15:24:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X0XzMuOd; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48986-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ED5AE1F25A94 for ; Thu, 1 Feb 2024 23:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E814247F4D; Thu, 1 Feb 2024 23:24:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X0XzMuOd" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13F0947A76; Thu, 1 Feb 2024 23:24:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706829887; cv=none; b=n2J1EeKAAeN+aWtEg060bdxW9vqTSeD6cRsmi1dn7ByOaP2cK3Ks97tJ830ljhSvQfFulJxqyg8GTcSx4hdq0H/OshDu9kIyc4r6lSD+0BpuKrn6jcz+3AmFOdh4/fK6HxW8X3t3ljR59pyqLBPEDXRdPqCGhr3kBB9vFgqrt2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706829887; c=relaxed/simple; bh=29ymSF83LMCAgc8Jc+xdiNbStl96qMAKQ7peACjIdJE=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=a/aIsPv//f+L39a4XxLk5Z6i82pmOgro6NECk5TptA3UUR4a7E1lHgVBkNODfzK+HdbOOLWlCMh6MXoVaV0mH5Tar/B+bn4icDZA1oWP5b8qwkFUdtuzLF8l4i7/ti+YBkhNFuOwXa6eBCboMhyIEvTnebAMfdpPoOZqwDsLVhY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X0XzMuOd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E6ACC433F1; Thu, 1 Feb 2024 23:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706829886; bh=29ymSF83LMCAgc8Jc+xdiNbStl96qMAKQ7peACjIdJE=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=X0XzMuOd5hoPWvC8SnCXX3g/KE61k/Y6XlPYjysECtn3CJZb+ZMifLZZGzG2dzDfg +m961kMAvogUvDsnjjF45qisnqlarAm+v5K7wuMtNgMg1XheVPs3HqkDCWdep6Knkh GwgEyJpAq8xrON0LuLUlE+PZeQtZdGaXSDyLkXvETLu2lvk2/UtCKgqA9JFXBuFn1V 8GLwjnJDstSrTOiSqZVnCf1mmaiXIalokWDaf87W2lCQFlx9fbsYn+eLnedZ1BRm5j x6q6IRH+NosAEI0GvUSWGaVmfF6nCCXnNufbRKyvs/IOwyhaDOf4RNc67sOEZvbB7K mK5sTJzYqpjXA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 02 Feb 2024 01:24:40 +0200 Message-Id: To: "Haitao Huang" , , , , , , , , , , , , Cc: , , , , , , , Subject: Re: [PATCH v8 01/15] cgroup/misc: Add per resource callbacks for CSS events From: "Jarkko Sakkinen" X-Mailer: aerc 0.15.2 References: <20240130020938.10025-1-haitao.huang@linux.intel.com> <20240130020938.10025-2-haitao.huang@linux.intel.com> In-Reply-To: <20240130020938.10025-2-haitao.huang@linux.intel.com> On Tue Jan 30, 2024 at 4:09 AM EET, 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. > > 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. > > Signed-off-by: Kristen Carlson Accardi > Co-developed-by: Haitao Huang > Signed-off-by: Haitao Huang > --- > V8: > - Abstract out _misc_cg_res_free() and _misc_cg_res_alloc() (Jarkko) > V7: > - Make ops one per resource type and store them in array (Michal) > - Rename the ops struct to misc_res_ops, and enforce the constraints of r= equired callback > functions (Jarkko) > - Moved addition of priv field to patch 4 where it was used first. (Jarkk= o) > > V6: > - Create ops struct for per resource callbacks (Jarkko) > - Drop max_write callback (Dave, Michal) > - Style fixes (Kai) This version looks nice and smooth: Reviewed-by: Jarkko Sakkinen BR, Jarkko