[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201105180527.p4I5RHGl032657@www262.sakura.ne.jp>
Date: Wed, 18 May 2011 14:27:17 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: john.stultz@...aro.org
Cc: tytso@....edu, mina86@...a86.com, jirislaby@...il.com,
kosaki.motohiro@...fujitsu.com, rientjes@...gle.com,
dave@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] v4 Improve task->comm locking situation
John Stultz wrote:
> So I think this approach is definitely worth trying. However, I think
> converting to RCU will be much easier once we've first converted all
> current comm users to making use of the get_task_comm accessor
> functions. In this way my hope is my current proposal will serve as a
> cleanup step before further optimizations can be done.
OK. But I guess converting all current comm users to making use of the
get_task_comm accessor is not easy because using get_task_comm() changes
locking dependency.
I think replacing
"%s", tsk->comm
with
"%ptc", tsk
(without using get_task_comm() inside pointer() because introducing a new lock
might cause problem since callers can be inside a delicate condition based on
the assumption that vsnprintf() will not block) should come first in order to
minimize direct ->comm users who may not be ready for this change.
After that, trying to replace
task->comm
with
char buf[TASK_COMM_LEN];
get_task_comm(task, buf)
(with cautions for already held locks) may be considered.
By the way,
sprintf(current->comm, "drbd%d_receiver", minor);
in drivers/block/drbd/drbd_receiver.c may be off-by-one
because DRBD_MINOR_COUNT_MAX is 256.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists