Re: namei() query

From: kumon@flab.fujitsu.co.jp
Date: Fri Apr 21 2000 - 10:14:08 EST


kumon@flab.fujitsu.co.jp writes:
> Like Linus's sample code, I can move lock/unlock_kernel inside the
> for(;;) loop. The places are marked by ###.

By moving lock/unlock in the do_select() into the for(;;)-loop,
the following numbers were obtained.
It eliminates schedule_timeout() during the lock held.
Most of schedule() spins moved to the do_select().

;cpu0 cpu1 cpu2 cpu3 all-cpu where lockvar
1186 1133 1149 1039 4507 TOTAL
465 417 447 376 1705 do_select+432 0xc026b984
112 90 119 118 439 do_close+324 0xc026b984
75 101 86 86 348 sock_poll+232 0xc026b984
82 72 79 77 310 wait_for_tcp_memory+797 (%ecx)
60 79 63 51 253 sys_newstat+79 0xc026b984
53 45 55 57 210 _fput+82 0xc026b984
57 59 39 49 204 sys_open+132 0xc026b984
53 65 39 40 197 old_mmap+416 0xc026b984
47 48 42 44 181 sys_fcntl+236 0xc026b984
43 37 42 30 152 sock_map_fd+132 0xc026b984
31 28 38 24 121 tcp_accept+117 (%ecx)
        rest omitted

> But I don't realy understand, what portion actually needs the lock?

Computer Systems Laboratory, Fujitsu Labs.
kumon@flab.fujitsu.co.jp

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST