On Thu, Jan 20, 2005 at 08:43:30AM +1100, Paul Mackerras wrote:
> I suggest read_poll(), write_poll(), spin_poll(),...
Erm...those names sound way too much like existing interfaces.
Perhaps check_read_lock()/check_write_lock() ?
If they don't get used too much, the longer name should be ok.
Ingo Molnar writes:
> * Peter Chubb <[EMAIL PROTECTED]> wrote:
>
> > >> Here's a patch that adds the missing read_is_locked() and
> > >> write_is_locked() macros for IA64. When combined with Ingo's
> > >> patch, I can boot an SMP kernel with CONFIG_PREEMPT on.
> > >>
> > >> However, I feel
* Peter Chubb <[EMAIL PROTECTED]> wrote:
> >> Here's a patch that adds the missing read_is_locked() and
> >> write_is_locked() macros for IA64. When combined with Ingo's
> >> patch, I can boot an SMP kernel with CONFIG_PREEMPT on.
> >>
> >> However, I feel these macros are misnamed:
> "Ingo" == Ingo Molnar <[EMAIL PROTECTED]> writes:
Ingo> * Peter Chubb <[EMAIL PROTECTED]> wrote:
>> Here's a patch that adds the missing read_is_locked() and
>> write_is_locked() macros for IA64. When combined with Ingo's
>> patch, I can boot an SMP kernel with CONFIG_PREEMPT on.
>>
>>
* Peter Chubb <[EMAIL PROTECTED]> wrote:
> Here's a patch that adds the missing read_is_locked() and
> write_is_locked() macros for IA64. When combined with Ingo's patch, I
> can boot an SMP kernel with CONFIG_PREEMPT on.
>
> However, I feel these macros are misnamed: read_is_locked() returns
* Peter Chubb [EMAIL PROTECTED] wrote:
Here's a patch that adds the missing read_is_locked() and
write_is_locked() macros for IA64. When combined with Ingo's patch, I
can boot an SMP kernel with CONFIG_PREEMPT on.
However, I feel these macros are misnamed: read_is_locked() returns
true
Ingo == Ingo Molnar [EMAIL PROTECTED] writes:
Ingo * Peter Chubb [EMAIL PROTECTED] wrote:
Here's a patch that adds the missing read_is_locked() and
write_is_locked() macros for IA64. When combined with Ingo's
patch, I can boot an SMP kernel with CONFIG_PREEMPT on.
However, I feel these
* Peter Chubb [EMAIL PROTECTED] wrote:
Here's a patch that adds the missing read_is_locked() and
write_is_locked() macros for IA64. When combined with Ingo's
patch, I can boot an SMP kernel with CONFIG_PREEMPT on.
However, I feel these macros are misnamed: read_is_locked() returns
Ingo Molnar writes:
* Peter Chubb [EMAIL PROTECTED] wrote:
Here's a patch that adds the missing read_is_locked() and
write_is_locked() macros for IA64. When combined with Ingo's
patch, I can boot an SMP kernel with CONFIG_PREEMPT on.
However, I feel these macros are misnamed:
On Thu, Jan 20, 2005 at 08:43:30AM +1100, Paul Mackerras wrote:
I suggest read_poll(), write_poll(), spin_poll(),...
Erm...those names sound way too much like existing interfaces.
Perhaps check_read_lock()/check_write_lock() ?
If they don't get used too much, the longer name should be ok.
Here's a patch that adds the missing read_is_locked() and
write_is_locked() macros for IA64. When combined with Ingo's patch, I
can boot an SMP kernel with CONFIG_PREEMPT on.
However, I feel these macros are misnamed: read_is_locked() returns true if
the lock is held for writing;
Here's a patch that adds the missing read_is_locked() and
write_is_locked() macros for IA64. When combined with Ingo's patch, I
can boot an SMP kernel with CONFIG_PREEMPT on.
However, I feel these macros are misnamed: read_is_locked() returns true if
the lock is held for writing;
On Tue, Jan 18, 2005 at 03:28:58PM +1100, Darren Williams wrote:
> On top of Ingo's patch I attempt a solution that failed:
> +#define read_is_locked(x)(*(volatile int *) (x) > 0)
> +#define write_is_locked(x) (*(volatile int *) (x) < 0)
how about something like:
#define
On Tue, 18 Jan 2005, Darren Williams wrote:
> Hi Ingo
>
> On Mon, 17 Jan 2005, Ingo Molnar wrote:
>
> >
> > * Andrew Morton <[EMAIL PROTECTED]> wrote:
> >
> > > > +BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
> > > > +BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked);
> > > >
Hi Ingo
On Mon, 17 Jan 2005, Ingo Molnar wrote:
>
> * Andrew Morton <[EMAIL PROTECTED]> wrote:
>
> > > +BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
> > > +BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked);
> > > +BUILD_LOCK_OPS(write, rwlock_t, spin_is_locked);
> >
> > If you replace the
* Andrew Morton <[EMAIL PROTECTED]> wrote:
> > +BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
> > +BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked);
> > +BUILD_LOCK_OPS(write, rwlock_t, spin_is_locked);
>
> If you replace the last line with
>
> BUILD_LOCK_OPS(write, rwlock_t,
On Mon, Jan 17, 2005 at 06:50:57PM +1100, Paul Mackerras wrote:
> AFAICS on i386 the lock word, although it goes to 0 when write-locked,
> can then go negative temporarily when another cpu tries to get a read
> or write lock. So I think this should be
>
> ((signed int)(x)->lock <= 0)
I think
On Mon, Jan 17, 2005 at 06:50:57PM +1100, Paul Mackerras wrote:
AFAICS on i386 the lock word, although it goes to 0 when write-locked,
can then go negative temporarily when another cpu tries to get a read
or write lock. So I think this should be
((signed int)(x)-lock = 0)
I think you're
* Andrew Morton [EMAIL PROTECTED] wrote:
+BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
+BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked);
+BUILD_LOCK_OPS(write, rwlock_t, spin_is_locked);
If you replace the last line with
BUILD_LOCK_OPS(write, rwlock_t, rwlock_is_locked);
Hi Ingo
On Mon, 17 Jan 2005, Ingo Molnar wrote:
* Andrew Morton [EMAIL PROTECTED] wrote:
+BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
+BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked);
+BUILD_LOCK_OPS(write, rwlock_t, spin_is_locked);
If you replace the last line with
On Tue, 18 Jan 2005, Darren Williams wrote:
Hi Ingo
On Mon, 17 Jan 2005, Ingo Molnar wrote:
* Andrew Morton [EMAIL PROTECTED] wrote:
+BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
+BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked);
+BUILD_LOCK_OPS(write, rwlock_t,
On Tue, Jan 18, 2005 at 03:28:58PM +1100, Darren Williams wrote:
On top of Ingo's patch I attempt a solution that failed:
+#define read_is_locked(x)(*(volatile int *) (x) 0)
+#define write_is_locked(x) (*(volatile int *) (x) 0)
how about something like:
#define read_is_locked(x)
Chris Wedgwood writes:
> +#define rwlock_is_write_locked(x) ((x)->lock == 0)
AFAICS on i386 the lock word, although it goes to 0 when write-locked,
can then go negative temporarily when another cpu tries to get a read
or write lock. So I think this should be
((signed int)(x)->lock <= 0)
(or
On Sun, Jan 16, 2005 at 11:09:22PM -0800, Andrew Morton wrote:
> If you replace the last line with
>
> BUILD_LOCK_OPS(write, rwlock_t, rwlock_is_locked);
>
> does it help?
Paul noticed that too so I came up with the patch below.
If it makes sense I can do the other architectures (I'm not
Chris Wedgwood <[EMAIL PROTECTED]> wrote:
>
> Linus,
>
> The change below is causing major problems for me on a dual K7 with
> CONFIG_PREEMPT enabled (cset -x and rebuilding makes the machine
> usable again).
>
> ...
> +BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
> +BUILD_LOCK_OPS(read,
Linus,
The change below is causing major problems for me on a dual K7 with
CONFIG_PREEMPT enabled (cset -x and rebuilding makes the machine
usable again).
This change was merged a couple of days ago so I'm surprised nobody
else has reported this. I tried to find where this patch came from
but I
Linus,
The change below is causing major problems for me on a dual K7 with
CONFIG_PREEMPT enabled (cset -x and rebuilding makes the machine
usable again).
This change was merged a couple of days ago so I'm surprised nobody
else has reported this. I tried to find where this patch came from
but I
Chris Wedgwood [EMAIL PROTECTED] wrote:
Linus,
The change below is causing major problems for me on a dual K7 with
CONFIG_PREEMPT enabled (cset -x and rebuilding makes the machine
usable again).
...
+BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked);
+BUILD_LOCK_OPS(read, rwlock_t,
On Sun, Jan 16, 2005 at 11:09:22PM -0800, Andrew Morton wrote:
If you replace the last line with
BUILD_LOCK_OPS(write, rwlock_t, rwlock_is_locked);
does it help?
Paul noticed that too so I came up with the patch below.
If it makes sense I can do the other architectures (I'm not sure
Chris Wedgwood writes:
+#define rwlock_is_write_locked(x) ((x)-lock == 0)
AFAICS on i386 the lock word, although it goes to 0 when write-locked,
can then go negative temporarily when another cpu tries to get a read
or write lock. So I think this should be
((signed int)(x)-lock = 0)
(or the
30 matches
Mail list logo