Re: question on SMP and read()/write()

From: Oliver Neukum (Oliver.Neukum@lrz.uni-muenchen.de)
Date: Sat Oct 28 2000 - 11:42:50 EDT

  • Next message: Andrew Morton: "Re: [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was: Strange performance behavior of 2.4.0-test9)"

    On Saturday 28 October 2000 16:43, you wrote:
    > > 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 ?
    >
    > no. FD's refer to files; block drivers don't, and the nontrivial
    > code between sys_* and drivers deals with this sort of thing.

    Sure block drivers need not do this, but how about drivers for character
    devices ? It seems that sys_read() calls a function provided by the
    f_op table without any locking. Isn't this the function a driver for a
    character device must provide to the VFS ?

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



    This archive was generated by hypermail 2b29 : Sat Oct 28 2000 - 11:46:43 EDT