6.0 Witness squawk

From: Sam (sah_at_softcardsystems.com)
Date: 10/25/04

  • Next message: Brian Fundakowski Feldman: "Re: 6.0 Witness squawk"
    Date: Mon, 25 Oct 2004 11:11:13 -0500 (EST)
    To: freebsd-current@freebsd.org, freebsd-arch@freebsd.org
    
    

    Hello,

    I'm almost finished porting my AoE (ATA over Ethernet)
    driver to 6.0 and have a question about a complaint witness
    is making.

    In general, is it ok to sleep with a mutex held?

    Specifically, it works like this in the driver.
    Each device struct has a mutex for guarding
    operations on it. Discovering devices is a two
    step process. First the device must respond to
    an AoE Query command, then it must respond to
    an ATA identify command. On the response to
    the latter, I grab the device mutex, examine
    the response and call disk_alloc() and disk_create().

    Both of these functions call malloc with M_WAITOK,
    the latter triggers the witness message.

    In my situation, I don't really mind if I sleep
    with the mutex since I can't do any useful work
    with the device anyway.

    This does leave the possibility that the netisr
    for AoE could sleep.

    Thoughts?

    Cheers,

    Sam
    _______________________________________________
    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: Brian Fundakowski Feldman: "Re: 6.0 Witness squawk"

    Relevant Pages

    • 6.0 Witness squawk
      ... I'm almost finished porting my AoE ... driver to 6.0 and have a question about a complaint witness ... is it ok to sleep with a mutex held? ... it works like this in the driver. ...
      (freebsd-current)
    • Re: 6.0 Witness squawk
      ... >> I'm almost finished porting my AoE ... is it ok to sleep with a mutex held? ... it works like this in the driver. ...
      (freebsd-arch)
    • Re: 6.0 Witness squawk
      ... >> I'm almost finished porting my AoE ... is it ok to sleep with a mutex held? ... it works like this in the driver. ...
      (freebsd-current)
    • Re: 6.0 Witness squawk
      ... > I'm almost finished porting my AoE ... > driver to 6.0 and have a question about a complaint witness ... is it ok to sleep with a mutex held? ...
      (freebsd-arch)
    • Re: 6.0 Witness squawk
      ... > I'm almost finished porting my AoE ... > driver to 6.0 and have a question about a complaint witness ... is it ok to sleep with a mutex held? ...
      (freebsd-current)