Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308993
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC][PATCH -next 0/2] cond_resched() some of console_trylock callers |
| Date | 2016-01-14 06:00 +0100 |
| Message-ID | <qQIaS-1Pl-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hello, RFC (apologies for sending it during the merge window. no rush) console_unlock() allows to cond_resched() if its caller has set `console_may_schedule' to 1 (this functionality present since commit 'printk: do cond_resched() between lines while outputting to consoles'). The rules are: -- console_lock() always sets `console_may_schedule' to 1 -- console_trylock() always sets `console_may_schedule' to 0 However, console_trylock() callers (among them is printk()) are not necessarily executing in atomic contexts, and some of them can cond_resched() in console_unlock(). So console_trylock() can set `console_may_schedule' to 0 only if cond_resched() is invalid in the current context, and set it to 1 otherwise. Patch 0001 addresses a theoretical loss of printk messages and, at the same time, serves as a preparation work for 0002. Sergey Senozhatsky (2): printk: move can_use_console out of console_trylock_for_printk printk: set may_schedule for some of console_trylock callers kernel/printk/printk.c | 84 ++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 44 deletions(-) -- 2.7.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC][PATCH -next 0/2] cond_resched() some of console_trylock callers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-01-14 06:00 +0100
[RFC][PATCH -next 1/2] printk: move can_use_console out of console_trylock_for_printk Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-01-14 06:00 +0100
[PATCH 1/2] printk: move can_use_console out of console_trylock_for_printk Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-01-14 07:00 +0100
[RFC][PATCH -next 2/2] printk: set may_schedule for some of console_trylock callers Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-01-14 06:00 +0100
csiph-web