From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Jan Kara <jack@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Petr Mladek <pmladek@suse.cz>, KY Srinivasan <kys@microsoft.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH 6/7] printk: Avoid scheduling printing threads on the same CPU
Date: Fri, 11 Dec 2015 00:19:06 +0900 [thread overview]
Message-ID: <20151210151906.GE540@swordfish> (raw)
>+static void distribute_printing_kthreads(void)
>+{
>+ int i;
>+ unsigned int cpus_per_thread;
>+ unsigned int cpu, seen_cpu;
>+
>+ for (i = 0; i < PRINTING_TASKS; i++)
>+ cpumask_clear(printing_kthread_mask[i]);
>+
>+ cpus_per_thread = DIV_ROUND_UP(num_online_cpus(), PRINTING_TASKS);
>+ seen_cpu = 0;
>+ for_each_online_cpu(cpu) {
>+ cpumask_set_cpu(cpu,
>+ printing_kthread_mask[seen_cpu / cpus_per_thread]);
>+ seen_cpu++;
>+ }
>+
>+ for (i = 0; i < PRINTING_TASKS; i++)
>+ if (!cpumask_empty(printing_kthread_mask[i]))
>+ set_cpus_allowed_ptr(printing_kthread[i],
>+ printing_kthread_mask[i]);
>+}
I certainly understand what are you trying to do here, but I'm a bit concerned.
This may result in 'bad' affinities on big.LITTLE platforms, for example. So I
think that printk is not quite good place for that type of decisions. Just my 5
cents.
-ss
next reply other threads:[~2015-12-10 15:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 15:19 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-10-26 4:52 [PATCH 0/6 v2] printk: Softlockup avoidance Jan Kara
2015-10-26 4:52 ` [PATCH 6/7] printk: Avoid scheduling printing threads on the same CPU Jan Kara
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=20151210151906.GE540@swordfish \
--to=sergey.senozhatsky@gmail.com \
--cc=1445835169-8203-7-git-send-email-jack@suse.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).