From owner-freebsd-acpi@FreeBSD.ORG Sat Jan 26 08:30:35 2013 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15389A87; Sat, 26 Jan 2013 08:30:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1767864B; Sat, 26 Jan 2013 08:30:33 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA09826; Sat, 26 Jan 2013 10:30:28 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Tz19f-000HcX-UP; Sat, 26 Jan 2013 10:30:27 +0200 Message-ID: <51039423.2070203@FreeBSD.org> Date: Sat, 26 Jan 2013 10:30:27 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130121 Thunderbird/17.0.2 MIME-Version: 1.0 To: Jung-uk Kim Subject: Re: uma for acpi object cache References: <20130122175629.GA1714@garage.freebsd.pl> <51008661.4060006@FreeBSD.org> <510101B4.4030409@FreeBSD.org> <51017D79.6060202@FreeBSD.org> <51018223.4030702@FreeBSD.org> <51019AAE.10501@FreeBSD.org> <51024475.20909@FreeBSD.org> In-Reply-To: <51024475.20909@FreeBSD.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 08:30:35 -0000 on 25/01/2013 10:38 Andriy Gapon said the following: > on 24/01/2013 22:33 Jung-uk Kim said the following: >> On 2013-01-24 13:49:07 -0500, Andriy Gapon wrote: >>> on 24/01/2013 20:29 Jung-uk Kim said the following: >>>> When utcache.c works, it works fairly well, actually. :-) >> >>> Well, my primary motivation for the patch is all the reports about >>> mysterious panics that seem to involve the cache: >>> http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7562 >>> http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7613 >>> http://thread.gmane.org/gmane.os.freebsd.devel.acpi/7077 >> >>> There were a few more reports with the same theme. I hoped that >>> using uma(9) instead of hand-rolled code would lead to better >>> diagnostic and debugging cabilities. >> >> Hmm... I am not really sure local cache is to blame here. If you >> really want to prove your theory, I think a simple modification to >> utcache.c should do: >> >> Cache->LinkOffset = 8; >> Cache->ListName = CacheName; >> Cache->ObjectSize = ObjectSize; >> - Cache->MaxDepth = MaxDepth; >> + Cache->MaxDepth = 0; >> >> *ReturnCache = Cache; >> return (AE_OK); >> >> This should effectively kill object caching. > > That's a very simple trick, I wonder why I didn't think about it :-) > Now I need to wait until one of the reporters resurfaces. > And just to clarify - I didn't and don't suspect the cache code itself. I suspect some code that uses the cache (directly or indirectly) - something like double-free or use-after-free, etc. -- Andriy Gapon