linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re[2]: Latency measurements
       [not found] ` <15919370673.20011001160824@port.imtp.ilyichevsk.odessa.ua>
@ 2001-10-02 13:01   ` VDA
  2001-10-03  0:43     ` Nigel Gamble
  0 siblings, 1 reply; 2+ messages in thread
From: VDA @ 2001-10-02 13:01 UTC (permalink / raw)
  To: Robert Love; +Cc: linux-kernel

Hi Robert,
Monday, October 01, 2001, 11:47:31 PM, you wrote:

>> These are the longest held locks on my system
>> (PII 233 UP, 32MB RAM, SVGA 16bit color fb console, X)
>> Kernel: 2.4.10 + ext3 + preemption
>> I am very willing to test any patches to reduce latency.
>> 
>> 418253       BKL        1   712/tty_io.c        c01b41c5   714/tty_io.c
>> 222609       BKL        1   712/tty_io.c        c01b41c5   697/sched.c   
>> 152903 spin_lock        5   547/sched.c         c0114fd5   714/tty_io.c  
>> 132422       BKL        5   712/tty_io.c        c01b41c5   714/tty_io.c  
>> 104548       BKL        1   712/tty_io.c        c01b41c5  1380/sched.c

RL> Unfortunately there isn't much we can do about any of those locks.

RL> The locks in tty_io.c are have to be held, the fact you are using a
RL> framebuffer makes it a lot worse, though.  If there is an accelerated fb
RL> for your video card, I would suggest that.

That is a BKL which we are trying to get rid of.
What deadlock is prevented by lock_kernel()
in tty_io.c:712?

write() call there is actually a tty->ldisc.write().
Is it possible to move lock into tty->ldisc.write()
and make it a spinlock? I'd like to try, but I admit
I failed to track what fn ptr is placed in ldisc.write
in my case (fb console)  :-(

>> 222609       BKL 1 712/tty_io.c  697/sched.c
I don't quite understand how locked region can start in
712/tty_io.c and end in 697/sched.c?

This is strange too:
>> 152903 spin_lock 5 547/sched.c   714/tty_io.c
spinlock? Unlocked by unlock_kernel()???
-- 
Best regards, VDA
mailto:VDA@port.imtp.ilyichevsk.odessa.ua



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re[2]: Latency measurements
  2001-10-02 13:01   ` Re[2]: Latency measurements VDA
@ 2001-10-03  0:43     ` Nigel Gamble
  0 siblings, 0 replies; 2+ messages in thread
From: Nigel Gamble @ 2001-10-03  0:43 UTC (permalink / raw)
  To: VDA; +Cc: Robert Love, linux-kernel

On Tue, 2 Oct 2001, VDA wrote:
> >> These are the longest held locks on my system
> >> (PII 233 UP, 32MB RAM, SVGA 16bit color fb console, X)
> >> Kernel: 2.4.10 + ext3 + preemption
> >> I am very willing to test any patches to reduce latency.
> >> 
> >> 418253       BKL        1   712/tty_io.c        c01b41c5   714/tty_io.c
> >> 222609       BKL        1   712/tty_io.c        c01b41c5   697/sched.c   
> >> 152903 spin_lock        5   547/sched.c         c0114fd5   714/tty_io.c  
> >> 132422       BKL        5   712/tty_io.c        c01b41c5   714/tty_io.c  
> >> 104548       BKL        1   712/tty_io.c        c01b41c5  1380/sched.c


> >> 222609       BKL 1 712/tty_io.c  697/sched.c
> I don't quite understand how locked region can start in
> 712/tty_io.c and end in 697/sched.c?

The BKL is dropped whenever the task voluntarily blocks in the kernel.
This is what you are seeing reported here.  It will be reacquired when
the task is rescheduled:

> This is strange too:
> >> 152903 spin_lock 5 547/sched.c   714/tty_io.c
> spinlock? Unlocked by unlock_kernel()???

The latency measuring code isn't always accurate in reporting the cause
in this case: if it's unlocked by unlock_kernel and locked in sched.c,
then it's the reacqusition of the BKL by a task that was blocked while
holding the lock.

Nigel Gamble                                    nigel@nrg.org
Mountain View, CA, USA.                         http://www.nrg.org/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-03  0:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1001972854.2277.49.camel@phantasy>
     [not found] ` <15919370673.20011001160824@port.imtp.ilyichevsk.odessa.ua>
2001-10-02 13:01   ` Re[2]: Latency measurements VDA
2001-10-03  0:43     ` Nigel Gamble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).