Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481248
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Oleg Nesterov <oleg@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE |
| Date | Mon, 12 Sep 2016 15:10:01 +0200 |
| Message-ID | <sgz9L-3JB-27@gated-at.bofh.it> (permalink) |
| References | <sfpct-qw-1@gated-at.bofh.it> <sfMiJ-6sU-9@gated-at.bofh.it> <sgxKF-2Ci-11@gated-at.bofh.it> <sgxUm-2FS-3@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.18 (2008-05-17) |
| X-Scanned-By | MIMEDefang 2.68 on 10.5.11.26 |
| X-Greylist | Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 12 Sep 2016 13:06:25 +0000 (UTC) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 29 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Cheng Chao <cs.os.kernel@gmail.com>, mingo@kernel.org, tj@kernel.org, akpm@linux-foundation.org, chris@chris-wilson.co.uk, linux-kernel@vger.kernel.org |
| X-Original-Date | Mon, 12 Sep 2016 15:05:38 +0200 |
| X-Original-Message-ID | <20160912130537.GB7984@redhat.com> |
| X-Original-References | <1473408834-6122-1-git-send-email-chengchao@kedacom.com> <1473497532-5440-1-git-send-email-cs.os.kernel@gmail.com> <20160912113727.GQ10153@twins.programming.kicks-ass.net> <20160912114108.GP10168@twins.programming.kicks-ass.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1481248 |
Show key headers only | View raw
On 09/12, Peter Zijlstra wrote: > > --- a/kernel/stop_machine.c > +++ b/kernel/stop_machine.c > @@ -121,6 +121,11 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) > cpu_stop_init_done(&done, 1); > if (!cpu_stop_queue_work(cpu, &work)) > return -ENOENT; > + /* > + * In case @cpu == smp_proccessor_id() we can avoid a sleep+wakeup > + * by doing a preemption. > + */ > + cond_resched(); Yes, this is what I tried to suggest too. But this leads to the question which I wanted to ask many times. Why cond_resched() is not NOP if CONFIG_PREEMPT=y ? Perhaps we have some users like, just for example, preempt_enable_no_resched(); cond_resched(); which actually want the should_resched() check even if CONFIG_PREEMPT, but most callers do not? Oleg.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-10 11:00 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-10 12:00 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-10 18:40 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Oleg Nesterov <oleg@redhat.com> - 2016-09-12 13:10 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-13 04:50 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-12 13:40 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-12 13:50 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Oleg Nesterov <oleg@redhat.com> - 2016-09-12 15:10 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-12 17:10 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Oleg Nesterov <oleg@redhat.com> - 2016-09-13 18:20 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-13 18:40 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-14 04:10 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-14 10:00 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Oleg Nesterov <oleg@redhat.com> - 2016-09-14 17:50 +0200
[tip:sched/core] sched/core: Optimize __schedule() tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-09-22 16:10 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-13 06:10 +0200
Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE Peter Zijlstra <peterz@infradead.org> - 2016-09-13 10:50 +0200
[PATCH v4] stop_machine: Avoid a sleep and wakeup in the stop_one_cpu() Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-14 04:10 +0200
Re: [PATCH v4] stop_machine: Avoid a sleep and wakeup in the stop_one_cpu() Oleg Nesterov <oleg@redhat.com> - 2016-09-14 18:00 +0200
Re: [PATCH v4] stop_machine: Avoid a sleep and wakeup in the stop_one_cpu() Cheng Chao <cs.os.kernel@gmail.com> - 2016-09-18 04:10 +0200
[tip:sched/core] stop_machine: Avoid a sleep and wakeup in stop_one_cpu() tip-bot for Cheng Chao <tipbot@zytor.com> - 2016-09-22 16:10 +0200
csiph-web