Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp87838lqb; Fri, 15 Mar 2024 16:32:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkI5Y0n0bYcTkzTP8yqfapGCNxnRM2owohVvQN2bJgnmVgT2a8UqY8GfmGk2xSRqzJLbtmjWtf5VZFMe7UX3WTK6M8SrjuEyCtjNeZ0Q== X-Google-Smtp-Source: AGHT+IGRrqe0sKuTqu5TW5Cyoj7WPqWZQd4AAOkwa7o0FE5Tdv8Xe5dEqSkQksaIXdafSDStp5QO X-Received: by 2002:a05:6a20:4282:b0:1a3:2b94:da70 with SMTP id o2-20020a056a20428200b001a32b94da70mr6830643pzj.11.1710545561059; Fri, 15 Mar 2024 16:32:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710545561; cv=pass; d=google.com; s=arc-20160816; b=nrNYQWOwcUqMCkfh5KFjAPSSeKsbPfP+eliIn5t08+BioCc/TvNb53mTQ9xTEMwMAv u2LMpQj6udEDv6nyavXauXVf16XrbKWJaGshOrydZwg6pGc8zr4ZaRYkluwaqxtGPFDi D3AK/zMIAfBVwJg1Oj3+9igTsvEw+Rs/fpbL8NCZNTfVGrssDwNg/BzSQRPZG+FeIyDE +dhlcUzAg92XRUKy2DPUVewMeLRNUiaaOgWSbblmoiSfcCDTKEO58/cm8oALqWCZW52l OWuAux/LB3ZJHZyoGpzNDrnyFramDt1Z+E0azsf+4AfFe/70W7jtv0B6Wh9QEn1ENhpg qKIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=hPsi4ru9qiFSnbt3zUsnb9Vb/ug0QoonRw6BPPhMcuU=; fh=J62up1uRauxoIZUzSzatxpQI9EgC+T98hAiEjmuzayk=; b=vdpuueh6V1hzre5thjoONC4cDdTyBoqxmqQzxvF2pEGaJ47xGPZJHBvcofLte41pEf iwxeyd2tBqd6BKfe4VKd23Ud4T+HaD9HfWvR2zh9AjBm0MqNl6jXew0K1fQCaFeooRE1 QuBH6ZLHWiCDE9/m6Pho35DSYILPQhkPITNBdjYTwpO+ofzjpe0LB6LV1g+GB9nzKrJk Kc0i4R9e8JWp7qj4h7eAmzdVlt9RlNTa0rg0DSfT++zKlrJSIcPqQ3Vf4J4buPTMiA0S aJPZm7cuWwS59SXxl6/SV0z+d8TiinxGXcIQk0shXvDK/PDHgc87/RUQTvK4nkVT5V0H oTYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xbiZUZgA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-104990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h24-20020a17090acf1800b002993b6846d5si3594293pju.85.2024.03.15.16.32.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 16:32:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xbiZUZgA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-104990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A0E2D28311D for ; Fri, 15 Mar 2024 23:32:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A5A75B5BD; Fri, 15 Mar 2024 23:32:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xbiZUZgA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DYaRuyOC" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 8E0185B5A3 for ; Fri, 15 Mar 2024 23:32:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710545556; cv=none; b=UANFh+JQR31qeBC0lo1IXPiFTYW3hxkydVfa3sbG4iGhMUqBy+DdCQWJCnz4bBege08YMKT8oWXKXEBhbcpMGgZO6vbda1M1hS9cQMJ50WW+pEPBiRj1JTtzY1dw8JzHi94mtwkiEEly8/pq9UVofCqEQ+2rZZhu1sFY6xssb/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710545556; c=relaxed/simple; bh=wGgLZfe1j8aEsI9BnVlU1qpcetPVIoO4qooYMmIQkb4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=YWoUU5EwjnQlTwO1M71MfvFJiohKIbcEuY63ldjM+uTYnpam1cp3z8okdrAsBSa+gF/FI+mTAmcPgwDJeNDZflv+SpqSJlrDdtYsfzMlIeh2hU6UdNCALvIa/2TUzY7o0llLk4CpvbrKFJv7Nm6koY5CMzrM7erKTmh6V8CwFtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xbiZUZgA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DYaRuyOC; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710545551; 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: in-reply-to:in-reply-to:references:references; bh=hPsi4ru9qiFSnbt3zUsnb9Vb/ug0QoonRw6BPPhMcuU=; b=xbiZUZgA+s18fxpr3n+2SL7/xrrjvmrCkmAIlAQwvDq2u108IP3iiKIQwMXknbvTJjX2+M t/G8yK3YdqJWHfKOAXOxqPhgHDbPEhp7QOT4vqm6kbSQWzL+iXec96N0PBYEIUYELT/qBN d3Dnh9ps3eK+woLggfvp8SmVOaf9mOa5eMXlKdZL08caP5Eqir/ZTp1Ja+6i4WfkeZ6jgR noB8AEVi2bCfaqVkvKHwvYBCtlPWmmnPxXr1/jQsv0tZtxN1i5UJaKs0+MDz/gWK+LPJac Jg0Ywrw4aPORAw8hDyxnk3s/DO8u1krPbdjdZIfV6/UiuFuf1g1pVwqzuTG/EA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710545551; 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: in-reply-to:in-reply-to:references:references; bh=hPsi4ru9qiFSnbt3zUsnb9Vb/ug0QoonRw6BPPhMcuU=; b=DYaRuyOC+tq4sfn8PNpPkF5sckrjbF+GXQJnqDaT6rzRea0PYHg+OF+flZXQDStJssLTnV LXpTkdB1SpyTc0DQ== To: Reinette Chatre , Rex Nie , james.morse@arm.com, "x86@kernel.org" , "Luck, Tony" , Babu Moger , Peter Newman , Borislav Petkov Cc: fenghua.yu@intel.com, ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: 32bit resctrl? (was Re: [PATCH v2] fs/resctrl: fix domid loss precision issue) In-Reply-To: References: <20240312075349.977-1-rex.nie@jaguarmicro.com> Date: Sat, 16 Mar 2024 00:32:31 +0100 Message-ID: <87jzm3jckw.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, Mar 14 2024 at 08:25, Reinette Chatre wrote: >> On some platforms(e.g.,x86), the max cache_id is the amount of L3 caches, >> so it is not in the range of 0x3fff. But some platforms use higher >> cache_id, e.g., arm uses cache_id as locator for cache MSC. This will >> cause below issue if cache_id > 0x3fff likes: >> /sys/fs/resctrl/mon_groups/p1/mon_data/mon_L3_1048564 # cat llc_occupancy >> cat: read error: No such file or directory >> >> This is the call trace when cat llc_occupancy: >> rdtgroup_mondata_show() >> domid = md.u.domid >> d = resctrl_arch_find_domain(r, domid) >> >> d is null here because of lossing precision >> >> Signed-off-by: Rex Nie >> --- >> fs/resctrl/internal.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/resctrl/internal.h b/fs/resctrl/internal.h >> index 7a6f46b4edd0..096317610949 100644 >> --- a/fs/resctrl/internal.h >> +++ b/fs/resctrl/internal.h >> @@ -94,7 +94,7 @@ union mon_data_bits { >> struct { >> unsigned int rid : 10; >> enum resctrl_event_id evtid : 8; >> - unsigned int domid : 14; >> + u32 domid; >> } u; >> }; >> > > resctrl currently supports 32bit builds. Fixing this issue* in this way > would first require that resctrl (the architecture independent fs part) > depend on X86_64. Is this a change that everybody will be comfortable > with? Why? Making mon_data_bits::u larger in the way it has been done does not have any dependency on 32 or 64 builds unless I'm missing something. > (Of course, there are other solutions available to address the issue mentioned > in this patch that do not require depending on X86_64, but I would like > to take this moment to understand the sentiment surrounding continuing support > for 32bit resctrl.) Caring about 32biit resctrl on x86 is a pointless exercise. Thanks, tglx