twa is giant locked in 7-Current or everywhere?

2007-08-15 Thread Artem Kuchin

Hi!

When i installed twas driver on 6.2-STABLE it said
[FAST]

i presumed that it measn that twa is giant-lock free.

Now, after installing 7-CURRENT i see

Aug 15 17:00:02 omni3 kernel: 3ware device driver for 9000 series storage 
controllers, version: 3.70.03.007
Aug 15 17:00:02 omni3 kernel: twa0: 3ware 9000 series Storage Controller port 0x3000-0x30ff mem 
0x8800-0x89ff,0x8a20-0x8a200fff irq 16 at devic

Aug 15 17:00:02 omni3 kernel: twa0: [GIANT-LOCKED]
Aug 15 17:00:02 omni3 kernel: twa0: [ITHREAD]


So, it says GIANT-LOCKED and then ITHREAD.

Apparently, i have no real understaning what those words mean.
COuld anyone explain the meaning of

FAST
ITHREAD

Giant-locked is self explanatory and.. bad.

Thank you.

--
Regards,
Artem 


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: twa is giant locked in 7-Current or everywhere?

2007-08-15 Thread Kris Kennaway
On Wed, Aug 15, 2007 at 09:09:33PM +0400, Artem Kuchin wrote:
 Hi!
 
 When i installed twas driver on 6.2-STABLE it said
 [FAST]
 
 i presumed that it measn that twa is giant-lock free.
 
 Now, after installing 7-CURRENT i see
 
 Aug 15 17:00:02 omni3 kernel: 3ware device driver for 9000 series storage 
 controllers, version: 3.70.03.007
 Aug 15 17:00:02 omni3 kernel: twa0: 3ware 9000 series Storage Controller 
 port 0x3000-0x30ff mem 0x8800-0x89ff,0x8a20-0x8a200fff irq 16 
 at devic
 Aug 15 17:00:02 omni3 kernel: twa0: [GIANT-LOCKED]
 Aug 15 17:00:02 omni3 kernel: twa0: [ITHREAD]
 
 
 So, it says GIANT-LOCKED and then ITHREAD.
 
 Apparently, i have no real understaning what those words mean.
 COuld anyone explain the meaning of
 
 FAST
 ITHREAD
 
 Giant-locked is self explanatory and.. bad.

I think 6.x doesn't display the GIANT-LOCKED messages because users
were freaking out too much after they were added at an earlier point
in 6.x development (Q: why is this driver suddenly giant locked? A:
It's always been giant locked, now this fact is displayed as a note to
developers.).

While it's true that a non-giant locked driver would be better, it's
not as bad as you might think because almost nothing else requires
giant for most workloads thesedays (see
http://wiki.freebsd.org/SMPTODO), so in those workloads performance
will not be worse because of it.  If you are really bothered by this
you can enable mutex profiling to check how much of a problem it is
for you.

Kris


pgpuvJUaJzZNh.pgp
Description: PGP signature


Re: twa is giant locked in 7-Current or everywhere?

2007-08-15 Thread Scott Long

The TWA driver uses an INTR_FAST handler, meaning that it forgoes the
traditional interrupt-thread model in FreeBSD.  There are good and bad
tradeoffs with doing that, and I'm always happy to discuss the topic
in detail with those who are interested.  In any case, most of the
codepaths inside of the driver were still covered by Giant, just not
the low-level interrupt handler.

In 7-CURRENT, I changed the CAM (SCSI) layer API a bit, and the TWA
driver was an unfortunate victim of the change.  The easy fix was to
revert the interrupt handler to being fully Giant-covered.  There should
be very little difference in actual performance unless the interrupt is
being shared with another device.  Even then the difference should be
minor.

Pushing the TWA source forward so that it is Giant-free would be an
interesting task.  Unfortunately, the existing code relies heavily on
spin locks, while CAM requires that Giant-free drivers use sleep locks.
Since this code is actively maintained by AMCC/3Ware, some amount of
coordination would be needed with them to ensure the changes are
accepted.

Scott



Artem Kuchin wrote:

Hi!

When i installed twas driver on 6.2-STABLE it said
[FAST]

i presumed that it measn that twa is giant-lock free.

Now, after installing 7-CURRENT i see

Aug 15 17:00:02 omni3 kernel: 3ware device driver for 9000 series 
storage controllers, version: 3.70.03.007
Aug 15 17:00:02 omni3 kernel: twa0: 3ware 9000 series Storage 
Controller port 0x3000-0x30ff mem 
0x8800-0x89ff,0x8a20-0x8a200fff irq 16 at devic

Aug 15 17:00:02 omni3 kernel: twa0: [GIANT-LOCKED]
Aug 15 17:00:02 omni3 kernel: twa0: [ITHREAD]


So, it says GIANT-LOCKED and then ITHREAD.

Apparently, i have no real understaning what those words mean.
COuld anyone explain the meaning of

FAST
ITHREAD

Giant-locked is self explanatory and.. bad.

Thank you.

--
Regards,
Artem
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: twa is giant locked in 7-Current or everywhere?

2007-08-15 Thread Scott Long

Kris Kennaway wrote:

On Wed, Aug 15, 2007 at 09:09:33PM +0400, Artem Kuchin wrote:

Hi!

When i installed twas driver on 6.2-STABLE it said
[FAST]

i presumed that it measn that twa is giant-lock free.

Now, after installing 7-CURRENT i see

Aug 15 17:00:02 omni3 kernel: 3ware device driver for 9000 series storage 
controllers, version: 3.70.03.007
Aug 15 17:00:02 omni3 kernel: twa0: 3ware 9000 series Storage Controller 
port 0x3000-0x30ff mem 0x8800-0x89ff,0x8a20-0x8a200fff irq 16 
at devic

Aug 15 17:00:02 omni3 kernel: twa0: [GIANT-LOCKED]
Aug 15 17:00:02 omni3 kernel: twa0: [ITHREAD]


So, it says GIANT-LOCKED and then ITHREAD.

Apparently, i have no real understaning what those words mean.
COuld anyone explain the meaning of

FAST
ITHREAD

Giant-locked is self explanatory and.. bad.


I think 6.x doesn't display the GIANT-LOCKED messages because users
were freaking out too much after they were added at an earlier point
in 6.x development (Q: why is this driver suddenly giant locked? A:
It's always been giant locked, now this fact is displayed as a note to
developers.).

While it's true that a non-giant locked driver would be better, it's
not as bad as you might think because almost nothing else requires
giant for most workloads thesedays (see
http://wiki.freebsd.org/SMPTODO), so in those workloads performance
will not be worse because of it.  If you are really bothered by this
you can enable mutex profiling to check how much of a problem it is
for you.



Just to set the facts straight, the TWA driver has always been covered
by Giant, as I explained in another part of this thread.  The indication
was just hidden because it used an INTR_FAST handler.

As for performance, having Giant-free drivers is still highly important.
Not having to compete with the tty subsystem or the USB stack is very
important.  My recent change to make ATAPI-CAM Giant-free made CD
burning a lot more pleasant for people.

Scott
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]