Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3534631ybi; Mon, 27 May 2019 01:32:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyt6Dme9Ud4zrgNELSBxnmgdVXEJK1eNYZaDpcaqe0OXAckLbPHfjGY+yCNOZG5EQC2rpXK X-Received: by 2002:a17:902:b682:: with SMTP id c2mr28561114pls.9.1558945943140; Mon, 27 May 2019 01:32:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558945943; cv=none; d=google.com; s=arc-20160816; b=j0MZX+yzp7CmCUCbyyQ8jVCGo1tfjzJHjyfrfr+veehRkdRs6yQ7Nwgrs1uXZvsHWD Rlk5q5nlsPZqNrwrT1SKBWDMc6ykyQIb0APDcs9hZ+akchCcn+pfr+7mxpXpeP8LCUaM 2mZk3s94F4Fw9Gj7NA30y/pJBZ3kL72UGHw7B4PTyTCMsL3QiJvQdWDZnVNhsRZ6gGn8 RN2dEOcIIlwuK3IJwyNNEAflHZ4h8jWvhy0f63CQcGsBNQHWDcUi5zkz9UaeognIK2t0 bUG5pehnIw8r3lI/2cSAsh8gCVMDqVZiXhKtnnQg4GeEmr/EtDtfmjMbTckDrbDyuTnH omrA== 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=tYmgRRAZXlzmh+48MaFMBo9wJBO9K9UONq9hyYIokTA=; b=VFFeITlIpOaPLltPW+CTAF2bK6wZ/tPy8r44eWz4muFJCSr2o+Jf8kFOFCDqgmR38/ 7V61udaQJL8jDu8ohgcaQ9pPFntGivzWIQni1RVG9O0BAjPIZsr3wt5bvM9+JMT1ctM4 nNEzuRlpTwYRvQ0K9btn7ooIut9bEXDaQyE+Lm5g9RcYU9PuVeudNmNzogL0C1XEjGto Bb27W5nFRo7+1yIeE0NLs6qZG1KxXxKdgo/XaeIT5yDqNG7RvV+RKqFMy2ZNdDZwF5sy t7qv1+lTdMSxkpH1K9XQAU7DKBfHPQgryb9LeGLFHBnXNjDSOuxgFkBHYhUZroOJqEg/ DCEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=r3kxN2et; 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 b5si17414817ple.81.2019.05.27.01.32.07; Mon, 27 May 2019 01:32:23 -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=r3kxN2et; 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 S1726426AbfE0Ia4 (ORCPT + 99 others); Mon, 27 May 2019 04:30:56 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34480 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfE0Ia4 (ORCPT ); Mon, 27 May 2019 04:30:56 -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=tYmgRRAZXlzmh+48MaFMBo9wJBO9K9UONq9hyYIokTA=; b=r3kxN2etHuPUPm99PDyolE5PF +ux6Oy+VSD5nw1VYtyKO2JeifpDyfqhrUYBJRRpri+uRhp3Y7xfW8RdqhdO8SJycTyEwbGM/eSIir IWHfDB0GzPnW6GN8rpLem+f/OnbozvrhOq0jaRGBW+zNdWEWyIHN+0Afdh2b4m2ByYiEJ2zdRUtIa rp+Sm1mm57JObKTUnTJ4TsK5zAjr/FGWA4zEZxryLl3m1VuJsOcFcBnmt1AAayzQH3Oac4EHqSONp 0POkM4yiSeakTgF6VrvoFcDkVziPANeBoaqoIX5RaVsY2alfQSBoh52kFeYygpJwiekEE7kd9P+Xd VyGFfJJYA==; 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 1hVB1x-0006ZB-RZ; Mon, 27 May 2019 08:30:54 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4B3B320137ADA; Mon, 27 May 2019 10:30:52 +0200 (CEST) Date: Mon, 27 May 2019 10:30:52 +0200 From: Peter Zijlstra To: Nadav Amit Cc: Ingo Molnar , Andy Lutomirski , Borislav Petkov , linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [RFC PATCH 2/6] cpumask: Purify cpumask_next() Message-ID: <20190527083052.GR2623@hirez.programming.kicks-ass.net> References: <20190525082203.6531-1-namit@vmware.com> <20190525082203.6531-3-namit@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190525082203.6531-3-namit@vmware.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 Sat, May 25, 2019 at 01:21:59AM -0700, Nadav Amit wrote: > cpumask_next() has no side-effects. Mark it as pure. It would be good to have a few word on why... because apparently you found this makes a difference. > Cc: "David S. Miller" > Signed-off-by: Nadav Amit > --- > include/linux/cpumask.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h > index 147bdec42215..20df46705f9c 100644 > --- a/include/linux/cpumask.h > +++ b/include/linux/cpumask.h > @@ -209,7 +209,7 @@ static inline unsigned int cpumask_last(const struct cpumask *srcp) > return find_last_bit(cpumask_bits(srcp), nr_cpumask_bits); > } > > -unsigned int cpumask_next(int n, const struct cpumask *srcp); > +unsigned int __pure cpumask_next(int n, const struct cpumask *srcp); > > /** > * cpumask_next_zero - get the next unset cpu in a cpumask > -- > 2.20.1 >