< said:
> Gee, this looks suspiciously like jhb's refcount patch:
...Except that I made provision for architectures which have LL/SC
rather than CAS, which saves a few instructions.
-GAWollman
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the me
In article [EMAIL PROTECTED]> you
write:
><<[EMAIL PROTECTED]> said:
>
>> Actually, in truth I think you can get the code right like so:
>
>> long x = _mmm->m_ext.ref_cnt->refcnt;
>> while (!atomic_cmpset_long(&_mmm->m_ext.ref_cnt->refcnt, x - 1, x))
>> ;
>
>Cool! You've just (almost) reinv
On Tue, Dec 12, 2000 at 07:44:36PM -0800, Alfred Perlstein wrote:
> Ok, can you please commit the fix then?
Bosko is currently working up a patch that should be committed tonight
sometime. By the way, thanks for the bug report. =)
Jason
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "uns
* Garrett Wollman <[EMAIL PROTECTED]> [001212 18:50] wrote:
> < said:
>
> > Actually, in truth I think you can get the code right like so:
>
> > long x = _mmm->m_ext.ref_cnt->refcnt;
> > while (!atomic_cmpset_long(&_mmm->m_ext.ref_cnt->refcnt, x - 1, x))
> > ;
>
> Cool! You've just (almost
* Jason Evans <[EMAIL PROTECTED]> [001212 18:39] wrote:
> On Tue, Dec 12, 2000 at 05:59:37PM -0800, Alfred Perlstein wrote:
> > * Jason Evans <[EMAIL PROTECTED]> [001212 14:32] wrote:
> > > A safe version:
> > > ---
> > > #def
< said:
> Actually, in truth I think you can get the code right like so:
> long x = _mmm->m_ext.ref_cnt->refcnt;
> while (!atomic_cmpset_long(&_mmm->m_ext.ref_cnt->refcnt, x - 1, x))
> ;
Cool! You've just (almost) reinvented non-blocking parallel
reference-counts. Of course, what you re
On Tue, Dec 12, 2000 at 05:59:37PM -0800, Alfred Perlstein wrote:
> And since Chuck backs me up on this, can we consider this discussion
> over as soon as John commits his code?
No.
Jason
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message
On Tue, 12 Dec 2000, Alfred Perlstein wrote:
[...]
> And since Chuck backs me up on this, can we consider this discussion
> over as soon as John commits his code?
I think this is a valid point.
This is not the first time the need for proper refcount "interface"
arises, or at
On Tue, Dec 12, 2000 at 05:59:37PM -0800, Alfred Perlstein wrote:
> * Jason Evans <[EMAIL PROTECTED]> [001212 14:32] wrote:
> > A safe version:
> > ---
> > #define MEXTFREE(m) do {
* John Baldwin <[EMAIL PROTECTED]> [001212 15:19] wrote:
>
> On 12-Dec-00 Julian Elischer wrote:
> > John Baldwin wrote:
> >>
> >> On 12-Dec-00 Alfred Perlstein wrote:
> >> > grr...
> >> >
> >> > considering this:
> >> >
> >> >#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
> >> >
> >> >
* Jason Evans <[EMAIL PROTECTED]> [001212 14:32] wrote:
> On Tue, Dec 12, 2000 at 01:51:00AM -0800, Alfred Perlstein wrote:
>
> A safe version:
> ---
> #define MEXTFREE(m) do {
On 12-Dec-00 Julian Elischer wrote:
> John Baldwin wrote:
>>
>> On 12-Dec-00 Alfred Perlstein wrote:
>> > grr...
>> >
>> > considering this:
>> >
>> >#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
>> >
>> >#define MEXT_REM_REF(m) do {\
>> > KASSERT((m)->m_ext
On 12-Dec-00 Jason Evans wrote:
> On Tue, Dec 12, 2000 at 01:51:00AM -0800, Alfred Perlstein wrote:
>> * Alfred Perlstein <[EMAIL PROTECTED]> [001212 01:44] wrote:
>> > grr...
>> >
>> > considering this:
>> >
>> > #define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
>> >
>> > #define MEXT_R
On Tue, Dec 12, 2000 at 01:51:00AM -0800, Alfred Perlstein wrote:
> * Alfred Perlstein <[EMAIL PROTECTED]> [001212 01:44] wrote:
> > grr...
> >
> > considering this:
> >
> > #define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
> >
> > #define MEXT_REM_REF(m) do {\
> >
John Baldwin wrote:
>
> On 12-Dec-00 Alfred Perlstein wrote:
> > grr...
> >
> > considering this:
> >
> >#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
> >
> >#define MEXT_REM_REF(m) do {\
> > KASSERT((m)->m_ext.ref_cnt->refcnt > 0, ("m_ext refcnt < 0")); \
>
On 12-Dec-00 Alfred Perlstein wrote:
> * John Baldwin <[EMAIL PROTECTED]> [001212 08:39] wrote:
>>
>> On 12-Dec-00 Alfred Perlstein wrote:
>> > grr...
>> >
>> > considering this:
>> >
>> >#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
>> >
>> >#define MEXT_REM_REF(m) do {
* John Baldwin <[EMAIL PROTECTED]> [001212 08:39] wrote:
>
> On 12-Dec-00 Alfred Perlstein wrote:
> > grr...
> >
> > considering this:
> >
> >#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
> >
> >#define MEXT_REM_REF(m) do {\
> > KASSERT((m)->m_ext.ref_cnt-
On 12-Dec-00 Alfred Perlstein wrote:
> grr...
>
> considering this:
>
>#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
>
>#define MEXT_REM_REF(m) do {\
> KASSERT((m)->m_ext.ref_cnt->refcnt > 0, ("m_ext refcnt < 0")); \
> atomic_subtract_long(&((m)->m_ex
* Alfred Perlstein <[EMAIL PROTECTED]> [001212 01:44] wrote:
> grr...
>
> considering this:
>
> #define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
>
> #define MEXT_REM_REF(m) do {\
> KASSERT((m)->m_ext.ref_cnt->refcnt > 0, ("m_ext refcnt < 0")); \
> atomic_
grr...
considering this:
#define MEXT_IS_REF(m) ((m)->m_ext.ref_cnt->refcnt > 1)
#define MEXT_REM_REF(m) do {\
KASSERT((m)->m_ext.ref_cnt->refcnt > 0, ("m_ext refcnt < 0")); \
atomic_subtract_long(&((m)->m_ext.ref_cnt->refcnt), 1); \
} while(0)
this:
#defi
20 matches
Mail list logo