[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47FEEE0E.6020206@gmail.com>
Date: Fri, 11 Apr 2008 13:50:22 +0900
From: KOSAKI Motohiro <kosaki.motohiro@...il.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
CC: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Jason Baron <jbaron@...hat.com>, Adrian Bunk <bunk@...sta.de>,
Alexey Dobriyan <adobriyan@...il.com>,
Christoph Hellwig <hch@...radead.org>, akpm@...l.org,
linuxdev-kanex@...css.fujitsu.com
Subject: Re: [patch 11/17] Implement immediate update via stop_machine_run
Hi Mathieu,
>> it seems this patch is must, Why do you separate patch [10/17] and [11/17]?
>> this patch remove almost portion of [10/17].
>> IMHO these patch merge into 1 patch is better.
>>
>>
>
> Hi Kosaki,
>
> You are right, I will merge them and resend them in the following post.
>
Thanks
>>> +static int stop_machine_imv_update(void *imv_ptr)
>>> +{
>>> + struct __imv *imv = imv_ptr;
>>> +
>>> + if (!wrote_text) {
>>>
>> it seems racy.
>> Why don't need test_and_set?
>>
>> I think your stop_machine_run(ALL_CPUS) call fn concurrency...
>>
> The answer to this mistery is in include/linux/stop_machine.h modified
> by add-all-cpus-option-to-stop-machine-run.patch :
>
>
> /**
> * stop_machine_run: freeze the machine on all CPUs and run this function
> * @fn: the function to run
> * @data: the data ptr for the @fn()
> - * @cpu: the cpu to run @fn() on (or any, if @cpu == NR_CPUS.
> + * @cpu: if @cpu == n, run @fn() on cpu n
> + * if @cpu == NR_CPUS, run @fn() on any cpu
> + * if @cpu == ALL_CPUS, run @fn() first on the calling cpu, and then
> + * concurrently on all the other cpus
> *
> * Description: This causes a thread to be scheduled on every other cpu,
> * each of which disables interrupts, and finally interrupts are disabled
>
> Therefore, the first execution of the function is done before all other
> executions.
>
>
Ah, OK. I understand.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists