Re: I/O or Threading Suffer

From: Robert Watson (rwatson_at_FreeBSD.ORG)
Date: 07/20/04

  • Next message: Scott Long: "Re: HEADS UP [Re: thread+preemption stability improvement]"
    Date: Tue, 20 Jul 2004 12:39:04 -0400 (EDT)
    To: Mark Murray <mark@grondar.org>
    
    

    On Tue, 20 Jul 2004, Mark Murray wrote:

    > Robert Watson writes:
    > > Mark -- how much
    > > computation is being done here -- would it be worth dropping the Giant
    > > lock during that computation so that the thread can yield without
    > > generating a priority inversion?
    >
    > I'm sure it could. There are some Giant issues related to the UIO stuff
    > that bit me in the bum when I removed the NEEDS_GIANT flag from the
    > device, but I'm reasonably sure that with careful work this can be
    > untangled.

    UIO shouldn't require Giant. Are you sure it still does? FYI, I'm not
    even thinking you have to mark the whole device driver as not requiring
    Giant, just dropping Giant about some of the long running work (and maybe
    conditional on the amount of work). For a small random read, it's not
    worth it, but for sustained large reads of randomness, it might be
    interesting to see what impact it has. We could even consider a yield of
    some sort.

    Anyhow, up front, it might be sufficient to drop and reacquire giant and
    see what impact it has for the test scenario we're currently looking at.

    Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
    robert@fledge.watson.org Principal Research Scientist, McAfee Research

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Scott Long: "Re: HEADS UP [Re: thread+preemption stability improvement]"

    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: I/O or Threading Suffer
      ... Robert Watson writes: ... There are some Giant issues related to the UIO stuff ... Mark Murray ...
      (freebsd-current)
    • 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 ... | UNIX since Zilog Zeus 3.20 ...
      (freebsd-arch)
    • 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)