From patchwork Mon Mar 4 10:32:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1907489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TpFQ571fmz23fC for ; Mon, 4 Mar 2024 21:32:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rh5cY-0002AM-RN; Mon, 04 Mar 2024 10:32:34 +0000 Received: from mail-pl1-f170.google.com ([209.85.214.170]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rh5cT-00024N-P7 for kernel-team@lists.ubuntu.com; Mon, 04 Mar 2024 10:32:29 +0000 Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1dc49afb495so41147225ad.2 for ; Mon, 04 Mar 2024 02:32:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709548348; x=1710153148; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bVuRr7XSKeqryC8wHebuOXWHiGehzQURjrTqUBG/qNA=; b=lTJu9Ye8nlqvtapFknEklRebbBr6s/ncBUK9j6y3mbUz9y/2NuHAHE8bNdpbva5Dis fqs6bOj7M3mzoVwa6l6tGZrWDrJnpU3upf2KfJxaJ9hcCacbLxsQmUyEizZA/snVB6IO h/jLYnMIbVWElWMAVVCuGEtyySj+A7ZMp/BuQsxaQw523WqWZx8MXS5YkIVRd1u5i+oZ vPGcl0bbihXXzy791tigS9c9MX6xhdSGCylUW+4sFuOqDYgo4JCCdPtElUxVEUphLLnT wbnrztKfF8fbaPdlP6+3IjD0D2Rr4uQWSCzhXYfWAdeb1pvO4/NfpfPYo1GkVBwZ3vXv WXSQ== X-Gm-Message-State: AOJu0YxEjqeZ2KJDa5/VrlNl0t/X3cqMnpbrvZyHuqiEhxhqRwQwnm0S vPJMa5xja91tFEJjGYG4uz4sO73mcsWTqf8KO3cv9JS0zSzk6ZeR4e+TWJ2W X-Google-Smtp-Source: AGHT+IGvY0kn0UpKpYYN+hKN/Za8AA6dlwxEL/ZTWlrR1VMcDLpsx+0S35vxC9sD1sEJiW7uuU2tMQ== X-Received: by 2002:a17:90a:d598:b0:29a:e0bc:4a9b with SMTP id v24-20020a17090ad59800b0029ae0bc4a9bmr6676287pju.16.1709548347614; Mon, 04 Mar 2024 02:32:27 -0800 (PST) Received: from localhost.localdomain (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id u13-20020a17090abb0d00b0029b2eccd158sm4396804pjr.48.2024.03.04.02.32.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:32:27 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/4][Noble] x86: sysfs cache info may not be populated Date: Mon, 4 Mar 2024 18:32:02 +0800 Message-ID: <20240304103206.686842-1-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.170; envelope-from=vicamo@gmail.com; helo=mail-pl1-f170.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2049793 [Impact] The interface /sys/devices/system/cpu/cpuX/cache is broken (not populated) if CPUs have different numbers of subleaves in CPUID 4. This is the case of Intel Meteor Lake. [Fix] https://lore.kernel.org/all/20231212222519.12834-1-ricardo.neri-calderon@linux.intel.com/ Reviewed, but probably will only land in v6.9. [Test Case] Check existence of cpu cache info: $ ls /sys/devices/system/cpu/cpu0/cache/ index0 index1 index2 index3 uevent [Where problems could occur] This populates sysfs entries that should have been available, not something new or alters existing interface. [Other Info] While this is targets v6.8 for Intel LPMD (Low Power Model Daemon)'s use, only Noble and Unstable will be nominated for fix. Ricardo Neri (4): UBUNTU: SAUCE: cacheinfo: Check for null last-level cache info UBUNTU: SAUCE: cacheinfo: Allocate memory for memory if not done from the primary CPU UBUNTU: SAUCE: x86/cacheinfo: Delete global num_cache_leaves UBUNTU: SAUCE: x86/cacheinfo: Clean out init_cache_level() arch/x86/kernel/cpu/cacheinfo.c | 49 +++++++++++++++++---------------- drivers/base/cacheinfo.c | 9 +++++- 2 files changed, 34 insertions(+), 24 deletions(-)