From owner-freebsd-arch Sun May 14 7:11: 8 2000 Delivered-To: freebsd-arch@freebsd.org Received: from berserker.bsdi.com (berserker.twistedbit.com [199.79.183.1]) by hub.freebsd.org (Postfix) with ESMTP id 9E35937BDC4 for ; Sun, 14 May 2000 07:11:05 -0700 (PDT) (envelope-from cp@berserker.bsdi.com) Received: from berserker.bsdi.com (cp@LOCALHOST [127.0.0.1]) by berserker.bsdi.com (8.9.3/8.9.3) with ESMTP id IAA04077; Sun, 14 May 2000 08:11:00 -0600 (MDT) Message-Id: <200005141411.IAA04077@berserker.bsdi.com> To: Doug Rabson Cc: arch@freebsd.org Subject: Re: A new api for asynchronous task execution From: Chuck Paterson Date: Sun, 14 May 2000 08:11:00 -0600 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug, First, in continuing this thread I'm most trying to make sure I have managed to get my point across, not necessarily convince you that you really need to make a change now. Sorry, but I'm not sure I'm parsing what you said correctly. I believe that you are saying that the line two lines I added will actually be in taskqueue_enqueue. }> if (queue == taskqueue_swi) <------ }> setsoftaskqueue(); <------ } }For taskqueue_swi, this is exactly what happens in the call to }queue->enqueue(queue) above. } Then in a kernel which as more software threads you will soon have the following which as far as I can tell won't be optimized out even if if taskqueue_enqueue() is implemented as a macro: if (queue == taskqueue_swi) setsoftaskqueue() if (queue == taskqueue_foo) setsoftaskfoo() if (queue == taskqueue_bar) setsoftaskbar() if (queue == taskqueue_xxx) setsoftaskxxx() This can be avoided by having a macro pre-defined for these uses for now which would only be #define TASKQUEUE(task, flag) /* flag ignored for now* \ taskqueue_enqueue(taskqueue_swi, task); \ setsofttaskqueueu() The macro name TASKQUEUE may well be inappropriate. Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message