Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4262707ybv; Tue, 25 Feb 2020 16:35:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxKCXdW7oqZ0h9RhxJo/K0GEazDx6m9EH5VbJ2Ufp167tzgeS6HSaifVX9zO0qCgLZoU4IH X-Received: by 2002:aca:cf94:: with SMTP id f142mr1131214oig.31.1582677345733; Tue, 25 Feb 2020 16:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582677345; cv=none; d=google.com; s=arc-20160816; b=byQ8GRCoFaHbeIbZUmPEJK0h+8r4D9VZhyVd4RV2tmKLKsmQtckMGo2NCDT4NDeGKg 4RAaMGU+LfFrCeLiEnusFivTiseBwZxZwDsD/trZ4ZnXjQ7kx8Eazl5CLdwpIwpGfHRc YHvQ54jhE3Oid/VAvhnwZ6HExAKRGQqH9HxZGmmnlPC3J8k6gm93BCEeUwdqpFo2BQQ9 NFy39Uwyx2SPS2jYGrY0gWEPYP7Cufp3NDx2yh0aZgt7d7zux0iAyAEu5skYwdw2zncp u6cLaIbodYTxJ0LxPb05O6JgiyO69sG6y6RUqZeK+Rwyq0/owPodoX6WtKFDUiOWscql Vr3A== 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=dcOce3PoshJ+NY86BbuLlniUku7fXlpuSXAZ8LGYJdw=; b=F8xk7b4QoV3PdOJ1TsVxFRu9/VLzBFpCdMFGvis9ySyLB18f0M/EUcQCHmmrSWgCz2 tCyZ+8+icZtXNHnWf9POd7Ko0Q3TtWc433XMiupwgQE5ElWNQRtqo0KVGsAFXk3fxLjh cBr0fLqGj6pIl2BNWcLhxHESQ5sjnkuL7lSME0OZJtLg+ridg6RaYc4/RpFQJNZS3PzK 3zKKLO4qQZca2+pyD0POfso0Mw01BJacrAcQ8ZBMYtRbCiPBtc8AnamS/wR+Xmh9Q9wv DRH3LYV5W7wboOxegeNfAD+lJ245gOo3zBX2DP4Bh//rJ44romIunEcAYiIjgru1XJxE gF6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=egLSHHnk; 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 t10si278231otp.310.2020.02.25.16.35.33; Tue, 25 Feb 2020 16:35:45 -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=egLSHHnk; 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 S1729376AbgBZAeV (ORCPT + 99 others); Tue, 25 Feb 2020 19:34:21 -0500 Received: from mail-qk1-f180.google.com ([209.85.222.180]:42008 "EHLO mail-qk1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728865AbgBZAeV (ORCPT ); Tue, 25 Feb 2020 19:34:21 -0500 Received: by mail-qk1-f180.google.com with SMTP id o28so1032183qkj.9 for ; Tue, 25 Feb 2020 16:34:20 -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=dcOce3PoshJ+NY86BbuLlniUku7fXlpuSXAZ8LGYJdw=; b=egLSHHnk9JOP89pQ+k1B3mbni7p4N0tKpBslDS2rPS1BjzYxUw8Ton4W8ZeKUfaCCa uybfbl+0gPLICpocoLH9Ag86nk2V29oEpjj4te8uRyqqzmMT3sIANuVIvIfi8Yyy3uAz balr9ZS2hcpP86kln1EavIcj/mo28FKW0nZLM9uBkHpQrO1wbrf8tSO3wF5NRsqqfjb0 hBYHRaKdwbTjjodWlVbk6kk/4G6Hzbwrws8fCbSNtLGrb2LlkLxShUJlNfN1KytmPxDP mrFEhKmlGeOcb70AJ6K3tdR6dCnyO289dGsdXrJzkOnadWsiaP35kJwXmACJ/OzlLRFk hNvQ== 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=dcOce3PoshJ+NY86BbuLlniUku7fXlpuSXAZ8LGYJdw=; b=K6cWn7YzeulAJ8QIUsXId7Xj5ZTQpWOdlBKxu2IptFhssBkxhrRS4onVswep7N9EhW EvxT+Suz+bfaaogy5nU8nR0efGBXaU5bLYIkSSrL6QuOSbgE1glLFou1YbXQqodTH7HN tiw776mL9iw0bd3j5kFBxoVLcE6SYrv7jr+3cTABmQZM0URJRyBiSnH3EL498n+rQAWD TfZbMMlrc3mfLv6hNFOsJA5b2E7TKqTRV0ZUTKrc+rIKRMEAo/BhXKUyzyfzvPeVGZCA wY4snGmmnsJwUdqOqIb32N3I3Kid/LiKKrWWuTq6/nuPhnM0BbH+l/Xz+9wrDgUG97r2 JUvA== X-Gm-Message-State: APjAAAUm2Ukkhyx0LcXxubF+1tZoK/jJjUQkGKccJNJSwonYrw+gxKpP CDb8vKVUGLSidBF+si8ORxcq1g== X-Received: by 2002:a37:9b45:: with SMTP id d66mr2147082qke.84.1582677259776; Tue, 25 Feb 2020 16:34:19 -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 j4sm168618qkk.84.2020.02.25.16.34.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Feb 2020 16:34:19 -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: Tue, 25 Feb 2020 19:34:18 -0500 Message-Id: <705D8B35-FBB5-4D32-AE63-DD4E773CEC1E@lca.pw> References: Cc: "Rafael J. Wysocki" , Marco Elver , 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 25, 2020, at 7:10 PM, Rafael J. Wysocki wrote: >=20 > The target_value field in struct pm_qos_constraints is used for > lockless access to the effective constraint value of a given QoS list, > so the readers of it cannot expect it to always reflect the most > recent effective constraint value. However, they can and do expect it > to be equal to a valid effective constraint value computed at a > certain time in the past (event though it may not be the most recent > one), so add READ|WRITE_ONCE() annotations around the target_value > accesses to prevent the compiler from possibly causing that > expectation to be unmet by generating code in an exceptionally > convoluted way. Perfect. I=E2=80=99ll send a v2 for that unless you would like to squash it i= n.=