lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <87623ps3d1.fsf@sejong.aot.lge.com> Date: Wed, 26 Dec 2012 16:02:18 +0900 From: Namhyung Kim <namhyung@...nel.org> To: Frederic Weisbecker <fweisbec@...il.com> Cc: LKML <linux-kernel@...r.kernel.org>, Alessio Igor Bogani <abogani@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Avi Kivity <avi@...hat.com>, Chris Metcalf <cmetcalf@...era.com>, Christoph Lameter <cl@...ux.com>, Geoff Levand <geoff@...radead.org>, Gilad Ben Yossef <gilad@...yossef.com>, Hakan Akkan <hakanakkan@...il.com>, Ingo Molnar <mingo@...nel.org>, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, Paul Gortmaker <paul.gortmaker@...driver.com>, Peter Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de> Subject: Re: [PATCH 20/24] nohz: Full dynticks mode On Wed, 26 Dec 2012 15:12:22 +0900, Namhyung Kim wrote: > Hi Frederic, > > On Thu, 20 Dec 2012 19:33:07 +0100, Frederic Weisbecker wrote: >> When a CPU is in full dynticks mode, try to switch >> it to nohz mode from the interrupt exit path if it is >> running a single non-idle task. >> >> Then restart the tick if necessary if we are enqueuing a >> second task while the timer is stopped, so that the scheduler >> tick is rearmed. >> >> [TODO: Check remaining things to be done from scheduler_tick()] >> >> [ Included build fix from Geoff Levand ] > [snip] >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h >> index db3d4df..f3d8f4a 100644 >> --- a/kernel/sched/sched.h >> +++ b/kernel/sched/sched.h >> @@ -943,6 +943,14 @@ static inline u64 steal_ticks(u64 steal) >> static inline void inc_nr_running(struct rq *rq) >> { >> rq->nr_running++; >> + >> + if (rq->nr_running == 2) { >> + if (tick_nohz_full_cpu(rq->cpu)) { >> + /* Order rq->nr_running write against the IPI */ >> + smp_wmb(); >> + smp_send_reschedule(rq->cpu); >> + } >> + } > > This block should be guarded with #ifdef CONFIG_SMP, otherwise: Or apply something like this: diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 0cd913ed29de..8de13ca88a17 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -957,10 +957,10 @@ static inline void inc_nr_running(struct rq *rq) rq->nr_running++; if (rq->nr_running == 2) { - if (tick_nohz_full_cpu(rq->cpu)) { + if (tick_nohz_full_cpu(cpu_of(rq))) { /* Order rq->nr_running write against the IPI */ smp_wmb(); - smp_send_reschedule(rq->cpu); + smp_send_reschedule(cpu_of(rq)); } } } Thanks, Namhyung -- 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