Received: by 10.213.65.68 with SMTP id h4csp1510047imn; Thu, 15 Mar 2018 01:28:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELub++nShWbTNaiTMiPREtEOK+LLU1ToQaxIAO4NH8q0KPmfzNjoZ+va7cdnj9PnvEmcO92i X-Received: by 2002:a17:902:bd8e:: with SMTP id q14-v6mr3427116pls.19.1521102534006; Thu, 15 Mar 2018 01:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521102533; cv=none; d=google.com; s=arc-20160816; b=hxrhvODkxBrxZKCH95obDqFeZ/32gq+KGUVZRoLhlifeRYmp7rgLZhzKgJNhiZKlHV 2+1NOVHdXEtPiR4qaT947yRh/kX8n+f9lSGIsx/SomcqsJdEijgND1NZELpsSV1HyEWo IQ/mOcm+B9K0gzlvEa//YlAagdiU195jXwdXC+gvZE++bWkmUvHoaEInrtabkWrbXyh5 9U3SNqQO2FJDh9vMK8y7CafZs7G6wQKKXi5DrMuBWIjfvvZ1hKumbqXuRWZekCJylU3k twajpuFOAeoAE4oosL/v5+QdZN0sFoKH5MlFnixcy4/mEDNIOPeD+YayjIDVhZV94+2V bVkg== 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:arc-authentication-results; bh=C7Tt9eu53RU5Bo/MH9NqG2GpwtlhihQlpe4pJld922Y=; b=w5nBrJDp058eBiPktBV+SJ0U1sYSwQNnm6YdpR2dQVOB6GI7UNG5rtpjCJpzMmYitD p8w+UPw4Rh6RguSmb6ud7OyTxU0PGGb0+tQgOZ9EUfS3dT/X65Q2GjAHayx/t9ABMUXG aYhsjSaZF1RC3kuy9FOR1Cyi3H1uidrIDRX/BMUACLPvtOFgAbOpsAnn/jkbDCUcKEuT i7nqjyFHA4S8ZKc0flcVHZ+QMUfvPt1LwJmBdOZHv1z5+O+rVer3joP9RWWF6+nVx6X5 u1ZVmy6LNxsYm1DEXeIGcsmzpLwjtgkW+dDXGFpfcqnxAawsOrW09PcfK09Q0NXKpSXW h3uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=uFfr9BCx; 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 b3si3138928pge.715.2018.03.15.01.28.39; Thu, 15 Mar 2018 01:28:53 -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=merlin.20170209 header.b=uFfr9BCx; 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 S1751470AbeCOI1d (ORCPT + 99 others); Thu, 15 Mar 2018 04:27:33 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47138 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbeCOI1b (ORCPT ); Thu, 15 Mar 2018 04:27:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=C7Tt9eu53RU5Bo/MH9NqG2GpwtlhihQlpe4pJld922Y=; b=uFfr9BCxH6pr34yNWEfH25qg5 q3suaamI0+8yIZxZJfbMvGrjCTX5lmwxro2TrSyZePeQmRsPbgrWBUR883HiMae1FihkHVJ5XtKqF 5ye8DDMFOkbRx3XkXYV0vWQKk6B/eT0TJf5K85WpkI47CfqgQZVutanxUpm2+UT4sN21oZT3FezWq +umBkXYA6C6buK1I4Gw8d/F4yzUSd97wyT7L+Htxcln48cPYVsW4Yn5UEZTUi5EUqQzdwX2YwR5aV DufWsqrcyCjfdGTFCLUZdfhc8JscNiNlmByL18DHTNlwfGaQCjgJEio25+yYUuNIM37zHgn2Rs3Td WuNvPknVA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewOEN-00029k-8d; Thu, 15 Mar 2018 08:27:23 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 07AC72029F869; Thu, 15 Mar 2018 09:27:21 +0100 (CET) Date: Thu, 15 Mar 2018 09:27:21 +0100 From: Peter Zijlstra To: Vineet Gupta Cc: Alexey Brodkin , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: Do we need to disable preemption in flush_tlb_range()? Message-ID: <20180315082720.GT4064@hirez.programming.kicks-ass.net> References: <1519917189.13866.6.camel@synopsys.com> <5a5c67c1-9f45-f908-2c8d-0914cd616a18@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a5c67c1-9f45-f908-2c8d-0914cd616a18@synopsys.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2018 at 01:19:01PM -0700, Vineet Gupta wrote: > +CC Peter since we have his attention ;-) Yeah, timezone collision there, I typically sleep at 1am ;-) > On 03/01/2018 07:13 AM, Alexey Brodkin wrote: > > Hi Vineet, > > > > Just noticed that in comments for smp_call_function_many() it is said that > > preemption must be disabled during its execution. And that function gets executed > > among other ways like that: > > -------------------------->8----------------------- > > flush_tlb_range() > > -> on_each_cpu_mask() > > -> smp_call_function_many() > > -------------------------->8----------------------- > > In general I prefer not to - Peter what say you ? The comment with smp_call_function_many() is correct, it relies on preemption being disabled in a number of ways. I would expect this_cpu_ptr() for example to complain when used with preemption enabled (CONFIG_DEBUG_PREEMPT).