lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 11 Dec 2015 00:19:06 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Jan Kara <jack@...e.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Petr Mladek <pmladek@...e.cz>,
	KY Srinivasan <kys@...rosoft.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH 6/7] printk: Avoid scheduling printing threads on the
 same CPU

>+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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ