From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 12:44:39 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16FC616A42A for ; Wed, 11 Jan 2006 12:44:39 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E990843D4C for ; Wed, 11 Jan 2006 12:44:37 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so135313nzo for ; Wed, 11 Jan 2006 04:44:37 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eHIWLmFuiFbaceeJl5rh34RI82UrpARtkAgQhmM8+HcxOPWLdirSzpwEjLPrNfJumdFFl9tZ6ajGFJ8ssQjI26RIzIYeqi6jBLVazAyDEJGH0EKfxMIaTkSKql3sipFgFak3RIsKrcDeWC3PnHc0wJ1QIuTwPCRC02tniQcQlSw= Received: by 10.36.224.9 with SMTP id w9mr691301nzg; Wed, 11 Jan 2006 04:44:37 -0800 (PST) Received: by 10.36.41.1 with HTTP; Wed, 11 Jan 2006 04:44:37 -0800 (PST) Message-ID: <3bbf2fe10601110444t66b6a8a4j@mail.gmail.com> Date: Wed, 11 Jan 2006 04:44:37 -0800 From: rookie To: freebsd-hackers@freebsd.org In-Reply-To: <3bbf2fe10601110439k11ed3b9ds@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060111121304.62832.qmail@web30013.mail.mud.yahoo.com> <3bbf2fe10601110439k11ed3b9ds@mail.gmail.com> Subject: Re: rescheduling tasks using swi_add() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 12:44:39 -0000 2006/1/11, kamal kc : > > dear everybody, > > i had previous thread going on about the cpu load > average. and had some discussion regarding it. i have > a newer thing to discuss on so i started this thread. > > as i mentioned earlier i had put some code in the > bridge.c > that performed compression which took a long time and > hence > i got a high number of interface interrupts (irq22: xl > interrupts). > > so i thought of rescheduling the compression tasks > without > blocking the bridge function. i found this function > swi_add() [snip] swi_* are used to rule interrupt threads but as you're speaking it doesn't seem you're in this case. In order to force a preemption you might use mi_switch(9) which causes a machine-independent context switch for curthread. cheers, Attilio -- Peace can only be achieved by understanding - A. Einstein