Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1214267rdb; Mon, 19 Feb 2024 07:49:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUETZpGFSWg+n4zHIq66qyk+6CJgtU1vsQB1If/DmJ2042FbCMqsztb9vKig3A2/gUvcJro0vrG9KkaePUy8+0Yg2byf9EO5mPCT2xqug== X-Google-Smtp-Source: AGHT+IGXwu8fO14uJ61oNktkJzuLVE++as54pHY45eGPqsoRO3lpCdNiwuuzpLQcMNbxePpOwxn0 X-Received: by 2002:ae9:c11a:0:b0:785:9046:f66c with SMTP id z26-20020ae9c11a000000b007859046f66cmr11767496qki.75.1708357790782; Mon, 19 Feb 2024 07:49:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708357790; cv=pass; d=google.com; s=arc-20160816; b=PPlfB+YgPWsaiiTvkdSrLvJ79xDzNfrrHsgJqrx7zdpjBG5bCPeI8jzb0wqU5VS7GX Iyl4I9jhYSutyAZLUraE5D0kA9xgGnGPcXMuvnK6Plkpxr6zziaXV9XfEMwUndE/jCxj CoTle1Kh4daSCVhae1GsidOHARimJt1C0V9w6ECswzjiW5m0Pn5iDKIKdgNQx6BP/bH/ GsxjyIBKLlUKwY96sBUgtiiPH9N5PNS45kj8Ljq3l1nFw8nJG/I/GsLb9Jd2BF9MW+EJ ovYuOH2t03szmGAuDpuUFkSIj0ItXrIecbV9vO4lFsBxafUYLZfyhdE1OLbDOZ1LPIrs s2TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=+rr8piR50zu1iWqFqfr2PiY/YffPW1SXu411nc6OM8Y=; fh=say4dzZhPtlGFGzSKJrIHWe4Rlmp6cCyYPI1uph3tWI=; b=Ba3ZigxWWOEWtdFot4BLrhQD9V0C/pORtVr1q1Z4Ocxje7sHJzCZijypwP7tY8JBxo GtAB4WAga5l9GNbd0iUAQ0zTnQHyd9zAbtiEcl8Lbo5b+16r7qx+FcGn45n5VfH9nOt9 RAR0pOvbufCulZ2hL2a1DwqfzY0lTPHzZakiSh8PAe/8ddJ2pQdyUC1B5xYdhTH6DuC/ T6uR7Ul48e5bBb3RSwDIP5zgsIwhW4p/iPG5EyxW915YaxTxcg8qAjpYzs55wQ8TqJZ5 6Qj4TUk/Kpa+ZQI8W9RPMjBD8p4RUUmZ8u8Gn6GScJ/0VdqrY9l1ct2eF6NKZo85R+hK fJug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VdsSAMfy; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-71614-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71614-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x2-20020a05620a448200b00787425c6221si7367700qkp.377.2024.02.19.07.49.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 07:49:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71614-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VdsSAMfy; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-71614-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71614-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 782691C22BFB for ; Mon, 19 Feb 2024 15:49:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 143AC3C49A; Mon, 19 Feb 2024 15:49:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VdsSAMfy" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 7D7BC3C08E for ; Mon, 19 Feb 2024 15:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357782; cv=none; b=grI7t2E8GIbCL82WX2MRLvwYiS6J1TYuweu/aoU0l5wAKEeq5fcfafR+q3pAQC9Ppyl7ZjvhCyloYaL+RtKS1zLRz/dBfcqEyqxJHT+BDJKqid6W/xHj5h5hFrt85YPRt8Lt1nxCWrS1bydW0/n6WiDJLNv9ctfGupoK+dmCy6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357782; c=relaxed/simple; bh=Gb3X/KcZRO8eLd+0VGQWDlnohkJKkzwHBs0YbLq4/mM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fxjuSUQb9OZtLOlM/i/sxf11WvLZ9pFFwlseegy6ywxaoe9KfmtE3cgpHdgmFGdO4oMwOpZVklZYncNKAsiezCFyR02GOt+UJu3ptpYDKuUUT9phwhIvFowZG8NqtmZD/EcfMSw3P4QOo8JA6Kd5CHYoUIKoVJbthkzrD6LvLX8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VdsSAMfy; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708357779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=+rr8piR50zu1iWqFqfr2PiY/YffPW1SXu411nc6OM8Y=; b=VdsSAMfycJEVVPXtxzjxBTFXL2sLKZkJ4PDinMAsCmr6ENFW4lfrMvmm9aO4ga/N+sYuz5 e8nMNDWyHuUMwHrS5z99/OY8WFsfF9qnFb7q2uqWG6mCtsSIsOyMRM/qngUDf0CGM0cHEk HH5gcQ9ZZvsYrCpA7j7y9VoRB379RXg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-158-j2qqVb2HNxavVaJybt-aUg-1; Mon, 19 Feb 2024 10:49:36 -0500 X-MC-Unique: j2qqVb2HNxavVaJybt-aUg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-412557adc00so13284415e9.2 for ; Mon, 19 Feb 2024 07:49:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708357775; x=1708962575; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+rr8piR50zu1iWqFqfr2PiY/YffPW1SXu411nc6OM8Y=; b=TwPvAz9mZVp9ezN26iPcW6oVt0ArKixDANCdz+bZXI6U28fOa6kfa2zW1DuagPyej4 tMCSAt6AY/9XpYeFdfmZS9d/RE/Si+ZNI66f0dZqFL0mgFRohcpv3U72lhj7CU+/mxzv MeWYl+LG7vyPw2m43f6OPAXYyTXXbSgzaNCLjtZNuQzomBKJ5eBDZynENhfuSWjMzUv7 egtI6FIn5UkvLRtXGBqqxoLKKOoZml6L39w32RKTLfs/bUO21mMD7d5Q+77zyZIsYNNP Tv1yABYem6iNbMOMdsuQ1gIueR6gK2FCFk5mO4P8awAPJFrbM1Ij/0/tY7fp1hxtfhxx OW+g== X-Forwarded-Encrypted: i=1; AJvYcCUcA5R4eepfhY8bDKEKEnD3nGdu+LgjeyXp4enRE9Hn1ljJGeObhs3+nl8Q9HwjHw7Qt94hWi0h5k459xSxeD6veIVZrYBhm8Vxq3eO X-Gm-Message-State: AOJu0YxQdmo9ZS8sWOa7NBeWDXBzzTyjOrpEyANt5jDCtCm9Lm7TZ6bv LZBpv+Yrx3Q676+Ry5nREQ1YfTW+61sXVCj83+PPRo2uy49lAyWHiM9i7D2CdgznISIoXvPyJR6 2H2hNd2cjykoQfmxshQAC19bmajIsGWjNJaH3MJGlFBwgbpmTaYRbX7ENGCihQw== X-Received: by 2002:a05:600c:44a:b0:410:7499:7472 with SMTP id s10-20020a05600c044a00b0041074997472mr9149476wmb.34.1708357775300; Mon, 19 Feb 2024 07:49:35 -0800 (PST) X-Received: by 2002:a05:600c:44a:b0:410:7499:7472 with SMTP id s10-20020a05600c044a00b0041074997472mr9149463wmb.34.1708357774938; Mon, 19 Feb 2024 07:49:34 -0800 (PST) Received: from ?IPV6:2003:cb:c722:3900:648:abee:feaa:96fd? (p200300cbc72239000648abeefeaa96fd.dip0.t-ipconnect.de. [2003:cb:c722:3900:648:abee:feaa:96fd]) by smtp.gmail.com with ESMTPSA id w3-20020a05600c014300b0040fccf7e8easm11596482wmm.36.2024.02.19.07.49.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Feb 2024 07:49:34 -0800 (PST) Message-ID: Date: Mon, 19 Feb 2024 16:49:32 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 03/24] x86/resctrl: Create helper for RMID allocation and mondata dir creation Content-Language: en-US To: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= References: <20240213184438.16675-1-james.morse@arm.com> <20240213184438.16675-4-james.morse@arm.com> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1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hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq 3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <20240213184438.16675-4-james.morse@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 13.02.24 19:44, James Morse wrote: > When monitoring is supported, each monitor and control group is allocated > an RMID. For control groups, rdtgroup_mkdir_ctrl_mon() later goes on to > allocate the CLOSID. > > MPAM's equivalent of RMID are not an independent number, so can't be > allocated until the CLOSID is known. An RMID allocation for one CLOSID > may fail, whereas another may succeed depending on how many monitor > groups a control group has. > > The RMID allocation needs to move to be after the CLOSID has been > allocated. > > Move the RMID allocation and mondata dir creation to a helper. > > Signed-off-by: James Morse > Tested-by: Peter Newman > Tested-by: Shaopeng Tan > Tested-by: Babu Moger > Tested-by: Carl Worth # arm64 > Reviewed-by: Shaopeng Tan > Reviewed-by: Ilpo Järvinen > Reviewed-by: Reinette Chatre > Reviewed-by: Babu Moger > > --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb