From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A203431F99F for ; Mon, 16 Mar 2026 03:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773630756; cv=none; b=eQgspkT3KATiBLq7Tyyc3mZ5rlBf7gjIpbe5hu14IlTtfRR8YtfQb8KXJx23AXqLkao59T4znKO8GwwA39+5sDY6dfxDDlp58zTSgcOSmYUpA+jgH9j2Fi33cWs9SF3DUKFMB5G/2bnf384783SOBxaU8MUcdbAH13NJ0jJ2UmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773630756; c=relaxed/simple; bh=f79oE6jpLPe1MpDhp0Uv9o4z3y9nRWjIbmaK9M2G7Pg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y67e+rSNVryleTuHe/sFZJ2CdDbd1/GTkgzzCXOcBlkq52D4PZ3B1eUxk0nO0+wpsZfEewI5sWjiLuSfpyZyg6fcA8aOVrVlgTyK4sPj6Tzla1FWkPlWOfHumEl4kH4CucI22Tn1vvfdK6iINaO7Fse3rBBSGmNImjtbEVcuG3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-829759ca646so2438431b3a.2 for ; Sun, 15 Mar 2026 20:12:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773630755; x=1774235555; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k/bfv35vSMPbpMm260c6c5TZ5tOU3wF/YzOQKgPPdZU=; b=gZseZgDcLrzEdjKjhxJbtP6wIPd9W5R7L9WBj15JvxkpLX4XK98wCxwGuMcUgS+e9l bawzY3U5rBI6ad/yt6yBDDq77wZne7/La1GenoMI/2xTHsSU0b4V1PMdhBnwHj5kp1Vh 9DTbwEjIWUnJRpVBJtNaVlCjN5ocTUGxTuMIHWpK5dB1CSeeC31f48PNmH5uQcdMjsvI o6NyjsI+tqByJX3rEAEPpiT6BsOoSUpcr8d56RBR2vRr7YvcGel6lSbhTl6hYeJQF2LX uFdgcMaEaUIr/IQfeLK60GIwbT6iXO6T6Rb70te/p5T09OhC2F/DG9cDtpya4TPsN+Na 8q3g== X-Forwarded-Encrypted: i=1; AJvYcCW0+SPgYLXhDqi74Xg5M0yhojrc1sO2YWkIj4MwffjFsKuvJp5nq4aTO2IqeoY7oA5PzQ1b4WoVtWAFQl0=@vger.kernel.org X-Gm-Message-State: AOJu0YwkP3UJY1lVbNqwNCawSEx9o3iHSdB78L7ODFg5Z79Ap3shJzvK uKsfWGxqmLrOBFAyn/XQW8FBkbjgwZolvffjOklOsxNVB7RIUdGkJK+T X-Gm-Gg: ATEYQzxoesK92BXQ0p9mbm3ClFcO4caMWL0Rb4jg7j4Pl4+tvfHBsbvGJ2aiHJ5FIHb ivBzg1VfBsluHP2NHeL2eI7uV4sau+JgozP8VXbi0K/rR9u2E0csmCAZ7Bdj8uGWOuPCfW/o3sR RXsSPddFp20whfp68gxdIVx8UExzPCL0T94WDSRJMWlyLVINythvUfhBtn5b0ulRGVSJAIZPL5A C9cD4uCboZ32rm/vwKAjauS4Nu/cbN2gAM1kLuOmjpZol6Y0kij7TPRoN+ls8uafAROweHQtZkc 7P8uqoOZrCHNj4/q8rqcd7yi2KLrWa5Kah1L1Sk1fAILCo1xOJrZYw2ihfKSgnZzzeRhBsycBG2 glovgWp1yRBTyfgWinMlqutbi/ix66rwWEPJye0hyj11y4O2PEiCPq/rhiKGKv7jLmMR4yvGImd QxvmyF9sd0e34xHkbVVEBj3EDFFWyjNUeHoI70H5vJPmvCq52ec4+WnDvXaj0za7bsDXmGFUcqd vkE8X34Jurqe4xDMSS17BDPgTda3Zydaofyyu71rZAi+oNeG+8= X-Received: by 2002:a05:6a00:18a0:b0:824:1b66:6ae2 with SMTP id d2e1a72fcca58-82a196d2c8fmr11133754b3a.10.1773630754968; Sun, 15 Mar 2026 20:12:34 -0700 (PDT) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82a072414f8sm11787096b3a.4.2026.03.15.20.12.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2026 20:12:34 -0700 (PDT) Date: Mon, 16 Mar 2026 12:12:33 +0900 From: Krzysztof =?utf-8?B?V2lsY3p577+977+9c2tp?= To: "Li,Rongqing(ACG CCN)" Cc: Bjorn Helgaas , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: =?utf-8?B?562U5aSNOiBbPz8/P10gUmU6IFtQ?= =?utf-8?Q?ATCH=5D_PCI=3A_sysfs?= =?utf-8?Q?=3A?= Suppress FW_BUG warning when NUMA node already matches Message-ID: <20260316031233.GA968520@rocinante> References: <20260313050826.2126-1-lirongqing@baidu.com> <20260314205407.GB672783@rocinante> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hello, > > > The numa_node sysfs interface allows users to manually override a PCI > > > device's NUMA node assignment. Currently, every write triggers a > > > FW_BUG warning and taints the kernel, even when writing the same value > > > that is already set. > > > > So, this works as intended, then? > > > > I don't know if this is intended, but it feels unreasonable―writing the same value still triggers a FW_BUG warning. The pci_alert() might be a bit much. Especially, that users often don't have any means to contact some vendor with a bug report or anything like this. Bjorn has been looking at potentially removing such warnings, if there is nothing actionable there for the user, precisely to remove the annoyance. The taint would remain, I suppose. > > What makes multiple writes to this sysfs attribute, if you don't mind me > > asking? Do you have some tool that does this? Some automation? > > > > I have a tool that triggered this warning, and I will fix my tool. > > > Especially, that you seem to be writing the same value over and over. > > > Not , but a user is allowed to write to this file, and subsequently will generate a massive amount of kernel logs―is this considered unreasonable? Should we add some rate limit? Sure. No problem with that. I was more curious about what your use case was, if anything. > > > if (node != NUMA_NO_NODE && !node_online(node)) > > > return -EINVAL; > > > > > > - add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); > > > - pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact your > > vendor for updates.", > > > - node); > > > + if (node != dev->numa_node) { > > > + add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); > > > + pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact > > your vendor for updates.", > > > + node); > > > + dev->numa_node = node; > > > + } > > > > You could invert the check and make it an early return where you just return > > count. Would save on the new indent level. > > > > Good idle, I will fix this in v2 > > Thanks Thank you! Krzysztof