Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2364648lqz; Tue, 2 Apr 2024 15:32:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgt2HYTUzTlGB83JPRFyJ9eqetw5+H1PqOFjy7W5DbhNzrC3u4k1YWw2LlJYkL2GIxGpULk9TcF0z5z+2NnZYyJVkz8JOa8t3/QcjdzQ== X-Google-Smtp-Source: AGHT+IErM4CyuEiXG+LTIOi9v87dWG/8s0Oj0kzBWD1ORCJKE1Mm5A7ruejak0bMtt1VBW3JRTtg X-Received: by 2002:a17:902:e74e:b0:1e2:86f5:9d00 with SMTP id p14-20020a170902e74e00b001e286f59d00mr2220015plf.25.1712097142467; Tue, 02 Apr 2024 15:32:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712097142; cv=pass; d=google.com; s=arc-20160816; b=o2ccH4gxNbSqcLP5XdY8W17yR7iDmQL6Ig8ha+A9UKlQ4KPT4cVTwgYzZs/FZyaDGw 8UyLBgPfNbN1cpobTE+ZqwXkdKpba/Lkya6NNW74dPAd4dAqOzmbn39TU3KQBCSzfHGm wLEBK0ltyktijLaEW9Cz5Lim2KP8GMWMKxStK/KW784eBfbgOscPiMGUIkqvLpD+cAtV bmVh7L7d3EFvdamBL492VSA2/iXSm2PQNhSuaTwCaQNwTs4RBjyEQfXH7CtjAVqCGV0V PelU+wQkN9WTz4zY/RbplXnaZNta6Gx027fjFUJAcqAdRbBObsF0D180FXp3ErF+eS1d ku0A== 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=/uGU43XlksWEH8IYjvFawM4H7JMab0Yb0h0woJMsseQ=; fh=zzjMMYSXtetov93gwX4XT3lCxHz/ujqEpmiRvRqhFAs=; b=aVLcedWA6p+NC/pHnILsEnW1CPPY6tL23Cy+O+DamZmWklSS2dFeOshzvBH8ycyWrq PVM74HGNcHhclT/RQkfBWvz+gfppq492OxAuu4HGDAfxsTvdnn7chv7c61dWjjoD3WUh Xv6VwAU3yfCmFuL58uE6PGyWv09XlxjIpw7PTXJqmm5998EwVHyT0QAmKUTCGknVwHL5 A0Wf3c68YOPhvzaxGNoCLi4v2T8aurZvk8gjZbU1Thax56rksbRWJS73rE5jSbRSdZpv +fr+2xTaH3cFhL0i5HTvK7pa2QFfYUnJKb2v5JlhTdG/OBvLDr7nl8X6lzGxqURS6uzk dsiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A8oglQ0A; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-128494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d7-20020a170902654700b001e0b5d4a295si1826374pln.422.2024.04.02.15.32.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 15:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A8oglQ0A; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-128494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128494-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BA978B24913 for ; Tue, 2 Apr 2024 18:20:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D08F615AD96; Tue, 2 Apr 2024 18:20:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="A8oglQ0A" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 4117515A48E; Tue, 2 Apr 2024 18:20:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712082032; cv=none; b=OsayD2dR/z3GFjVm76mZcON9mPgOequJR3I9aLfXZUn4w2buUoc3VoIIsj/ijumlJLKg+psa6X7dlNAl/Dj2mxn4gTGWrrdox3oGLgeQpUps4ay2qUX2qWEUhL5+yHtnHa739TXjLFeHCaxYSLWR9i9JeQ7IssFRJzkmIRCEj0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712082032; c=relaxed/simple; bh=0nIg5V68eFs+S6WZrMtxSDt8j15LDM7MC/w7XzQq4aM=; h=Content-Type:To:Cc:Subject:References:Date:MIME-Version:From: Message-ID:In-Reply-To; b=EEMsB5+G4nAgYSzUK0QHJUhNCJO2lvzUG8QSaEkKbJVga35+zNkcB4C9autjrVtQpOdUojMK/B+zOnwC8xy1oDEe0HK+d19D0P1DkSFRS4zL2VPU9uM8YfC6BQV+sAa/M7HEWi/oX02dYgjE1i5HJpW3lUt5YFpGUi36ycsQuRI= 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=A8oglQ0A; arc=none smtp.client-ip=198.175.65.10 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=1712082031; x=1743618031; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=0nIg5V68eFs+S6WZrMtxSDt8j15LDM7MC/w7XzQq4aM=; b=A8oglQ0AfVBU8AatD6XT9M+b5UhjQwhN2rtD5cbPmcxFQcR9QTQYshfG gt+0AbeVlNuBE4JtjXqBj27h+G9u5kWPArt8K6T6VlzFR/DFtsXvraGJ5 odRx47Vis90/txE1pE9Xf7Y6sCR4djyvgMuEOxHIxGo6kHSOqAWr6uXev SXBJGLGa9+8Hrih6i7x/GVRB/Lhos7Xn1qpkMiLRUqhZUDD9vj4OkUeje RaZV/j6gZa+rcQqeTNgubMpU6FSu9+2XRsrtb/uQZsOC7O+SCh5vP8uqE b6iu/sAxaOU7UU3kf5bsULs7gev53y74jJ7nGFV9srAXfRncIZt5eQpKJ Q==; X-CSE-ConnectionGUID: JlFDas+gQrqksCjGLq7cUA== X-CSE-MsgGUID: WAFdYvq8TJuVtR3D8/JGCw== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="24729989" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="24729989" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 11:20:30 -0700 X-CSE-ConnectionGUID: W2CB/e5+SoCTGl3jQ/a3rQ== X-CSE-MsgGUID: ZBrlNf3NSnaBEgUH3+z5kQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="18133002" Received: from hhuan26-mobl.amr.corp.intel.com ([10.92.17.168]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 02 Apr 2024 11:20:28 -0700 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: =?iso-8859-15?Q?Michal_Koutn=FD?= Cc: "Jarkko Sakkinen" , dave.hansen@linux.intel.com, tj@kernel.org, linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, x86@kernel.org, cgroups@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, sohil.mehta@intel.com, tim.c.chen@linux.intel.com, zhiquan1.li@intel.com, kristen@linux.intel.com, seanjc@google.com, zhanb@microsoft.com, anakrish@microsoft.com, mikko.ylinen@linux.intel.com, yangjie@microsoft.com, chrisyan@microsoft.com Subject: Re: Re: [PATCH v9 15/15] selftests/sgx: Add scripts for EPC cgroup testing References: <20240205210638.157741-1-haitao.huang@linux.intel.com> <20240205210638.157741-16-haitao.huang@linux.intel.com> <4be7b291010973c203ed8c7bcd25b626c1290231.camel@kernel.org> Date: Tue, 02 Apr 2024 13:20:25 -0500 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 From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: User-Agent: Opera Mail/1.0 (Win32) On Tue, 02 Apr 2024 12:40:03 -0500, Michal Koutn=FD w= rote: > On Tue, Apr 02, 2024 at 11:20:21AM -0500, Haitao Huang = > wrote: >> Do we really want to have it implemented in c? > > I only pointed to the available C boilerplate. > >> There are much fewer lines of >> code in shell scripts. Note we are not really testing basic cgroup = >> stuff. >> All we needed were creating/deleting cgroups and set limits which I = >> think >> have been demonstrated feasible in the ash scripts now. > > I assume you refer to > Message-Id: <20240331174442.51019-1-haitao.huang@linux.intel.com> > right? > > Could it be even simpler if you didn't stick to cgtools APIs and v1 > compatibility? > > Reducing ash_cgexec.sh to something like > echo 0 >$R/$1/cgroup.procs > shift > exec "$@" > (with some small builerplate for $R and previous mkdirs) > Yes, Thanks for the suggestion. Haitao