From owner-freebsd-current@FreeBSD.ORG Tue Sep 25 21:37:43 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AF2816A41A; Tue, 25 Sep 2007 21:37:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id D520013C447; Tue, 25 Sep 2007 21:37:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l8PLbfQk098394; Tue, 25 Sep 2007 17:37:41 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-current@FreeBSD.org Date: Tue, 25 Sep 2007 17:37:34 -0400 User-Agent: KMail/1.6.2 References: <200709181516.11207.jkim@FreeBSD.org> <46F7EDD6.4010508@root.org> <200709251538.33353.jkim@FreeBSD.org> In-Reply-To: <200709251538.33353.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200709251737.38780.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.90.2/4396/Tue Sep 25 14:48:03 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: freebsd-acpi@FreeBSD.org, John Baldwin , Nate Lawson Subject: Re: [PATCH] OsdSynch.c modernization X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 21:37:43 -0000 On Tuesday 25 September 2007 03:38 pm, Jung-uk Kim wrote: > On Monday 24 September 2007 01:03 pm, Nate Lawson wrote: > > Jung-uk Kim wrote: > > > (At least on my laptop) I found the malloc() was called from > > > our code, i.e., AcpiOsExecute() from OsdSched.c. I'll try > > > something shortly cause I was going to rewrite the file anyway. > > > > Yep, that's because we need a task structure that's different for > > each call and acpi-ca doesn't like the "pending" argument (see > > OsdSchedule.c). One fix for this is to just use a hack and cast > > the fn to discard the extra arg. Not sure this would work. > > I quickly tested it but didn't work. :-( > > Actually it is not just pending argument but struct task itself has > to be allocated. I did crude hack to see if it is possible to have > it working with spin mutex gracefully. It can be done if we > pre-allocate some space for the tasks and use fast taskqueue. Does > it make sense to you? FYI, here is the hack: http://people.freebsd.org/~jkim/acpica/Osd.diff Jung-uk Kim