From: Jon Loeliger <jdl@freescale.com>
To: linuxppc-dev@ozlabs.org, linuxppc64-dev@ozlabs.org
Subject: Re: PATCH powerpc Merge asm-ppc*/rwsem.h
Date: Fri, 23 Sep 2005 07:52:03 -0500 [thread overview]
Message-ID: <E1EIn23-0001pB-H0@jdl.com> (raw)
In-Reply-To: Your message of "Fri, 23 Sep 2005 08:32:20 BST." <606.1127460740@warthog.cambridge.redhat.com>
So, like, the other day David Howells mumbled:
>
> rwsems on ppc64 should really be using a 64-bit counter, not a 32-bit counter
> ,
> otherwise you limit the maximum number of processes to 32K-ish.
>
> The counter should be "signed long" really.
No problem. I _can_ resubmit the patch with this fix.
However, I am not certain that I should yet.
But what do you wan to do with ppc32 land then?
Leaving it a "signed long" will limit ppc32 land but
not ppc64 folks. (No problem.) Or we can have it
be "singed long long" for ppc32 to also get 64 bits.
(Again, no problem.)
Also, this begs the question of the comment from Paul:
struct rw_semaphore {
/* XXX this should be able to be an atomic_t -- paulus */
signed int count;
Which, of course is:
typedef struct { volatile int counter; } atomic_t;
Changing the size of counter will cause bad sizes
due to the actual treatment of count as an atomic_t.
So. Should we, in fact, convert it to be an atomic_t
and further dispense with the casts?:
static inline void __down_write(struct rw_semaphore *sem)
{
int tmp;
tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_t *)(&sem->count));
And if we _do_ convert it to be an atomic_t, should _that_
be where the real type for count gets established?
And finally, I've been working on merging header files
under the vague guideline of "merge maintaining existing
functionality/breakage". I've been trying NOT to introduce
simultaneous "improvements" at the risk of breaking something.
To that end, I ask if the request to make 'count' be 64-bits
should be submitted as a follow on patch that stands on its
own and can clean up around it as necessary? Or do you want
it mixed in with this "merge" patch too?
Just need to know the preferences.
Thanks,
jdl
next prev parent reply other threads:[~2005-09-23 12:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-22 19:55 PATCH powerpc Merge asm-ppc*/rwsem.h Jon Loeliger
2005-09-23 7:32 ` David Howells
2005-09-23 7:44 ` Anton Blanchard
2005-09-23 7:52 ` David Howells
2005-09-23 12:52 ` Jon Loeliger [this message]
2005-09-23 14:09 ` David Howells
2005-09-24 0:46 ` Paul Mackerras
2005-09-26 11:38 ` David Howells
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=E1EIn23-0001pB-H0@jdl.com \
--to=jdl@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc64-dev@ozlabs.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.