All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: "Michael S. Zick" <mszick@morethan.org>,
	parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [RFC] Alternative implementation of glibc spinlocks
Date: Sat, 02 Jul 2005 23:23:57 +0800	[thread overview]
Message-ID: <42C6B18D.7090909@tausq.org> (raw)
In-Reply-To: <200507020935.42389.mszick@morethan.org>

Please reply on list.

> 1) Your free-listing of locks does not appear to be thread safe;
>     I.E: Protected from concurrent changes.
> 
> But then, perhaps my mind is going and I just did not
> read the code closely enough.

They are protected by a spinlock.

> 2) How about an alternative implementation?
> Based on 4,096 byte pages;
> 
> Using the find_[first|last]_[zero|one] asm routines;
> 
> As I recall, they only go to 64 bits currently but only
> require 3 instructions per binary radix (add 6 instructions
> for 256 bits);
> 
> First 16 bytes of the page - your current header;
> Second 16 bytes of the page - bitmap of available locks;

Why do you need a bitmap?

> First bit of the bitmap represents the current header -
> use this to lock the page list (currently called free-list);
> 
> Second bit of the bitmap represents the bitmap -
> use this to lock the bitmap;

how do you use a bit to do locking?

> The remaining 254 bits/lock structures per page are usable.

randolph
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  parent reply	other threads:[~2005-07-02 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-02 13:59 [parisc-linux] [RFC] Alternative implementation of glibc spinlocks Randolph Chung
     [not found] ` <200507020935.42389.mszick@morethan.org>
2005-07-02 15:23   ` Randolph Chung [this message]
2005-07-04  1:00 ` Carlos O'Donell
2005-07-04  1:59   ` Randolph Chung
2005-07-04  4:14     ` Carlos O'Donell
2005-07-04  5:49       ` Randolph Chung
2005-07-04 14:54         ` Carlos O'Donell
2005-07-04 15:35           ` John David Anglin
2005-07-05  1:39           ` Randolph Chung
2005-07-05  5:14             ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42C6B18D.7090909@tausq.org \
    --to=randolph@tausq.org \
    --cc=mszick@morethan.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.