On Wed, 7 May 2008, Matthew Wilcox wrote:Well, this would only be noticeable with CONFIG_PREEMPT. If you don't have preempt enabled, it looks like everything should work ok: the kernel lock wouldn't increase the preempt count, and _cond_resched() works fine. If you're PREEMPT, then the kernel lock would increase the preempt count, and _cond_resched() would refuse to re-schedule it, *but* with PREEMPT you'd never see it *anyway*, because PREEMPT will disable cond_resched() entirely (because preemption takes care of normal scheduling latencies without it). And I'm also sure that this all worked fine at some point, and it's largely a result just of the multiple different variations of BKL preemption coupled with some of them getting removed entirely, so the code that used to handle it just got corrupt over time. See commit 02b67cc3b, for example. .. Hmm ... Time passes. Linus looks at git history. It does look like "cond_resched()" has not worked with the BKL since 2005, and hasn't taken the BKL into account. Commit 5bbcfd9000: [PATCH] cond_resched(): fix bogus might_sleep() warning + if (unlikely(preempt_count())) + return; which talks about the BKS, ie it only took the *semaphore* implementation into account. Never the spinlock-with-preemption-count one. Or am I blind? Linus --
| Pardo | Re: pthread_create() slow for many threads; also time to revisit 64b context switc... |
| Paul Jackson | Inquiry: Should we remove "isolcpus= kernel boot option? (may have realtime uses) |
| Srivatsa Vaddagiri | Re: [PATCH, RFC] reimplement flush_workqueue() |
| Peter Zijlstra | Re: Btrfs v0.16 released |
git: | |
| Giuseppe Bilotta | Re: gitweb and remote branches |
| Miklos Vajna | [rfc] git submodules howto |
| JD Guzman | C# Git Implementation |
| Junio C Hamano | Re: [PATCH] fix parallel make problem |
| Richard Stallman | Real men don't attack straw men |
| Steve B | SSH brute force attacks no longer being caught by PF rule |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Marius ROMAN | 1440x900 resolution problem |
| Tomasz Grobelny | [PATCH 0/5] [DCCP]: Queuing policies |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
| John Heffner | Re: A Linux TCP SACK Question |
| Denys Fedoryshchenko | Re: Could you make vconfig less stupid? |
