Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754729Ab1FGOPA (ORCPT ); Tue, 7 Jun 2011 10:15:00 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56186 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048Ab1FGOO7 convert rfc822-to-8bit (ORCPT ); Tue, 7 Jun 2011 10:14:59 -0400 Subject: Re: Changing Kernel thread priorities From: Peter Zijlstra To: Remy Bohmer Cc: Armin Steinhoff , Thomas Gleixner , Johannes Bauer , Monica Puig-Pey , Rolando Martins , linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: <17185480.5304.1307435255996.JavaMail.root@WARSBL214.highway.telekom.at> <4DEDF1F2.2080204@steinhoff.de> <1307439469.2322.235.camel@twins> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Tue, 07 Jun 2011 16:14:40 +0200 Message-ID: <1307456080.2322.264.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1725 Lines: 40 On Tue, 2011-06-07 at 13:02 +0200, Remy Bohmer wrote: > Hi All, > > 2011/6/7 Peter Zijlstra : > > On Tue, 2011-06-07 at 11:40 +0200, Armin Steinhoff wrote: > >> Hi, > >> > >> when I read all these confusing statements here ( in german it looks > >> like an "Eiertanz") ... I can only say: > >> > >> - do the basic stuff in a minimal kernel driver > >> - use UIO (or VFIO for PCI devices) > > > > I see no requirement for any of those horrid things to be used. You can > > write a full on proper kernel driver, it just cannot set kernel thread > > priorities to a sane value (let them all default to 50 or so). > > > > Then have a user space script or whatever set the kthread priorities. > >> and you get clean control about your real-time priorities. > >> I think changing the priorities of "interrupt threads" inside the kernel > >> could lead to strange race conditions in the kernel. > > Well, I 100% agree that it must be under full userspace control to be > able to set the priorities. But, the kernel default assumption of > starting everything at 50 is wrong as well. > Imagine the following situation: > * Realtime application is running and has threads active in the range > of prios 20 - 90. > * Now bring up a network device, it immediately starts spamming the > system at prio 50 _before_ you have the chance to set it below 20 by > means of chrt. > * RT behaviour is gone! Good point I guess, Thomas should we default to 1 for everything? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/