Re: [Patch][RFC] Disabling per-tgid stats on task exit in taskstats

From: Shailabh Nagar
Date: Wed Jun 21 2006 - 19:44:45 EST


Jay Lan wrote:

>
> Shailabh and me now eye on the lock patch that fixed an exit race
> crash i reported. The global lock was held too long in scanning threads.
> Shailabh is working on a new patch.

To clarify further,

when I ran the same benchmark as Jay (same set of patches, on a 2.6.17 kernel)
on a uniprocessor, I see the same kind of low differential between
tgid stat sending on and off as I was seeing before.

Using /usr/bin/time ./mkthread 1000 10
yes no %Ovhd
system 1.63 1.55 +5%
elapsed 1.96 1.88 +4%

(similar differences whether data is written to file or not, only
total times change)

Since his system is an SMP, one suspect is the
lock hold time of taskstats_exit_mutex. Since the fill_tgid() is done
within this mutex which serializes all task exits, and there'll be contention on the
SMP, its possible the fill_tgid's overhead is exacerbating the locking.

So I'm trying to see if a patch that uses only per-task locking will help.
Will work it out and post when patch is stable or if it helps.

--Shailabh

>
> - jay
>

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