From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753320AbdJLTYx (ORCPT ); Thu, 12 Oct 2017 15:24:53 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:44502 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbdJLTYv (ORCPT ); Thu, 12 Oct 2017 15:24:51 -0400 Date: Thu, 12 Oct 2017 21:24:45 +0200 From: Peter Zijlstra To: Roman Gushchin Cc: linux-kernel@vger.kernel.org, Tejun Heo , Oleg Nesterov , Linus Torvalds , Andrew Morton , Thomas Gleixner , Chris Mason , kernel-team@fb.com Subject: Re: [RFC 1/2] cgroup, kthread: do not allow moving kthreads out of the root cgroup Message-ID: <20171012192445.xdyrueypbncvappq@hirez.programming.kicks-ass.net> References: <20171012173723.13381-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171012173723.13381-1-guro@fb.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 12, 2017 at 06:37:22PM +0100, Roman Gushchin wrote: > Attaching kernel threads to a non-root cgroup is generally a bad > idea. Kernel threads are generally performing the work required > to keep the system working and healthy, and applying various > resource limits may affect system stability and performance. > > Some examples of dangerous behavior are limiting CPU time available > to rcu stuff, memory limits applied to almost all kthreads, etc. > > To prevent this dangerous behavior, let's deny all kthread > movements between cgroups. Right now only kthreads bounded > to CPUs are not allowed to move, which is not sufficient. > > If there are examples of kthreads which can be limited, > and it's guaranteed to be safe, we can allow explicit > exceptions further. The traditional use-case is stuffing all the unbound kthreads into a system cpuset in order to limit 'crap' on the rest of the CPUs. This setup is typically found in HPC and RT environments. So NAK. This needs to stay working in as far as it still works.