Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1856855ybv; Sun, 23 Feb 2020 17:02:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxfaJxkDMSGJpAtE8BPyacsALns+7GVi1WnhZjnx6xe4u9gaxk4OSHbV7aHj9Ch83w8jYhm X-Received: by 2002:a9d:4e99:: with SMTP id v25mr39484839otk.363.1582506147865; Sun, 23 Feb 2020 17:02:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582506147; cv=none; d=google.com; s=arc-20160816; b=b/2psaV+W3StAHrSlaZabzOTnREpRYtWmxQAkeJfMQiyE696Y1RqwO30euqczAfUwV uRop5C252DrZE4GD+3EmBT4wQC8YygYT6zKeSMeAEVvRa0CpMQxMszDFe2kF0mJlaXv7 cM6WHQf1/PYKrN5nbHL6Xe0MkFJPbWe2WsMfWk8oKvdOUYfRPlqkC7hxWjpZJUCV8Fl6 7+KJVQapDQ6r5ABe9tGpTM2bC14rYB/IXl01+R3PXZY4j7CWApTG4VlZJeYg0H58FfKT G/8N+2frcayramSGX9bBpd/m/LafUoXgPXzYGXSYbRIyBszJOQsbN6zdQYrr22webZY3 AH7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=geE21WUpBxQzQVQ/tm6WUyB7aw7f534naxzTS3XIcv0=; b=XLLPtixAepZlrLAX3DTz8PnTWRcIC3tZvTxVQgUPnku52mKsB7C298TG5A5OVfII5P PJ2s2AhbbFrjKDKUrlQxDBCDGEhyoUSdlVAeEb7vi4AqM0GBXltikzPQ8v07aSyyP0Rf WtAnMTtP8R2FOZCmLRFyDEELSlT0kDsKksStuBXiRKsBEzzH2c2qKpaqsuyqW6CbAhQI rdOyJqVAtOFKN04UkoSL4p6WxmTuXlizznvo//y9PpNbJRa47lHcc76Rk21Ip8A4ejCa zsrfKmodTk+wrkfEzlLOeXmw1EutdPSIu4lpqB7+jkJJDPH2QbAzAsNVcUoch8jdiGQ/ AD5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=jGJpEda6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si5845210otn.241.2020.02.23.17.02.13; Sun, 23 Feb 2020 17:02:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=jGJpEda6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727167AbgBXBBi (ORCPT + 99 others); Sun, 23 Feb 2020 20:01:38 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:34443 "EHLO mail-qt1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbgBXBBh (ORCPT ); Sun, 23 Feb 2020 20:01:37 -0500 Received: by mail-qt1-f176.google.com with SMTP id l16so5533836qtq.1 for ; Sun, 23 Feb 2020 17:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=geE21WUpBxQzQVQ/tm6WUyB7aw7f534naxzTS3XIcv0=; b=jGJpEda6lopIP0mDT3i7FtSyQ3i6gqRGvIA9MaPXAtj59/jXfXc8AwPdE72fa0U4+y lrdobdpZ61vy2gEduRj+HlYMaCBuHmHKxLnUALcURmkJRWhmUiG1gvFSWWtIQPzZ49DJ 2YzwNIWLLpKVEBDxc3Oo+ea2TiDzuXuqKrurEdRW7HK5HxUdVWt3Cv6lENsIv5/Rr9n6 tX/f32Zp/qsFhZe1DocUrH+nkPXCwLJk0/T79wKK9/W77YiagWI430Jx4VVL7AEF+b9e KWyMl9upimK5JT0V1cbEhDB8eW/HFzK2yQFCVOPPox/CxUmledYa0Wu1mrsGXx3nNmGJ zmpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=geE21WUpBxQzQVQ/tm6WUyB7aw7f534naxzTS3XIcv0=; b=OtuATQ/XblsTjYpAgv5Z80Ta8PFMKUgNn3Nln7VdI4uY4QCF9hvgKUPbCABQwAKybt 4UDKcPoRALFwC2ib4nIB7RGkILJ1FuL3JtBfwgFIBJMWfQApjCn57Tc+fbzGLbC33FrL f9QEJ1eHlG44nx5+b737T3u4Ygn//aocll9SoJHJWXixWCYQXlakuCTxZ4BTGXeHnjFR XBHlaflUviFnvJY30rximyKnr1RmoPXvFNcmVFB0yxjqA2kwgyH9DphiD7KnDGOmbsZR SnjUHo2VWAxTpRN2lYYNDQsSZbu6Wg1stM3oyPr/7yO5qOfnGviQVUStfxB+Z/e0mNS+ KPmQ== X-Gm-Message-State: APjAAAX9aZx+/uwU7b4e1+bZNqZpElqQttawgGEkpfpWuEh+ldTnMhpd Fzt5+LPo7RJLZvd6IV+1l6dcEQ== X-Received: by 2002:aed:2f01:: with SMTP id l1mr44205155qtd.391.1582506095368; Sun, 23 Feb 2020 17:01:35 -0800 (PST) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id e2sm5242528qkb.112.2020.02.23.17.01.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Feb 2020 17:01:34 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH -next] power/qos: fix a data race in pm_qos_*_value Date: Sun, 23 Feb 2020 20:01:33 -0500 Message-Id: <62491094-D13B-4EED-8190-4AA4EB77036B@lca.pw> References: Cc: "Rafael J. Wysocki" , elver@google.com, Linux PM , Linux Kernel Mailing List In-Reply-To: To: "Rafael J. Wysocki" X-Mailer: iPhone Mail (17D50) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Feb 23, 2020, at 7:12 PM, Rafael J. Wysocki wrote: >=20 > It may be a bug under certain conditions, but you don't mention what > conditions they are. Reporting it as a general bug is not accurate at > the very least. Could we rule out load tearing, store tearing and reload of global_req in cp= uidle_governor_latency() for all compilers and architectures which could int= roduce logic bugs? int global_req =3D cpu_latency_qos_limit(); if (device_req > global_req) device_req =3D global_req; If under register pressure, the compiler might get ride of the tmp variable,= i.e., If (device_req > cpu_latency_qos_limit()) =E2=80=94-> race with the writer. device_req =3D cpu_latency_qos_limit();