From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754657AbbFONMf (ORCPT ); Mon, 15 Jun 2015 09:12:35 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:38744 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbbFONM3 (ORCPT ); Mon, 15 Jun 2015 09:12:29 -0400 Date: Mon, 15 Jun 2015 15:12:21 +0200 From: Peter Zijlstra To: Sergey Senozhatsky Cc: Andrew Morton , Tejun Heo , "David S. Miller" , Amir Vadai , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [PATCH resend] cpumask: don't perform while loop in cpumask_next_and() Message-ID: <20150615131221.GA12596@twins.programming.kicks-ass.net> References: <1425223323-20180-1-git-send-email-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425223323-20180-1-git-send-email-sergey.senozhatsky@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2015 at 12:22:03AM +0900, Sergey Senozhatsky wrote: > +++ b/lib/cpumask.c > @@ -37,10 +37,11 @@ EXPORT_SYMBOL(__next_cpu_nr); > int cpumask_next_and(int n, const struct cpumask *src1p, > const struct cpumask *src2p) > { > + struct cpumask tmp; > + > + if (cpumask_and(&tmp, src1p, src2p)) > + return cpumask_next(n, &tmp); > + return nr_cpu_ids; > } > EXPORT_SYMBOL(cpumask_next_and); Just ran into this; I though we were not supposed to put cpumasks on the stack because $BIG. ?! explain.