lkml.org 
[lkml]   [2014]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH wq/for-3.19 3/3] workqueue: dump workqueues on sysrq-t
Hello, Andrew.

On Mon, Dec 08, 2014 at 10:06:13AM -0800, Andrew Morton wrote:
> sysrq-t already produces thousands of lines of output. Maybe create a
> new keycode for this?

Believe it or not, we already used up all alphanumerics if we count in
the arch-specific ones. Given that the workqueue information would
primarily be useful in tracking down hangs and we'd want to see the
dump of tasks in that case anyway, sysrq-t isn't a bad fit for
appending workqueue dump. If anybody has a better idea, I'm all ears.

...
> > +static void pr_cont_pool_info(struct worker_pool *pool)
> > +{
> > + if (pool->cpu >= 0)
> > + pr_cont(" cpu=%d", pool->cpu);
> > + else if (pool->node != NUMA_NO_NODE)
> > + pr_cont(" node=%d", pool->node);
> > +
> > + if (pool->cpu < 0) {
> > + static char cpus_buf[PAGE_SIZE];
>
> Ouch. This could be [NR_CPUS + epsilon]?

It's bitmap mask printing so each char can show four cpus. PAGE_SIZE
should be enough for now but I think we need cpumask_prcont().

> > +static void pr_cont_work(bool comma, struct work_struct *work)
> > +{
> > + if (work->func == wq_barrier_func) {
> > + struct wq_barrier *barr =
> > + container_of(work, struct wq_barrier, work);
>
> Can avoid the 80-col contortions with
>
> struct wq_barrier *barr;
>
> barr = container_of(work, struct wq_barrier, work);

I'm not sure either is any better, but sure.

> > + if (has_in_flight) {
> > + bool comma = false;
> > +
> > + printk(" in-flight:");
>
> pr_something? show_state() uses KERN_INFO, which may or may not be
> appropriate.

Hmmm, best to match show_state(). I'll convert to pr_info().

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-12-08 20:21    [W:0.061 / U:4.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site