From: "Jan Beulich" Subject: Re: [PATCH] introduce and used relaxed cpumask operations Date: Wed, 21 Jan 2015 15:06:21 +0000 Message-ID: <54BFCE7D0200007800057C34@mail.emea.novell.com> References: <54BD379C0200007800056965@mail.emea.novell.com> <54BFB775.7030702@eu.citrix.com> <54BFC7290200007800057BAE@mail.emea.novell.com> <54BFBAEA.50002@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YDwrQ-00042Q-GN for xen-devel@lists.xenproject.org; Wed, 21 Jan 2015 15:06:24 +0000 In-Reply-To: <54BFBAEA.50002@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: KeirFraser , Andrew Cooper , TimDeegan , Ian Campbell , xen-devel , Ian Jackson List-Id: xen-devel@lists.xenproject.org >>> On 21.01.15 at 15:42, wrote: > On 01/21/2015 02:35 PM, Jan Beulich wrote: >>>>> On 21.01.15 at 15:28, wrote: >>> On 01/19/2015 03:58 PM, Jan Beulich wrote: >>>> @@ -780,10 +780,7 @@ rt_schedule(const struct scheduler *ops, >>>> } >>>> else >>>> { >>>> - cpumask_t cur_cpu; >>>> - cpumask_clear(&cur_cpu); >>>> - cpumask_set_cpu(cpu, &cur_cpu); >>>> - snext = __runq_pick(ops, &cur_cpu); >>>> + snext = __runq_pick(ops, cpumask_of(cpu)); >>>> if ( snext == NULL ) >>>> snext = rt_vcpu(idle_vcpu[cpu]); >>>> >>> >>> This bit really needs explicit mention in the changelog. >> >> Already done in response to Andrew's similar request. > > Ah, sorry -- I saw that but for some reason thought he was talking about > a different hunk. It was indeed, be the wording I added Note that this - adds a volatile qualifier to cpumask_test_and_{clear,set}_cpu() (should have been there from the beginning, like is the case for cpumask_{clear,set}_cpu()) - replaces several cpumask_clear()+cpumask_set_cpu(, n) pairs by the simpler cpumask_copy(, cpumask_of(n)) (or just cpumask_of(n) if we can do without copying) isn't really specific to where these changes get done (as it's a common pattern). Jan