Date: Thu, 8 May 2008 15:48:12 -0700 From: "Murty, Ravi" <ravi.murty@intel.com> To: "Julian Elischer" <julian@elischer.org> Cc: freebsd-hackers@freebsd.org Subject: RE: SW_PREEMPT and cpu runq Message-ID: <AEBCFC23C0E40949B10BA2C224FC61B0072C2D23@orsmsx416.amr.corp.intel.com> In-Reply-To: <48237E60.9040007@elischer.org> References: <AEBCFC23C0E40949B10BA2C224FC61B0072C2A7A@orsmsx416.amr.corp.intel.com> <48237E60.9040007@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I guess two places. 1. maybe_preempt() - I've decided to preempt a thread on a cpu and the outgoing thread is held (SW_PREEMPT) on the same cpu. 2. timer expires and thread is out of its slice (ULE), in this case I remove the load and re-add it back to the same (current) cpu. Sorry Julian, yes this is 6.2 Thanks much, Ravi -----Original Message----- From: Julian Elischer [mailto:julian@elischer.org]=20 Sent: Thursday, May 08, 2008 3:28 PM To: Murty, Ravi Cc: freebsd-hackers@freebsd.org Subject: Re: SW_PREEMPT and cpu runq Murty, Ravi wrote: > Hi, >=20 > =20 >=20 > When a thread is being switched out and it is being preempted (e.g. time > quantum expires), why does sched_switch hold it on the current cpu? i.e. > why does the code see that it was preempted and put it back on the same > queue? >=20 > In other cases it looks to see if it can be migrated and the thread goes > back some place else. If a thread is being kicked out and there is a > perfectly idle CPU some where on the system, wouldn't it make sense to > migrate the thread? it shouldn't be held.. why do you think it is? (and is this in 6.x still?) >=20 > =20 >=20 > Thanks > Ravi >=20 > =20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AEBCFC23C0E40949B10BA2C224FC61B0072C2D23>