From owner-freebsd-current@FreeBSD.ORG Wed Apr 23 10:13:28 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4B9537B418 for ; Wed, 23 Apr 2003 10:13:28 -0700 (PDT) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22DEE43FA3 for ; Wed, 23 Apr 2003 10:13:24 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 16218 invoked from network); 23 Apr 2003 17:13:28 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 23 Apr 2003 17:13:28 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h3NHDLOv096776; Wed, 23 Apr 2003 13:13:21 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <001b01c30959$57a694a0$0200000a@fireball> Date: Wed, 23 Apr 2003 13:13:24 -0400 (EDT) From: John Baldwin To: Craig Reyenga cc: freebsd-current@freebsd.org Subject: RE: Renice idle process to -20 causes hang. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2003 17:13:29 -0000 On 23-Apr-2003 Craig Reyenga wrote: > While running a samba benchmark, I tried 'renice -n -20 10' (pid 10 is idle > thread) to see what would happen. Turns out that this operation isn't > illegal, and the system hung accordingly. The benchmark timed out soon > after, and the console started displaying this message: > > swap_pager: indefinite wait buffer: device: ad0s1b, blkno: 776, size: 4096 > > over and over, although not rapidly. I'm not sure what to blame; perhaps > setpriority() should return [EINVAL] or something. I can provide more info, > upon request. Umm, yeah, setpriority should do an EINVAL, but that's not probably the real bug. idlethreads are never on the run queues, they are truly idle and only executed when there is nothing else to do. They don't have a real priority other than "anything else is more important". What might have happened is that setpiority() put the idle process on the run queue, which is guaranteed to totally hose your system. Are you using SCHED_ULE or SCHED_4BSD? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/