niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » FreeBSD » mail-lists » Architecture
SMP safe reference counting
Post new topic   Reply to topic Page 2 of 2 [18 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2
Author Message
Julian Elischer
*nix forums Guru Wannabe


Joined: 20 Mar 2002
Posts: 279

PostPosted: Thu Mar 28, 2002 10:14 pm    Post subject: Re: SMP safe reference counting Reply with quote

On Thu, 28 Mar 2002, Bosko Milekic wrote:

Quote:

On Thu, Mar 28, 2002 at 09:45:02AM -0500, John Baldwin wrote:

On 28-Mar-2002 Bosko Milekic wrote:

I don't think we really need a ref. count API, per-se. I can think of
several places that may need to do ref. counting but wouldn't want to
do it with a bus-locked instruction because their reference counter(s)
are already protected by an existing mutex.

-Bosko

Those places wouldn't use the API then I think. However, this would be good
for things like ucreds, pargs, uidinfos and others.

Yeah, absolutely. I was just pointing out that there's little point
in having a reference counting API when a lot of the reference counting
implementations won't be using it.

but a lot would.. and that's GOOD.

John, can you put your sugfgested API up again?
I remember it would work but was (in my mind) 'different'.
I didn't think it was intuative but at least get it up for discussion..

(I posted my suggested API a few mails ago.. I'm sure it too has
weaknesses though)


Julian
Quote:



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
John Baldwin
*nix forums Guru Wannabe


Joined: 27 Mar 2002
Posts: 278

PostPosted: Thu Mar 28, 2002 10:37 pm    Post subject: Re: SMP safe reference counting Reply with quote

On 28-Mar-2002 Julian Elischer wrote:
Quote:


On Thu, 28 Mar 2002, Bosko Milekic wrote:


On Thu, Mar 28, 2002 at 09:45:02AM -0500, John Baldwin wrote:

On 28-Mar-2002 Bosko Milekic wrote:

I don't think we really need a ref. count API, per-se. I can think of
several places that may need to do ref. counting but wouldn't want to
do it with a bus-locked instruction because their reference counter(s)
are already protected by an existing mutex.

-Bosko

Those places wouldn't use the API then I think. However, this would be
good
for things like ucreds, pargs, uidinfos and others.

Yeah, absolutely. I was just pointing out that there's little point
in having a reference counting API when a lot of the reference counting
implementations won't be using it.

but a lot would.. and that's GOOD.

John, can you put your sugfgested API up again?
I remember it would work but was (in my mind) 'different'.
I didn't think it was intuative but at least get it up for discussion..

(I posted my suggested API a few mails ago.. I'm sure it too has
weaknesses though)

It's old but it's been at ~jhb/paches/refcount.patch for about an eternity
right now. The changes I would make to it are that I would change
refcount_drop() (or release or whatever it is called) to return the current
value rather than a boolean about the value being 0 or not. Also, once
atomic_fetchadd() is done, it will change a fair bit. There would just be
a MI header, no MD stuff, and we woudln't use a mutex for the debug version
that uses asserts.

Quote:
Julian

--

John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Julian Elischer
*nix forums Guru Wannabe


Joined: 20 Mar 2002
Posts: 279

PostPosted: Thu Mar 28, 2002 10:45 pm    Post subject: Re: SMP safe reference counting Reply with quote

On Thu, 28 Mar 2002, John Baldwin wrote:

oops I see it's there.. you just mispelled the path..
sorry

Quote:

It's old but it's been at ~jhb/paches/refcount.patch for about an eternity
right now. The changes I would make to it are that I would change
refcount_drop() (or release or whatever it is called) to return the current
value rather than a boolean about the value being 0 or not. Also, once
atomic_fetchadd() is done, it will change a fair bit. There would just be
a MI header, no MD stuff, and we woudln't use a mutex for the debug version
that uses asserts.

Julian

--

John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 2 of 2 [18 Posts] Goto page:  Previous  1, 2
View previous topic :: View next topic
The time now is Thu Jan 08, 2009 5:40 am | All times are GMT
navigation Forum index » *nix » BSD » FreeBSD » mail-lists » Architecture
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Counting 'on' bits in a byte? John C 13 Tue Jul 18, 2006 9:47 pm
No new posts Null reference David White C++ 27 Tue Jul 18, 2006 5:17 am
No new posts WARNING - current temperature (60.0C) exceeds safe limits renchao85@gmail.com FreeBSD 1 Tue Jul 18, 2006 12:23 am
No new posts Handling sessions through cookies, is it safe? romayankin@gmail.com PHP 3 Sun Jul 16, 2006 10:22 pm
No new posts FAQ 3.7 How do I cross-reference my Perl programs? PerlFAQ Server Perl 0 Sat Jul 15, 2006 7:03 am

Download Anime | Bankruptcy | Mortgages | Personal Finance | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1283s ][ Queries: 16 (0.0487s) ][ GZIP on - Debug on ]