Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2306525yba; Mon, 15 Apr 2019 09:00:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPvu/20YN5/CkbD54qS0JUxRCY1tCRjZuHw8jiCZ74nEJ1P9pKOwBf0vgxwIbG1HIrH8tK X-Received: by 2002:a62:6985:: with SMTP id e127mr76845893pfc.188.1555344008281; Mon, 15 Apr 2019 09:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555344008; cv=none; d=google.com; s=arc-20160816; b=069yf943lLzGcBxo5OtP6/QDUzeVr7MLMcWrtEPw3MJuEN9MLBkWfjU7FEhW40zFLw r64X1JfFtumqVtg9iQ67EB1sdP9OKWX+hD7Ps1CioYqraLOSdxqClZfUV+Izjg+eSCMC tnoMmFygBykcefIhB2Jn6u55m/emQflqiI9iaIMhktqOzuYXqAstuDOgV1YLZ7J8mNkk v8R6KT1VO3sI8xkZ3PKrD85KliDvcjOzJL9FtzNg7TZGnfMmYu/0nMpMpsg0/3L8mWDy FPmCPnTp8FgXsjOyolmjoBYBqtzcXiYTRfUWDsVT72/J5YS5vTmk+z3OzhgWzRGP4zr/ CVAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uYbands8A7hvg7R0rJXQgpW8vvSABlyLkpry63I4iY0=; b=bd2EqK8tGncf1jSIgZV3uTbvGv06WFFLkZ0OV9v5CZGRsGNBfj5A+J8wrkZ8YwSXm6 ZeMjDWzDfPG/iwxbH0eJTTP1WgLpF5C+ye+EKJ5wMIxS2n/R+jy0NyAAx7t/DvaJRSwW oCVdqUT4NSBqFjtG0YG4VvTFMJFKcddJM/r5HwAM4tck3jgfeLu5DQIWOxloj6+4O7Pq CDnleH+cAVHufVK2eW47Qokqd5//8xKydQVbctbVwmmvsZuW5POQvdvRfMcpvXWmwhS+ zuJ5xuPN7HxAtYZ+cpJvz/J8Mgft141JTT4O/DqoGZSyZiMLbKE7zNAwkDxd1SrlXnco TzTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SgnaZlRS; 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 33si20201367plv.293.2019.04.15.08.59.52; Mon, 15 Apr 2019 09:00:08 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SgnaZlRS; 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 S1727618AbfDOP5v (ORCPT + 99 others); Mon, 15 Apr 2019 11:57:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43064 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbfDOP5v (ORCPT ); Mon, 15 Apr 2019 11:57:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uYbands8A7hvg7R0rJXQgpW8vvSABlyLkpry63I4iY0=; b=SgnaZlRSLi792UND9B+1D8Ctr wQc6Ek0lvhARW604uBt2zCMmJSPNEj6l2UhsqRRI6BJaXc0bFl9ua/SOitIlbRlToDK6uuRsxvZ3j ofAdqAPuDphvfvD1qL2088hC+1HG35v27c+CbC7ExAWYmFqgj8ISDJUnZiBZPbC8n3dMyZdLwYrOx QpFI2EaBlt1wcAf3zP5RhOFCr/NwFe+42Al3+qtGWYabS32SXZ6qFtf6GnMTNKL9jNE9UBK69I7sM qcbC04hNFr2EJia777i166LZRE1rEH1FAuHY77mY7GIFNimZIemhBPzdYApNb5qUc4DCtLsenvNUH ZvfTZ0sxA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG3zM-0001RH-4s; Mon, 15 Apr 2019 15:57:44 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 781E9213A0759; Mon, 15 Apr 2019 17:57:42 +0200 (CEST) Date: Mon, 15 Apr 2019 17:57:42 +0200 From: Peter Zijlstra To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, ak@linux.intel.com, kan.liang@intel.com, mingo@elte.hu, nelson.dsouza@intel.com, jolsa@redhat.com, tonyj@suse.com Subject: Re: [PATCH v2 2/2] perf/x86/intel: force resched when TFA sysctl is modified Message-ID: <20190415155742.GI12232@hirez.programming.kicks-ass.net> References: <20190408173252.37932-1-eranian@google.com> <20190408173252.37932-3-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190408173252.37932-3-eranian@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 10:32:52AM -0700, Stephane Eranian wrote: > +static ssize_t set_sysctl_tfa(struct device *cdev, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + bool val; > + ssize_t ret; > + > + ret = kstrtobool(buf, &val); > + if (ret) > + return ret; > + > + /* no change */ > + if (val == allow_tsx_force_abort) > + return count; > + > + allow_tsx_force_abort = val; > + > + get_online_cpus(); > + on_each_cpu(update_tfa_sched, NULL, 1); > + put_online_cpus(); > + > + return count; > +} So we care about concurrent writing to that file?