From owner-freebsd-arch@FreeBSD.ORG Sun Mar 16 05:55:27 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D5BB1065670 for ; Sun, 16 Mar 2008 05:55:27 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 31E018FC14 for ; Sun, 16 Mar 2008 05:55:27 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so5500743waf.3 for ; Sat, 15 Mar 2008 22:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=7Auzw4GbEotW2PsfLohK5brJDykYQxNo9aRBLN6/XDc=; b=G5AEhuBgcapBftEFsI6o8gm/07IL7hnN0rH2XcZ+3DRD/ELYpv2hv0Oi7QElNhtd159J3ssxPS2wbHPrCRmW5b2oK/xxgjwz+msbtzzSlr7BxeROLSc7/A2gB8SNHmbYcnMzbpp+l2owLHIQ8dyoLrX1/l8k/gsipueKpbpr3o8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=keDq+pZqUHViTjGtc1pX3WPjlDxZsj5QmzDF4NIrYdzqE4mkV2vaaF/3emLk9Hep6fYN173+Jlvx0F1Pq9xuSYFwqqS5VIqGTxVHFrPPjCElDegzn7BDFAtvhkB+S6XeUeRr6L4uIRRMGP6lasd938x+R1jZ5pOGzldcDm4VIwU= Received: by 10.114.195.19 with SMTP id s19mr15140268waf.57.1205646926748; Sat, 15 Mar 2008 22:55:26 -0700 (PDT) Received: by 10.115.22.10 with HTTP; Sat, 15 Mar 2008 22:55:26 -0700 (PDT) Message-ID: Date: Sat, 15 Mar 2008 22:55:26 -0700 From: "Kip Macy" To: "Jeff Roberson" In-Reply-To: <20080315195328.V910@desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080315195328.V910@desktop> Cc: arch@freebsd.org Subject: Re: separating out memory checks from INVARIANTS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 05:55:27 -0000 On Sat, Mar 15, 2008 at 10:54 PM, Jeff Roberson wrote: > > On Sat, 15 Mar 2008, Kip Macy wrote: > > > I find that the serialization of memory allocation frequently hides > > race conditions. I would like to, at the very least, add an option to > > disable the memory checks if not make the memory checks a completely > > separate option. My knee jerk reaction to avoiding bikesheds is to > > simply add it to my own tree and forget about it. However, this has > > come up often enough that I feel that it warrants consideration. > > > > > > Thoughts? > > One other option that I have frequently considered is to convert UMA from > using an array of bytes to using bitfields to represent the free space in > a slab. Then you could use atomics to update the required information. > It'd be a bit of work. Maybe a good SoC? :) Would it make it possible to do memory allocation without holding a lock in the M_NOWAIT case? -Kip