Skip to contentSkip to conversation

question on SMP and read()/write()

DISCUSSION Oliver Neukum 2 participants 2 messages Oct 28, 2000

lore
Share & tools
lore
#0 lore raw

Hi,

I've noticed that sys_read() and sys_write() don't grab the big kernel lock. As file descriptors may be shared, must device drivers provide SMP safe read() and write() methods ?

TIA
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 3 lines

I've noticed that sys_read() and sys_write() don't grab the big kernel lock. As file descriptors may be shared, must device drivers provide SMP safe read() and write() methods ?

Yes. This is true in 2.2 as well although the inode lock provides some protection on writes.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/