From owner-p4-projects Fri May 10 9:56:11 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D0E337B408; Fri, 10 May 2002 09:55:59 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by hub.freebsd.org (Postfix) with ESMTP id DD06737B403; Fri, 10 May 2002 09:55:57 -0700 (PDT) Received: (from jake@localhost) by k6.locore.ca (8.11.6/8.11.6) id g4AH5YO16008; Fri, 10 May 2002 13:05:34 -0400 (EDT) (envelope-from jake) Date: Fri, 10 May 2002 13:05:34 -0400 From: Jake Burkholder To: Jonathan Mini Cc: Perforce Change Reviews Subject: Re: PERFORCE change 11120 for review Message-ID: <20020510130534.E2566@locore.ca> References: <200205101530.g4AFUn510685@freefall.freebsd.org> <20020510123716.D2566@locore.ca> <20020510095040.I43682@stylus.haikugeek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020510095040.I43682@stylus.haikugeek.com>; from mini@freebsd.org on Fri, May 10, 2002 at 09:50:40AM -0700 Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Fri, May 10, 2002 at 09:50:40AM -0700, Jonathan Mini said words to the effect of; > Jake Burkholder [jake@locore.ca] wrote : > > > Apparently, On Fri, May 10, 2002 at 08:30:49AM -0700, > > Jonathan Mini said words to the effect of; > > > > > http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11120 > > > > > > Change 11120 by mini@mini_stylus on 2002/05/10 08:30:36 > > > > > > Give UMA control over thread allocation and caching: > > > > > > [ ... ] > > > > I'm not sure that using the uma callouts for all of this is safe. > > What specifically do you think is dangerous? Sleeping with a mutex held. > > > > + mtx_lock_spin(&sched_lock); > > > + > > > + mtx_unlock_spin(&sched_lock); > > > > ??? > > *rofl* I can't believe that. Already fixed. Dunce cap for me. ;) > > > > + td = (struct thread *)mem; > > > + pmap_dispose_thread(td); > > > + vm_object_deallocate(td->td_kstack_obj); > > > + cached_threads--; /* XXXSMP */ > > > + allocated_threads--; /* XXXSMP */ > > > +} > > > > These pmap and vm_object calls might sleep, and are called with the uma > > zone locked. > > > > Hmm, that's not good. > > > Almost all of the new code you added looks like its indented 4 spaces, > > which should be tabs :) > > >From style(9): > > Indentation is an 8 character tab. Second level indents are four spaces. > > .. I must have misread that. What are second level indents, then? Second level indent is for wrapping lines that spill over 78 columns. ie (contrived examples that don't actually wrap): if (foo && bar) { ^^^^ <-- this is second level baz(); } or x = y + z; ^^^ <-- and so is this but: if (foo) bar(); ^^^^ <-- this is not Hope this helps. > > > -- > Jonathan Mini > http://www.haikugeek.com > > "He who is not aware of his ignorance will be only misled by his knowledge." > -- Richard Whatley To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message