From: Joe Perches <joe@perches.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@osdl.org>,
Alexey Dobriyan <adobriyan@openvz.org>,
Linux Containers <containers@lists.osdl.org>,
linux-arch@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Sukadev Bhattiprolu <sukadev@us.ibm.com>,
Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: [PATCH] Use helpers to obtain task pid in printks (arch code)
Date: Mon, 27 Aug 2007 11:01:48 -0700 [thread overview]
Message-ID: <1188237708.18004.102.camel@localhost> (raw)
In-Reply-To: <46D27D7E.7090806@openvz.org>
On Mon, 2007-08-27 at 11:30 +0400, Pavel Emelyanov wrote:
> From: Alexey Dobriyan <adobriyan@openvz.org>
>
> One of the easiest things to isolate is the pid printed in kernel
> log. There was a patch, that made this for arch-independent code,
> this one makes so for arch/xxx files.
Perhaps it would be worthwhile to standardize the printk
task information content? Maybe a format knob?
Maybe TASK_FMT/TASK_ARG(task)
#define TASK_FMT "%s"
#define TASK_ARG(tsk) ({char __buf[MAX_TASK_INFO]; print_task(tsk, buf, sizeof(__buf)); __buf})
char* print_task(const struct task_struct* tsk, char* buf, size_t size)
{
char* p = buf;
int task_knob = get_task_knob();
*p++ = '[';
if (task_knob & feature)
p += snprintf(p, size - (p - buf), fmt, feature);
[...]
*p++ = ']';
return buf;
}
EXPORT_SYMBOL(print_task)
next prev parent reply other threads:[~2007-08-27 18:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 7:30 [PATCH] Use helpers to obtain task pid in printks (arch code) Pavel Emelyanov
2007-08-27 7:30 ` Pavel Emelyanov
2007-08-27 18:01 ` Joe Perches [this message]
2007-08-30 19:11 ` Jan Engelhardt
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=1188237708.18004.102.camel@localhost \
--to=joe@perches.com \
--cc=adobriyan@openvz.org \
--cc=akpm@osdl.org \
--cc=containers@lists.osdl.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=sukadev@us.ibm.com \
--cc=xemul@openvz.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.