From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 4721012B87; Thu, 4 Apr 2024 15:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712245171; cv=none; b=ZQenR2l9QadLIzSKQFcVcN3BZ73Vjc4olDgah8IvaIS+wQcdSNqWeR5bcgHDQCqYFxahm972GYiG7C/Otfa1HgUSe5CJNHW6vpgWkCnmrOl8b9WuqsCDmcalcaGfz8UFrhyC9iOw3hc4Z7wrZCsC+D215RpLXmSO+usV/gYV8pk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712245171; c=relaxed/simple; bh=SyMXF+YI9dsKS9EwsdxFUximlqPUveJCPZuIvwTOF/E=; h=Content-Type:To:Cc:Subject:References:Date:MIME-Version:From: Message-ID:In-Reply-To; b=Xyg9xT27pKnNxXWXgrlhaADLIXciA2ywNFfLDg6ojn5DSUtFMNhbZlw4ntO8sQg4szaJiyUQn0oKbI6zaWzxft1TXPOPedA68wOtAtF9rHY02CyJdtdPSTW8oIgczUzbAR1O8r1Z/fKjkS9Fd8m2UcFTsJGjH5AC9XzBFgMoqBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BL5Nhvp6; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BL5Nhvp6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712245170; x=1743781170; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=SyMXF+YI9dsKS9EwsdxFUximlqPUveJCPZuIvwTOF/E=; b=BL5Nhvp6l5lhdp1HXImj4SNMs1Yg5ip8xSX3q/2WUWdFNYFoQewGtiC8 hKI7xCa18qVrcaBlgbZJM262Df1qn3nV3d9c8BZyIALgdnmJ1V92QO5iI rYWuFmTJNKzXiIIj7YASoMne/P2n4GIjO+vlFWM4wTQNlbESQaY9YID+7 3WviPv4nnSVg4hQPHbQL2VZfc7fX5wUQrgbT+5IsorShMfQJy8CcILOzB PXvps5puT6eG0mtm220pkSyXoXDl+e6gpuldzuwXRSAxnkXbwQXM7ITbu RDL7zdRuDt4SOXAepUXvlkWM2aMJs6N8LU+6Ywy2nCz9k3q9XaV3nCYbh Q==; X-CSE-ConnectionGUID: Xjwd6miJTO2ONGd3J4lc1w== X-CSE-MsgGUID: XArMb3lzTJOlQcuXGNzX2Q== X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="18271757" X-IronPort-AV: E=Sophos;i="6.07,179,1708416000"; d="scan'208";a="18271757" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2024 08:39:29 -0700 X-CSE-ConnectionGUID: EVj/EoeDSNCuzxhTN+5cCw== X-CSE-MsgGUID: yFrNcW5oTgKVAZnP8hFI8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,179,1708416000"; d="scan'208";a="23518129" Received: from hhuan26-mobl.amr.corp.intel.com ([10.247.65.164]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 04 Apr 2024 08:39:16 -0700 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "hpa@zytor.com" , "tim.c.chen@linux.intel.com" , "linux-sgx@vger.kernel.org" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "jarkko@kernel.org" , "cgroups@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mkoutny@suse.com" , "tglx@linutronix.de" , "Mehta, Sohil" , "tj@kernel.org" , "mingo@redhat.com" , "bp@alien8.de" , "Huang, Kai" Cc: "mikko.ylinen@linux.intel.com" , "seanjc@google.com" , "anakrish@microsoft.com" , "Zhang, Bo" , "kristen@linux.intel.com" , "yangjie@microsoft.com" , "Li, Zhiquan1" , "chrisyan@microsoft.com" Subject: Re: [PATCH v10 09/14] x86/sgx: Implement async reclamation for cgroup References: <20240328002229.30264-1-haitao.huang@linux.intel.com> <20240328002229.30264-10-haitao.huang@linux.intel.com> Date: Thu, 04 Apr 2024 10:39:10 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: User-Agent: Opera Mail/1.0 (Win32) On Thu, 04 Apr 2024 06:16:54 -0500, Huang, Kai wrote: > On Wed, 2024-03-27 at 17:22 -0700, Haitao Huang wrote: >> void sgx_cgroup_init(void) >> { >> + sgx_cg_wq = alloc_workqueue("sgx_cg_wq", WQ_UNBOUND | WQ_FREEZABLE, >> WQ_UNBOUND_MAX_ACTIVE); >> + >> + /* All Cgroups functionalities are disabled. */ >> + if (WARN_ON(!sgx_cg_wq)) >> + return; >> + > > I don't think you should WARN(), because it's not a kernel bug or > similar. Just > print a message saying EPC cgroup is disabled and move on. > > if (!sgx_cg_wq) { > pr_err("SGX EPC cgroup disabled: alloc_workqueue() failed.\n"); > return; > } Sure Thanks Haitao