Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 2004 09:32:07 +1030
From:      "Wilkinson, Alex" <alex.wilkinson@dsto.defence.gov.au>
To:        freebsd-current@freebsd.org
Subject:   Re: kernel: return from interrupt
Message-ID:  <20041111230156.GA40059@squash.dsto.defence.gov.au>
In-Reply-To: <Pine.NEB.3.96L.1041111214427.6545C-100000@fledge.watson.org>
References:  <aa26c8a9041111103056ac4233@mail.gmail.com>  <Pine.NEB.3.96L.1041111214427.6545C-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Curios, Robert, how does one find out whether their currently running kernel
is a 'pre-empatble' one ? sysctl ?

   - aW

	0n Thu, Nov 11, 2004 at 09:46:20PM +0000, Robert Watson wrote: 

	On Thu, 11 Nov 2004, Anurekh Saxena wrote:
	
	> I was under the impression that the 5.3 release had an option for full
	> preemption.  If I am correct, why does the kernel refuse to schedule on
	> a return_from_interrupt if its not going back to userland? I can
	> understand this being a problem if interrupts were nested, or return
	> from a page fault in a critical section. Please correct me if I am
	> wrong, but if a *high* priority interrupt thread is ready to run, it
	> should be given a chance. Presuming the *interrupted* kernel path is
	> going to give up the CPU fast enough is probably not a good idea. 
	> 
	> I hope I have sent this to the right mailing list. 
	
	Even normal "options PREEMPTION" should do this.  I know from tracing the
	kernel in 6.x that that's the way the system behaves out of the box; with
	PREEMPTION turned on in 5.x you should see the same behavior.  One thing I
	often do see, FWIW, is that if you're on an SMP box, the ithread will get
	scheduled to run immediately on another CPU that's idle, so you won't
	actually preempt the thread on the current CPU other than for the
	interrupt handler.  What behavior are you seeing that suggests this isn't
	happening with PREEMPTION compiled in?
	
	Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
	robert@fledge.watson.org      Principal Research Scientist, McAfee Research
	
	_______________________________________________
	freebsd-current@freebsd.org mailing list
	http://lists.freebsd.org/mailman/listinfo/freebsd-current
	To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
	



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