Multi-threading access to device drivers.

From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 11/07/04

  • Next message: Garrett Wollman: "Re: Multi-threading access to device drivers."
    To: arch@freebsd.org
    Date: Sun, 07 Nov 2004 00:39:20 +0100
    
    

    Assume a device driver which is not Giant-handicapped.

    Assume an I/O path which does not need Giant to get from
    read(2) to the device driver.

    Assume a SMP machine.

    Assume a process with two threads on two CPUs, both
    doing read(fd, buf, len) at the same time.

    Should we let both reads into the driver at the same time ?

    If so, which uio_offset do we hand them ?

    -- 
    Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
    phk@FreeBSD.ORG         | TCP/IP since RFC 956
    FreeBSD committer       | BSD since 4.3-tahoe
    Never attribute to malice what can adequately be explained by incompetence.
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Garrett Wollman: "Re: Multi-threading access to device drivers."

    Relevant Pages

    • Re: if_start running deferred for Giant
      ... I would be grateful if someone could point me into the right direction.Here is the first one: ... has declared that it requires the Giant lock in order to operate. ... However, in the case of a USB device driver, it is currently required as the USB framework is not MPSAFE, so requires Giant. ...
      (freebsd-net)
    • Re: Multi-threading access to device drivers.
      ... > Assume a device driver which is not Giant-handicapped. ... > Assume an I/O path which does not need Giant to get from ... > Never attribute to malice what can adequately be explained by incompetence. ...
      (freebsd-arch)
    • Re: I/O or Threading Suffer
      ... On Tue, 20 Jul 2004, Mark Murray wrote: ... >> lock during that computation so that the thread can yield without ... UIO shouldn't require Giant. ... even thinking you have to mark the whole device driver as not requiring ...
      (freebsd-current)