From owner-freebsd-current@FreeBSD.ORG Wed Apr 23 12:39:35 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 CD6D437B404 for ; Wed, 23 Apr 2003 12:39:35 -0700 (PDT) Received: from alpha.siliconlandmark.com (alpha.siliconlandmark.com [209.69.98.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5F5A43FCB for ; Wed, 23 Apr 2003 12:39:33 -0700 (PDT) (envelope-from andy@siliconlandmark.com) Received: from alpha.siliconlandmark.com (localhost [127.0.0.1]) h3NJdXHE086464 for ; Wed, 23 Apr 2003 15:39:33 -0400 (EDT) (envelope-from andy@siliconlandmark.com) Received: from localhost (andy@localhost)h3NJdXpG086461 for ; Wed, 23 Apr 2003 15:39:33 -0400 (EDT) (envelope-from andy@siliconlandmark.com) X-Authentication-Warning: alpha.siliconlandmark.com: andy owned process doing -bs Date: Wed, 23 Apr 2003 15:39:33 -0400 (EDT) From: Andre Guibert de Bruet To: freebsd-current@freebsd.org In-Reply-To: Message-ID: <20030423153316.A59991@alpha.siliconlandmark.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 19:39:36 -0000 On Wed, 23 Apr 2003, John Baldwin wrote: > On 23-Apr-2003 Craig Reyenga wrote: > > From: "John Baldwin" > >> > >> 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? > > > > I am using SHED_ULE, and I have not yet tried this with SCHED_4BSD. I have > > already submitted a PR about this, perhaps a little prematurely. It's > > definitely a 'problem' though, because the system becomes unusable. I should > > also mention that any SSH sessions that were open already still work, until > > I try to run a new process, such as ls or something. > > Ok, it could be that sched_ule is breaking because of the kseq_nice > stuff. I think that SCHED_4BSD should be ok with this. On the topic of nice for the idle process(es), shouldn't they be running with the highest allowable value (+20)? Though this has no technical impact, couldn't they get that nice value for aesthetic purposes? Regards, > Andre Guibert de Bruet | Enterprise Software Consultant > > Silicon Landmark, LLC. | http://siliconlandmark.com/ >