Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 2003 13:55:11 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Craig Reyenga <creyenga@connectmail.carleton.ca>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Renice idle process to -20 causes hang.
Message-ID:  <XFMail.20030423135511.jhb@FreeBSD.org>
In-Reply-To: <000b01c309bd$dbbd48b0$0200000a@fireball>

next in thread | previous in thread | raw e-mail | index | archive | help

On 23-Apr-2003 Craig Reyenga wrote:
> From: "John Baldwin" <jhb@freebsd.org>
>>
>> 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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
>> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
>>
> 
> 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.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030423135511.jhb>