Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp295254lqp; Thu, 4 Apr 2024 13:28:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbuFgCsbRFAi2ddRHYbsrpZLJiq0o0Vuv2y78b0P3D6tR+NlzscDrAEp2gdJwFbx8eZYigxlYZmnfjTiWniYcjkz7+DmU6iLOyxlWPYQ== X-Google-Smtp-Source: AGHT+IFcPV40jcktd7ffl8KFBBq3keA8VQdVDGUvzf0Ah0P3PDQgXsdLkgZa4bmncOf8nzN9Tidm X-Received: by 2002:a17:906:456:b0:a4e:2777:37c7 with SMTP id e22-20020a170906045600b00a4e277737c7mr453495eja.49.1712262483999; Thu, 04 Apr 2024 13:28:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712262483; cv=pass; d=google.com; s=arc-20160816; b=Fxg+Bu/aROC0IW1TlsrlKrlJOnIhUZURKO9KuL02Yt5OSreiHNQjcE0F1wZgZHaQCx FOKCNpmeJUtLCa7iW+mlB4kYUYKqLIso19/FZyIpdViAqRK6zv0ylxHHggdMVlkY29DQ kRmBAdiGrZiVrT4XKzKF1sZeQck+AE+B3SwJFXoP1+6F1B0zQzLGSQYfMqmd/8aTm+9I 5iytaHVGV7aShB70yNL+YEeBcDlvX0hEyq60841LMVhMrcv4LAPDrTBYZ7ab8YQ1woa8 fXPW5Mg0RVGV9XV5OUC3I9EQVcukiN38515H7WRgkALhWuxit29hnR2TjPhcKw8Y3j4s S6+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:message-id:organization:from :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:references:subject:cc:to :dkim-signature; bh=FSPgsamCBcroqXOqNqZOChWNjlieJmT3BNoJvj7kowA=; fh=c7DqcBeHQipkJPapvB1JyMl2o5pSykTZfPfI9Aaj+Z8=; b=vJqLUimM25yyeTHKT/QbFWIOyFGrqg/XNV8mmWdX6iFdUelSyRnRvPwChc4QrhDuza 10MG0tpu8U5eJormp86Yv1pBRxkXtwHn2bJSEFYuMnLMfZ/5SgvQm/EFcXp/x21U0waP NgxoZwo+7a333O8GPMWAY3PaDUk/rivgR8fB9FsHBipAqJOiZfqCh5euClWXABGEY0fa rOazZQiAgfo87HqwFzMRND9g4dvTtErNPzh2nU334SM6LoliJM86Jb7GYmPVi4kB33Nj qk2Lv1Wd9Jg9yX4NiwIbFnby76oKcjOZ9fu70wnMyXAR7JQFgWkYg3uS3JEiJAqnbgaE TtkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BL5Nhvp6; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-131740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fy19-20020a170906b7d300b00a46bf6e2fa0si7985580ejb.203.2024.04.04.13.28.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 13:28:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131740-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=@intel.com header.s=Intel header.b=BL5Nhvp6; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-131740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 5E2421F2A690 for ; Thu, 4 Apr 2024 15:39:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A75D512A16A; Thu, 4 Apr 2024 15:39:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BL5Nhvp6" 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 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