[lkml]   [2003]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: recursive spinlocks. Shoot.
>> Let's quote the example from rubini & corbet of the sbull block device
>> driver. The request function ends like so:
> defective locking in a driver is no excuse to pamper over it with
> recusrive shite.

Arjan is a little too harsh here, but on the principle I happen
to agree, because I worked with systems which allow recursive locks.
They very often cover up for programmer's lack of basic understanding.
Worse, sometimes even experienced programmers can do poorly.
I ran into the latter cathegory of code when fixing so-called
"presto" in Solaris (now replaced by Encore-originated code).

Normal spinlocks are not without problems, in particular people
tend to write:

void urb_rm_priv_locked(struct urb *) {
void urb_rm_priv(struct urb *u) {

Which eats a stack frame. We make this tradeoff on purpose,
as a lesser evil.

BTW, I do not see Linus and his leutenants rebuking the onslaught
of recursive ingenuity in this thread. Ignoring the hogwash,
or waiting and watching?

-- Pete
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.085 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site