Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1361892
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async |
| Date | 2016-03-21 15:40 +0100 |
| Message-ID | <rf99U-71Q-11@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <reWml-6pV-1@gated-at.bofh.it> <rf2Bs-2nn-5@gated-at.bofh.it> <rf34u-2NK-15@gated-at.bofh.it> <rf3Hb-337-13@gated-at.bofh.it> <rf4jT-3xO-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 21-03-16 18:28:48, Sergey Senozhatsky wrote: > On (03/21/16 17:47), Byungchul Park wrote: > [..] > > > Is there any reason why you don't put the wake_up_process() out of the > > > critical section with my suggestion, even though it can solve the infinite > > > recuresion you worried about? > > > > Just to be sure, whether you take my suggestion or not is not important. > > I just suggested it in this thread since it can solve what you worried > > about. That's all. I can post it in another thread though. Why don't you > > consider it so that yours don't miss any printk message? Do you think there > > are any problems in my suggestion? > > we have 2 spin locks in vprintk_emit() -- logbuf_lock and sem->lock. and N > CPUs can concurrently lockup on those two locks, which already makes a > single static pointer in spiun_dump() questionable. > > logbug_lock *theoretically* can detect and handle recursive printk()s, > there is no way to catch sem->lock spin_dump() at the moment (but that's > not the point). > > there are 2 new spin locks in vprintk_emit() -- p->pi_lock and rq->lock. Actually, this is not true. These locks are already in vprintk_emit() via the up(&console_sem) call from console_unlock() since up() can call wake_up() which needs the same locks as wake_up_process(). And by calling wake_up_process() under logbuf_lock, you actually introduce recursion issues for printk_deferred() messages which are supposed to be working from under rq->lock and similar. So I think you have to keep this section outside of logbuf_lock. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH v5 0/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-20 15:20 +0100
[RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-20 15:20 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 01:10 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 01:50 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 02:00 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 08:40 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 09:10 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 09:50 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 10:30 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Jan Kara <jack@suse.cz> - 2016-03-21 15:40 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-21 16:10 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Jan Kara <jack@suse.cz> - 2016-03-21 16:40 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-21 18:20 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-22 03:20 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-22 03:20 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-22 07:00 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-22 08:00 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-22 08:50 +0100
Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 10:00 +0100
[RFC][PATCH v5 2/2] printk: Make wake_up_klogd_work_func() async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-20 15:20 +0100
csiph-web