Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 2000 13:33:56 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        arch@FreeBSD.ORG
Subject:   Re: what to do with softinterrupts? 
Message-ID:  <73658.968758436@critter>
In-Reply-To: Your message of "Tue, 12 Sep 2000 04:26:54 PDT." <20000912042654.L12231@fw.wintelcom.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20000912042654.L12231@fw.wintelcom.net>, Alfred Perlstein writes:

>Poul-Henning Kamp thought that investigating atomic ops and
>keeping most of the current scheme of things would also work.

Well, that's not *quite* what I meant.

First we should exploit atomic ops all the places we can.  Atomics
are cheaper than anything we can ever do with threads.

What we do next is the good question.

I think something like the lazy-switch we (intend to) do for
hw-interrupts sounds promising:  foo_input() runs as far as it can
without blocking, when it needs to block, it does so in a another
thread and continues input processing for other packets.

We could either have one thread per PCB socket standby for
this use, but that's probably a waste of threads, or we can
snatch them from a pool of threads cached for that purpose.

I seriously don't think we can decide which way to go until we
have basically tried all the candidates in practice.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


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




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