Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Michel Lespinasse
On Sat, Mar 2, 2013 at 2:28 AM, Oleg Nesterov o...@redhat.com wrote: Lai, I didn't read this discussion except the code posted by Michel. I'll try to read this patch carefully later, but I'd like to ask a couple of questions. This version looks more complex than Michel's, why? Just curious, I

[PATCH V2] lglock: add read-preference local-global rwlock

2013-03-02 Thread Lai Jiangshan
From 345a7a75c314ff567be48983e0892bc69c4452e7 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan la...@cn.fujitsu.com Date: Sat, 2 Mar 2013 20:33:14 +0800 Subject: [PATCH] lglock: add read-preference local-global rwlock Current lglock is not read-preference, so it can't be used on some cases which

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Lai Jiangshan
On 02/03/13 02:28, Oleg Nesterov wrote: Lai, I didn't read this discussion except the code posted by Michel. I'll try to read this patch carefully later, but I'd like to ask a couple of questions. This version looks more complex than Michel's, why? Just curious, I am trying to understand

Linux kernel 3.x problems on PowerMac G5

2013-03-02 Thread Phileas Fogg
Hi, recently i got a PowerMac G5 and installed Debian Linux 2.6.32 on it. Everything works so far and Debian boots properly. Today i tried to boot Linux 3 on the machine and it doesn't boot. The Linux 3 kernel was cross-compiled by me. On Linux 3.8.1 it hangs after this line: --- windfarm:

[PATCH] powerpc: remove unused BITOP_LE_SWIZZLE macro

2013-03-02 Thread Akinobu Mita
The BITOP_LE_SWIZZLE macro was used in the little-endian bitops functions for powerpc. But these functions were converted to generic bitops and the BITOP_LE_SWIZZLE is not used anymore. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc:

Re: Linux kernel 3.x problems on PowerMac G5

2013-03-02 Thread Aaro Koskinen
Hi, On Sat, Mar 02, 2013 at 03:40:19PM +0100, Phileas Fogg wrote: Have anyone tested Linux 3 kernels on PowerMac G5 recently ? 3.8 boots normally to shell and is stable on G5 iMac (PowerMac8,1). A. ___ Linuxppc-dev mailing list

Re: Linux kernel 3.x problems on PowerMac G5

2013-03-02 Thread Phileas Fogg
Aaro Koskinen wrote: Hi, On Sat, Mar 02, 2013 at 03:40:19PM +0100, Phileas Fogg wrote: Have anyone tested Linux 3 kernels on PowerMac G5 recently ? 3.8 boots normally to shell and is stable on G5 iMac (PowerMac8,1). A. Thanks. Then i configured something wrongly probably. I tried Linux

Re: Linux kernel 3.x problems on PowerMac G5

2013-03-02 Thread Andreas Schwab
Phileas Fogg phileas-f...@mail.ru writes: Aaro Koskinen wrote: Hi, On Sat, Mar 02, 2013 at 03:40:19PM +0100, Phileas Fogg wrote: Have anyone tested Linux 3 kernels on PowerMac G5 recently ? 3.8 boots normally to shell and is stable on G5 iMac (PowerMac8,1). A. Thanks. Then i

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Oleg Nesterov
On 03/02, Lai Jiangshan wrote: On 02/03/13 02:28, Oleg Nesterov wrote: Lai, I didn't read this discussion except the code posted by Michel. I'll try to read this patch carefully later, but I'd like to ask a couple of questions. This version looks more complex than Michel's, why? Just

Re: [PATCH] lglock: add read-preference local-global rwlock

2013-03-02 Thread Oleg Nesterov
On 03/02, Michel Lespinasse wrote: My version would be slower if it needs to take the slow path in a reentrant way, but I'm not sure it matters either :) I'd say, this doesn't matter at all, simply because this can only happen if we race with the active writer. Oleg.

Re: [PATCH V2] lglock: add read-preference local-global rwlock

2013-03-02 Thread Srivatsa S. Bhat
On 03/02/2013 06:44 PM, Lai Jiangshan wrote: From 345a7a75c314ff567be48983e0892bc69c4452e7 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan la...@cn.fujitsu.com Date: Sat, 2 Mar 2013 20:33:14 +0800 Subject: [PATCH] lglock: add read-preference local-global rwlock Current lglock is not

Re: [PATCH V2] lglock: add read-preference local-global rwlock

2013-03-02 Thread Oleg Nesterov
On 03/02, Lai Jiangshan wrote: +void lg_rwlock_local_read_unlock(struct lgrwlock *lgrw) +{ + switch (__this_cpu_read(*lgrw-reader_refcnt)) { + case 1: + __this_cpu_write(*lgrw-reader_refcnt, 0); + lg_local_unlock(lgrw-lglock); + return; +

Re: Linux kernel 3.x problems on PowerMac G5

2013-03-02 Thread Benjamin Herrenschmidt
On Sat, 2013-03-02 at 15:40 +0100, Phileas Fogg wrote: recently i got a PowerMac G5 and installed Debian Linux 2.6.32 on it. Everything works so far and Debian boots properly. Today i tried to boot Linux 3 on the machine and it doesn't boot. The Linux 3 kernel was cross-compiled by me. On

Re: Linux kernel 3.x problems on PowerMac G5

2013-03-02 Thread Benjamin Herrenschmidt
On Sat, 2013-03-02 at 17:22 +0100, Andreas Schwab wrote: Thanks. Then i configured something wrongly probably. I tried Linux 2.6.39.4 and it boots too. I looked around on the Internet and it seems i'm not the only one who has problems with Linux 3.x on my PowerMac G5. I have no problem