From: Tim Deegan Subject: Re: [PATCH] introduce and used relaxed cpumask operations Date: Thu, 22 Jan 2015 16:29:39 +0100 Message-ID: <20150122152939.GN97314@deinos.phlegethon.org> References: <54BD379C0200007800056965@mail.emea.novell.com> <54BF99D1.9050709@citrix.com> <54BFC16D0200007800057B3B@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YEJha-00083l-VF for xen-devel@lists.xenproject.org; Thu, 22 Jan 2015 15:29:47 +0000 Content-Disposition: inline In-Reply-To: <54BFC16D0200007800057B3B@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Keir Fraser , George Dunlap , Andrew Cooper , Ian Jackson , IanCampbell , xen-devel List-Id: xen-devel@lists.xenproject.org At 14:10 +0000 on 21 Jan (1421845837), Jan Beulich wrote: > >>> On 21.01.15 at 13:21, wrote: > > On 19/01/15 15:58, Jan Beulich wrote: > >> --- a/xen/common/core_parking.c > >> +++ b/xen/common/core_parking.c > >> @@ -75,11 +75,10 @@ static unsigned int core_parking_perform > >> if ( core_weight < core_tmp ) > >> { > >> core_weight = core_tmp; > >> - cpumask_clear(&core_candidate_map); > >> - cpumask_set_cpu(cpu, &core_candidate_map); > >> + cpumask_copy(&core_candidate_map, cpumask_of(cpu)); > > > > It is probably worth mentioning changes like this in the commit message, > > as they are slightly more than just a simple removal of the lock prefix. > > Added. > > >> +static inline void __cpumask_clr_cpu(int cpu, cpumask_t *dstp) > >> +{ > >> + __clear_bit(cpumask_check(cpu), dstp->bits); > >> +} > >> + > > > > While I can appreciate the want for a shorter function name, I feel that > > consistency with its locked alternative is more important. > > I sort of expected a comment to that effect, but decided to use the > shorter names nevertheless. Let's see what others, namely the REST > maintainers, say. FWIW, I prefer consistent naming (i.e. __cpumask_clear_cpu()). Cheers, Tim.