From: Tao Ma <tao.ma@oracle.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] CMWQ: Set workqueue name before we process one work.
Date: Mon, 16 Aug 2010 16:03:06 +0800 [thread overview]
Message-ID: <4C68F0BA.5050905@oracle.com> (raw)
In-Reply-To: <4C68EC76.70903@kernel.org>
Hi Tejun,
Thanks for the quick response.
On 08/16/2010 03:44 PM, Tejun Heo wrote:
> On 08/16/2010 09:39 AM, Tao Ma wrote:
>> Now in CMWQ, workqueue threads are named as 'kworker/*'. So it is
>> a little boring to see in the 'top'(below) and actually it isn't
>> meaningful for the users.
>> 12606 root 20 0 0 0 0 S 2 0.0 0:03.22 kworker/u:0
>> 12607 root 20 0 0 0 0 S 1 0.0 0:03.69 kworker/u:4
>>
>> So this patch just try to set the proper workqueue name if it does
>> exist. Yes, workqueue now is a thread pool and the data may be not
>> accurate but I think it is better(below) than the 'kworker*' stuff.
>> And if there is something block the workqueue, we can find the caller
>> easily.
>> 12606 root 20 0 0 0 0 D 2 0.0 0:02.90 dlm_wq
>> 12607 root 20 0 0 0 0 D 0 0.0 0:03.21 ocfs2_wq
>>
>> What's more, in ocfs2, we sometimes want to print some debug info in
>> the system log and we use 'current->comm' to print the thread and this
>> change also does help.
>>
>> The only thing I am not clear is that do we need [gs]et_task_comm?
>> I guess not and this patch just try to use strlcpy without task_lock.
>>
>> Cc: Tejun Heo<tj@kernel.org>
>> Signed-off-by: Tao Ma<tao.ma@oracle.com>
>
> I thought about the same thing but this doesn't provide any more
> information than stack traces for debugging and for run time tracking
> implementing tracing API (scheduled to be added in this devel cycle)
> is the right approach.
Do you have the link for this or it will show up in the mail list soon?
> change program name. It will confuse more than help. So, unless
> there are other reasons for doing this, I don't think I'm gonna take
> this one.
OK, let me find other ways ocfs2 can use to trace the real callers of
some functions in runtime.
Regards,
Tao
WARNING: multiple messages have this Message-ID (diff)
From: Tao Ma <tao.ma@oracle.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [PATCH] CMWQ: Set workqueue name before we process one work.
Date: Mon, 16 Aug 2010 16:03:06 +0800 [thread overview]
Message-ID: <4C68F0BA.5050905@oracle.com> (raw)
In-Reply-To: <4C68EC76.70903@kernel.org>
Hi Tejun,
Thanks for the quick response.
On 08/16/2010 03:44 PM, Tejun Heo wrote:
> On 08/16/2010 09:39 AM, Tao Ma wrote:
>> Now in CMWQ, workqueue threads are named as 'kworker/*'. So it is
>> a little boring to see in the 'top'(below) and actually it isn't
>> meaningful for the users.
>> 12606 root 20 0 0 0 0 S 2 0.0 0:03.22 kworker/u:0
>> 12607 root 20 0 0 0 0 S 1 0.0 0:03.69 kworker/u:4
>>
>> So this patch just try to set the proper workqueue name if it does
>> exist. Yes, workqueue now is a thread pool and the data may be not
>> accurate but I think it is better(below) than the 'kworker*' stuff.
>> And if there is something block the workqueue, we can find the caller
>> easily.
>> 12606 root 20 0 0 0 0 D 2 0.0 0:02.90 dlm_wq
>> 12607 root 20 0 0 0 0 D 0 0.0 0:03.21 ocfs2_wq
>>
>> What's more, in ocfs2, we sometimes want to print some debug info in
>> the system log and we use 'current->comm' to print the thread and this
>> change also does help.
>>
>> The only thing I am not clear is that do we need [gs]et_task_comm?
>> I guess not and this patch just try to use strlcpy without task_lock.
>>
>> Cc: Tejun Heo<tj@kernel.org>
>> Signed-off-by: Tao Ma<tao.ma@oracle.com>
>
> I thought about the same thing but this doesn't provide any more
> information than stack traces for debugging and for run time tracking
> implementing tracing API (scheduled to be added in this devel cycle)
> is the right approach.
Do you have the link for this or it will show up in the mail list soon?
> change program name. It will confuse more than help. So, unless
> there are other reasons for doing this, I don't think I'm gonna take
> this one.
OK, let me find other ways ocfs2 can use to trace the real callers of
some functions in runtime.
Regards,
Tao
next prev parent reply other threads:[~2010-08-16 8:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-16 7:39 [Ocfs2-devel] [PATCH] CMWQ: Set workqueue name before we process one work Tao Ma
2010-08-16 7:39 ` Tao Ma
2010-08-16 7:44 ` [Ocfs2-devel] " Tejun Heo
2010-08-16 7:44 ` Tejun Heo
2010-08-16 8:03 ` Tao Ma [this message]
2010-08-16 8:03 ` Tao Ma
2010-08-16 8:03 ` [Ocfs2-devel] " Tejun Heo
2010-08-16 8:03 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C68F0BA.5050905@oracle.com \
--to=tao.ma@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.