Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jun 1999 17:51:06 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Arun Sharma <adsharma@home.com>
Cc:        freebsd-smp@FreeBSD.ORG
Subject:   Re: BSDI Lazy threading
Message-ID:  <199907010051.RAA41944@apollo.backplane.com>
References:   <19990630173519.A23653@home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
:> all extra thread context switching is delayed (in the hope that it wont
:> have to be done).  If a lock is encountered, the rest of the context
:> switch is done, and the thread sleeps. (and control is passed back to
:> the holder of the lock (if they are runnable) or the original process.
:
:Are interrupt handlers allowed to sleep in the kernel ? 
:
:	-Arun

    Currently:

	No, but sometimes they do anyway.

    Proposed (w/ kernel threads):

	Yes, they will be allowed to sleep but the idea is for it to only
	occur in special (and not oft-occuring) situations.


    What we do currently is attempt to disable interrupts in mainline code
    to avoid contention.  Theoretically such disablements are not supposed
    to occur for long periods of time but the reality is that they often do,
    especially for network-related things.  One advantage of moving interrupts
    to kernel threads is that the latency issue can be more easily managed.
    Rather then disable an interrupt entirely we instead allow the interrupt
    thread to preempt the kernel and then block if necessary.

    The manageability here is that the interrupt thread can now explicitly
    check to see if it would block and, if it is a really critical interrupt,
    can do something about it.  I see this as a big advantage because it 
    would allow us to run the most critical interrupts without any real latency
    at all(1).  The serial and keyboard interrupts come to mind.

    note(1): cavet:  interrupts must often be truely disabled when I/O to
    non-DMA IDE drives is occuring due to bugs in many IDE controllers.

    The other advantage of running interrupts in threads is that you can
    run several interrupts simultaniously in an SMP system.  For example,
    a gigabit ethernet device internet would be able to run concurrently
    with the TCP stack.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




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