Re: 2.4.0-Prerelease :smp_num_cpus undefined while compiling without smp for Athlon

2001-01-04 Thread Manfred
Look at include/linux/smp.h: on SMP, it includes , on UP it contains a #define smp_num_cpus1 I assume that someone directly includes . Try to add a #ifndef __LINUX_SMP_H #error Found it! #endif to the beginning of -- Manfred - To unsubscribe from this list: send the line

Re: Dell Precision 330 (Pentium 4, i850 chipset, 3c905c)

2001-01-04 Thread Manfred
Pnp aware OS"? For the 2.2 kernel that must be "No", 2.2 might run with "Yes", but I'm not sure if the 850i board is supported. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: agpgart problem on 2.4.0-ac1

2001-01-05 Thread Manfred
> EIP: 0010:[<>] > Call Trace: [] [] [] [] > [] [] [] > [] [] [] > > Code: Bad EIP value. Could you parse your oops through ksymoops? Probably someone called an uninitialized function pointer, or there was a stack overrun. -- Manfred -

[PATCH] up to 50% faster sys_poll()

2001-01-05 Thread Manfred
ticks to 865 cpu ticks (Pentium II/350 SMP, SMP kernel) select() should also be faster, but I haven't written a micro-benchmark for select. Please test it, -- Manfred // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 0 // EXTRAVERSION = --- 2.4/fs/sel

Re: 2.4.0: apache doesn't start

2001-01-06 Thread Manfred
le with powertweak, perhaps a warning should be added to the release notes. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

[patch] single copy pipe rewrite

2001-01-06 Thread Manfred
obuf and the normal buffer) -- Manfred // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 0 // EXTRAVERSION = --- 2.4/fs/pipe.c Thu Nov 16 22:18:26 2000 +++ build-2.4/fs/pipe.c Sat Jan 6 22:43:32 2001 @@ -10,6 +10,8 @@ #include #include #include +#include +#include

Re: [patch] single copy pipe rewrite

2001-01-06 Thread Manfred
"David S. Miller" wrote: > > A couple months ago David posted a revised version of his patch which > fixed both these and some other problems. Most of the fixes were done > by Alexey Kuznetsov. > Do you still have that patch? Stephen Tweedie included the original, unrevied version in his kiob

Re: postgres/shm problem

2001-01-08 Thread manfred
Do you run powertweak? there is a new parameter /proc/sys/kernel/shmall and some powertweak versions set it to 0. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the F

Re: [PATCH] klogd busy loop on zero byte (output from 3c59x driver)

2001-01-11 Thread Manfred
time" reports with ~2.2.10: We (I and Andrea) fixed several bugs in the kernel code, but none of them explained why klogd entered a busy loop. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED]

Re: Compatibility issue with 2.2.19pre7

2001-01-11 Thread Manfred
27;t the only cpu that can't handle unaligned memory reads, why doesn't the code fail on Alpha/Sparc? Does gcc insert padding on these cpus? -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: Compatibility issue with 2.2.19pre7

2001-01-11 Thread Manfred
Zitiere Andi Kleen <[EMAIL PROTECTED]>: > On Thu, Jan 11, 2001 at 07:10:27AM -0500, Manfred wrote: > > Zitiere Russell King <[EMAIL PROTECTED]>: > > > The API changed: > > > struct nfs_mount_data { > > > int version;

[uPATCH] bugfix for slab tuning race

2000-12-10 Thread Manfred
the cpu local array. The patch is against 2.4.0-test11. -- Manfred <<<<<<<<<<<<<< --- 2.4/mm/slab.c Tue Oct 3 20:03:44 2000 +++ build-2.4/mm/slab.c Sat Dec 2 15:00:32 2000 @@ -188,7 +188,7 @@ unsigned intnum;/

Q: netdevice interface change

2000-12-23 Thread Manfred
nterface and add these lines to their source file: #ifndef HAVE_PUBLISH_NETDEV #define prepare_etherdev init_etherdev #define publish_netdev(dev) do {} while (0) #define withdraw_netdev unregister_netdev #endif >>>>>> -- Manfred - To unsubscribe from

minor bugs around fork_init

2000-12-23 Thread Manfred
t get the same pid! >>> * the spinlock within get_pid is bogus: get_pid isn't SMP safe. I've attached a patch (tested with 2.4.0-test12). -- Manfred // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 0 // EXTRAVERSION = -test12 --- 2.4/kernel/

Q: natsemi.c spinlocks

2000-12-23 Thread Manfred
r reentered. Donald often uses dev->interrupt to hide other races, but I don't see anything in this driver (tx_timeout and netdev_timer are both trivial) -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL

Re: Q: natsemi.c spinlocks

2000-12-24 Thread Manfred
Andrew Morton wrote: > > start_tx() > { Yes, I overlooked start_tx. Hmm. start_tx also assumes that the cpu commits writes in order, I'm sure the driver is unreliable on RISC cpus. Perhaps the driver should use pci_alloc_consistent and pci_map_single? -- Manfred - To unsubsc

[PATCH] winbond-840 updates, tester needed!

2000-12-25 Thread Manfred
achines. * the driver doesn't use the "Descriptor Big Endian" (bit 20 of register 0) mode, instead it uses cpu_to_le32. -- Manfred --- 2.4/drivers/net/winbond-840.c Sun Dec 17 18:03:56 2000 +++ build-2.4/drivers/net/winbond-840.c Mon Dec 25 12:49:36 2000 @@ -21,11 +21,2

Re: Netgear FA311

2000-12-25 Thread Manfred
thernet. */ np->tx_config = (1<<28) + /* Automatic transmit padding */ (1<<23) + /* Excessive collision retry */ (6<<20) + /* Max DMA burst = 128 byte */ (8<<8) +/* fill threshold = 256 byte */ 8

Re: [PATCH] winbond-840 updates, tester needed!

2000-12-25 Thread Manfred
Manfred wrote: > > I need a tester with a winbond card on a computer with a big endian cpu, > any volunteers? > Attached is a patch with further cleanups: * removed next_desc from tx descriptors - according to the documentation, it isn't needed. * limit each transmit buffer to

Re: minor bugs around fork_init

2000-12-26 Thread Manfred
adlock by using all pid values (one thread can block 3 pid values). get_pid() will loop forever. * in theory, 2 threads could get the same pid. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

[PATCH] winbond-840.c update

2000-12-26 Thread Manfred
some positive reports. -- Manfred --- 2.4/drivers/net/winbond-840.c Sun Dec 17 18:03:56 2000 +++ build-2.4/drivers/net/winbond-840.c Tue Dec 26 17:17:21 2000 @@ -21,11 +21,25 @@ Do not change the version information unless an improvement has been made. Merely removing my

Re: NETDEV WATCHDOG: eth0: transmit timed out

2000-12-28 Thread Manfred
included soon. If tulip-diag says "10mbps-serial", then you have run into that bug. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

[PATCH] winbond driver bugfixes

2000-12-30 Thread Manfred
I found another nasty bug in the winbond driver: The driver contains a work around for a hardware problem, and that work around is not interrupt safe. It's easy to trigger it on SMP, and there is a 4 instruction window on UP. The result is silent data corruption. -- Manfred P.S.

oops with 2.4.0-test13-pre7 in acpi_ns_get_next_object

2000-12-30 Thread Manfred
are not both of type number Now I get the attached oops. I've tracked it back into acpi_ns_get_next_object: that function is called with both child_node and parent_node == NULL, and then the line if (parent_node->child) oopses. If you need further infos, please ask. -- Ma

Re: kernel freeze on 2.4.0.prerelease (smp,raid5)

2001-01-02 Thread Manfred
owPc") Then write down the EIP values (including the [< >] brackets) and translate them with ksymoops. See Documentation/sysrq.txt and oops-tracing.txt. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message t

Re: [OOPS] in __switch_to with 2.4.0-prerelease

2001-01-03 Thread Manfred
ed later. Could you run $objdump --disassemble-all --reloc \ linux/arch/i386/kernel/process.o > dis.txt and send us the disassembly of __switch_to? And please attach the second oops as well. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-k

Re: Further ACPI woes with 2.4.0-prerelease

2001-01-03 Thread Manfred
> ACPI: System description tables not found I would check the Tyan pages for bios upgrades. I had to upgrade my bios (gigabyte bxd dual cpu board) before w2k accepted the acpi tables. Linux still refuses to accept the acpi tables :-( -- Manfred - To unsubscribe from this list: send

Re: set_current_state() vs current->state

2000-10-02 Thread Manfred
break; schedule(); -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: Interrupt sharing problem (kernel freeze)

2000-10-05 Thread Manfred
si _If_ 2.2.16-3 uses the same instruction, then c885b9bc might point into the buggy driver. -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: TODO: drivers/pcmcia/ds.c: ds_read

2000-10-12 Thread manfred
ng like wait_event_irq() [from include/linux/raid/md_k.h] -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

[PATCH] getting rid of tqueue_lock

2001-01-29 Thread Manfred
sgi's lockstat) * 1 users/min during 'find / -xdev -uid 4711' (1.2% of all spinlock calls) * 6 users/min during 'dd if=/dev/hda of=/dev/null' (~1.1% of all spinlock calls). -- Manfred // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVE

mpparse.c question

2001-02-02 Thread Manfred
seem to be the only users of irq_2_pin. Btw, is is correct that the isa irq's are always connected to the first io apic? find_isa_irq_pin() doesn't handle that, and the caller just access io apic 0. -- Manfred - To unsubscribe from this list: send the line "unsubscribe l

[test patch] reliable apic lockup with one enable/disable_irq()

2001-02-03 Thread Manfred
> irq line stuck. Could someone test the patch with newer boards (i840, via apollo pro, perhaps i815 if the bios builds the MP table) I also tried changing the trigger mode bit in {,un}mask_level_IO_APIC_irq(), but that doesn't prevent the hang. The patch is against 2.4.1 -- M

Re: d-link dfe-530 tx (bug-report)

2001-02-04 Thread Manfred
Urban Widmark wrote: > > On Sun, 4 Feb 2001, Manfred Spraul wrote: > > > > Oh, that's known already. They haven't released any info on the older > > > "VT3043" chip either, afaik. And the vt86c100a.pdf document is just a > > > preliminary

Re: kernel memory allocations alignment

2001-02-04 Thread Manfred
8 bytes aligned ? > Yes, kmalloc results are always 'sizeof(void*)' aligned. Do you have stricter alignment requirements? -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v4 9/9] test: IPC message queue migration test

2012-09-11 Thread Manfred Spraul
Hi Stanislav, sorry for the slow reply, I finally got the time to perform tests with your patches. On 08/13/2012 02:32 PM, Stanislav Kinsbursky wrote: This test is a part of CRIU development test suit. --- tools/testing/selftests/ipc/msgque.c | 151 ++ 1 f

Re: [PATCH v4 8/9] IPC: message queue copy feature introduced

2012-09-11 Thread Manfred Spraul
to copy desired message (instead of unlinking it from the queue). Notes: 1) Return -ENOSYS if MSG_COPY is specified, but CONFIG_CHECKPOINT_RESTORE is not set. How is CONFIG_CHECKPOINT_RESTORE set? I'm not sure, but I think it should be added to Kconfig. -- Manfred -- To unsubscribe from

Re: [PATCH 11/18] Hibernate: introduced RSA key-pair to verify signature of snapshot

2013-08-27 Thread Manfred Hollstein
than burning a few cycles? If the whole function call can be disabled (ignored) in a certain configuration, it shouldn't call at all, should it? Cheers. l8er manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback

2013-08-29 Thread Manfred Schlaegl
On 2013-08-27 02:51, Bryan Wu wrote: > On Tue, Aug 13, 2013 at 4:17 AM, Manfred Schlaegl > wrote: >> fb_notifier_callback is called on any event fired by fb_notifier_call_chain. >> Events may, or may not contain some data (fb_event.data). >> In case of FB_EVENT_BLANK

[PATCH v2] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-10-03 Thread Manfred Spraul
eted, thus no additional test is required. Davidlohr: What do you think? Signed-off-by: Manfred Spraul --- ipc/sem.c | 42 +- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index 8c4f59b..db9d241 100644 --- a/ipc/se

[PATCH 1/2] ipc/sem.c: Race in sem_lock()

2013-09-14 Thread Manfred Spraul
goto again; } <<< sem_perm.lock already dropped, thus no "goto again;" locknum = sops->sem_num; Signed-off-by: Manfred Spraul Cc: Mike Galbraith Cc: Rik van Riel Cc: Davidlohr Bueso Cc: Andrew Morton --- ipc/sem.c |

[PATCH 2/2] ipc/sem.c: optimize sem_lock().

2013-09-14 Thread Manfred Spraul
n't know if it should go into linux-next first. Signed-off-by: Manfred Spraul Cc: Mike Galbraith Cc: Rik van Riel Cc: Davidlohr Bueso Cc: Andrew Morton --- ipc/sem.c | 8 1 file changed, 8 insertions(+) diff --git a/ipc/sem.c b/ipc/sem.c index 4836ea7..5274ed1 100644 --- a/i

Re: [PATCH 1/2] ipc/sem.c: Race in sem_lock()

2013-09-15 Thread Manfred Spraul
Hi all, On 09/15/2013 08:09 AM, Mike Galbraith wrote: On Sat, 2013-09-14 at 23:34 +0200, Manfred Spraul wrote: The bug is probably also present in 3.10 and 3.11, but for these kernels is is probably simpler just to move the test of sma->complex_count after the spin_is_locked() test. I

Re: [PATCH 1/4] ipc,shm: fix race with selinux

2013-09-16 Thread Manfred Spraul
, make sure we hold the kern_ipc_perm.lock while performing these security checks. Actually: either kern_ipc_perm or down_xx(&shm_ids(ns).rwsem) is sufficient. Reported-by: Manfred Spraul Signed-off-by: Davidlohr Bueso --- ipc/shm.c | 23 ++- 1 file changed, 14 insert

Re: soft lockup in sysvipc code.

2013-09-07 Thread Manfred Spraul
e a stress test that does #while true;cat /proc/sysvipc/*>/dev/null;done in parallel with create/remove/whatever operations. Davidlohr: Have you done any stress tests for the /proc interface? -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH] ipc,msg: shorten critical region in msgsnd

2013-09-12 Thread Manfred Spraul
Is this analysis correct? And: What about the other users of obtain_object_check? exit_sem() is also quite long, but I didn't spot any obvious problems. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to major

Re: [PATCH] ipc,msg: shorten critical region in msgsnd

2013-09-12 Thread Manfred Spraul
Hi all, On 09/12/2013 02:20 PM, Manfred Spraul wrote: And: What about the other users of obtain_object_check? exit_sem() is also quite long, but I didn't spot any obvious problems. a) I think semtimed(), msgsnd() and msgrcv() must be fixed: They either leak memory or tasks can sleep fo

Re: ipc-msg broken again on 3.11-rc7?

2013-09-02 Thread Manfred Spraul
atomic_add(msgsz, &ns->msg_bytes); The access to msq->q_cbytes is not protected. Thus two parallel msgsnd() calls could succeed, even if both together brings the queue length above the limit. But it can't explain why 3.11-rc7 hangs: As explained above, msgctl08

Re: ipc-msg broken again on 3.11-rc7?

2013-09-03 Thread Manfred Spraul
Is this a case of lost wakeup or some such. I'm running with some more diagnostics and will report soon ... What is the output of ipcs -q? Is the queue full or empty when it hangs? I.e. do we forget to wake up a receiver or forget to wake up a sender? -- Manfred -- To unsubscribe from th

Re: ipc-msg broken again on 3.11-rc7?

2013-09-03 Thread Manfred Spraul
On 09/03/2013 11:16 AM, Vineet Gupta wrote: On 09/03/2013 02:27 PM, Manfred Spraul wrote: On 09/03/2013 10:44 AM, Vineet Gupta wrote: b) Could you check that it is not just a performance regression? Does ./msgctl08 1000 16 hang, too? Nope that doesn't hang. The minimal configur

Re: ipc-msg broken again on 3.11-rc7?

2013-09-03 Thread Manfred Spraul
Hi Vineet, On 09/03/2013 11:51 AM, Vineet Gupta wrote: On 09/03/2013 02:53 PM, Manfred Spraul wrote: The access to msq->q_cbytes is not protected. Vineet, could you try to move the test for free space after ipc_lock? I.e. the lock must not get dropped between testing for free space

[PATCH] ipc/msg.c: Fix lost wakeup in msgsnd().

2013-09-03 Thread Manfred Spraul
permissions. If security_msg_queue_msgsnd() is called without locks, then there might be races. - it makes the patch much simpler. Reported-by: Vineet Gupta Signed-off-by: Manfred Spraul --- ipc/msg.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ipc/msg.c b/ipc

Re: [PATCH] ipc/msg.c: Fix lost wakeup in msgsnd().

2013-09-03 Thread Manfred Spraul
Hi Sedat, On 09/03/2013 06:13 PM, Sedat Dilek wrote: On Tue, Sep 3, 2013 at 4:00 PM, Manfred Spraul wrote: The check if the queue is full and adding current to the wait queue of pending msgsnd() operations (ss_add()) must be atomic. Otherwise: - the thread that performs msgsnd() finds a full

[PATCH 2/2] Update sem_otime for all operations

2013-09-25 Thread Manfred Spraul
() and semtimedop()) -- Manfred In commit 0a2b9d4c,the update of semaphore's sem_otime(last semop time) was moved to one central position (do_smart_update). But: Since do_smart_update() is only called for operations that modify the array, this means that wait-for-zero semops do not u

Re: [PATCH 2/4] ipc,shm: prevent race with rmid in shmat(2)

2013-09-26 Thread Manfred Spraul
your patch change that? Unfortunately, I have neither any experience with ipc/shm nor any test cases. And: As far as I can see it's not a problem if we are attaching to a deleted segment: shm_close cleans up everything. -- Manfred -- To unsubscribe from this list: send the line "u

Re: [PATCH 4/4] ipc,msg: prevent race with rmid in msgsnd,msgrcv

2013-09-26 Thread Manfred Spraul
preempted before acquiring the kern_ipc_perm.lock. Manfred illustrates this nicely: Assume a preemptible kernel that is preempted just after msq = msq_obtain_object_check(ns, msqid) in do_msgrcv(). The only lock that is held is rcu_read_lock(). Now the other thread processes IPC_RMID. When the first

[PATCH] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-09-30 Thread Manfred Spraul
the review much harder. Davidlohr: Could you please review the patch? I did some stress test, but probably I didn't hit exactly the modified lines. Signed-off-by: Manfred Spraul --- ipc/sem.c | 43 ++- 1 file changed, 30 insertions(+), 13 deletions(-)

Re: [PATCH] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-09-30 Thread Manfred Spraul
Hi Davidlohr, On 09/30/2013 07:54 PM, Davidlohr Bueso wrote: Hi Manfred, On Mon, 2013-09-30 at 11:13 +0200, Manfred Spraul wrote: After acquiring the semlock spinlock, the operations must test that the array is still valid. - semctl() and exit_sem() would walk stale linked lists (ugly, but

Re: [PATCH] ipc/sem.c: fix update sem_otime when calling sem_op in semaphore initialization

2013-09-22 Thread Manfred Spraul
. That's not mentioned in the sysv standard. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 0/4] ipc: shm and msg fixes

2013-09-24 Thread Manfred Spraul
Hi Linus, On 09/24/2013 03:22 AM, Linus Torvalds wrote: On Mon, Sep 23, 2013 at 5:04 PM, Davidlohr Bueso wrote: Ok, so here's the code - again I've tested it with LTP on the resources I have. This looks good to me. Manfred, mind giving this a look-over and see if this resolves

Re: [PATCH 0/4] ipc: shm and msg fixes

2013-09-24 Thread Manfred Spraul
sg_queue,shm]_free_security(), we can race if the structure is freed before other tasks are done with it, creating a use-after-free condition. Manfred illustrates this nicely, for instance with shared mem and selinux: --> do_shmat calls rcu_read_lock() --> do_shmat calls shm_object_check()

Re: [PATCH] ipc/sem.c: fix update sem_otime when calling sem_op in semaphore initialization

2013-09-24 Thread Manfred Spraul
On 09/22/2013 05:14 PM, Jia He wrote: Hi Manfred On Sun, 22 Sep 2013 12:42:05 +0200 from manf...@colorfullife.com wrote: Hi all, On 09/22/2013 10:26 AM, Mike Galbraith wrote: On Sun, 2013-09-22 at 10:17 +0200, Mike Galbraith wrote: On Sun, 2013-09-22 at 10:11 +0800, Jia He wrote: In

Re: [PATCH] ipc/sem.c: fix update sem_otime when calling sem_op in semaphore initialization

2013-09-24 Thread Manfred Spraul
Hi Jia, On 09/25/2013 05:05 AM, Jia He wrote: Hi Manfred IIUC after reivewing your patch and src code, does it seem sem_otime lost the chance to be updated when calling semctl_main/semctl_setval? In old codes, even whendo_smart_update(sma, NULL, 0, 0, &tasks), the otime can be updated a

[PATCH] ipc/sem.c: Synchronize the proc interface

2013-09-25 Thread Manfred Spraul
ut it is dangerous and therefore should be fixed. Andrew: - Could you include the patch in -mm and push it towards Linus? - The patch depends on ipc-semc-fix-race-in-sem_lock.patch Signed-off-by: Manfred Spraul --- ipc/sem.c | 8 1 file changed, 8 insertions(+) diff --git a/ipc/sem.c

Re: [PATCH 0/6] ipc/sem.c: performance improvements, FIFO

2013-06-14 Thread Manfred Spraul
Hi all, On 06/10/2013 07:16 PM, Manfred Spraul wrote: Hi Andrew, I have cleaned up/improved my updates to sysv sem. Could you replace my patches in -akpm with this series? - 1: cacheline align output from ipc_rcu_alloc - 2: cacheline align semaphore structures - 3: seperate-wait-for-zero-and

Re: [PATCH 0/6] ipc/sem.c: performance improvements, FIFO

2013-06-14 Thread Manfred Spraul
y around - as long as there is at least one op waiting for sma->sem_perm.lock. With enough cpus, it will stay like this forever. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More major

Re: [PATCH 0/6] ipc/sem.c: performance improvements, FIFO

2013-06-15 Thread Manfred Spraul
" cpu causes a transfer back when setting sem->pid. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] ipc/sem.c: scan complex wait-for-zero after undefined updates

2013-06-15 Thread Manfred Spraul
igned-off-by: Manfred Spraul --- ipc/sem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ipc/sem.c b/ipc/sem.c index f9d1c06..ad9daca 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -785,8 +785,10 @@ static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf

Re: [PATCH 2/4] ipc/sem: seperate wait-for-zero and alter tasks into seperate queues

2013-06-01 Thread Manfred Spraul
Hi Rik, On 05/27/2013 07:57 PM, Rik van Riel wrote: On 05/26/2013 05:08 AM, Manfred Spraul wrote: Introduce seperate queues for operations that do not modify the semaphore values. Advantages: - Simpler logic in check_restart(). - Faster update_queue(): Right now, all wait-for-zero operations

Re: [PATCH 2/4] ipc/sem: seperate wait-for-zero and alter tasks into seperate queues

2013-06-01 Thread Manfred Spraul
Hi all, On 06/01/2013 11:20 AM, Manfred Spraul wrote: - osim [i.e.: with reschedules] is much slower: around 21 us per schedule. Perhaps the scheduler didn't pair the threads optimally: intra-cpu reschedules take around 2 us on my i3, inter-cpu reschedules around 16 us. I mix

sem_otime trashing

2013-06-01 Thread Manfred Spraul
oo significant not to share it immediately. -- Manfred diff --git a/Makefile b/Makefile index 73e20db..42137ab 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 10 SUBLEVEL = 0 -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc3-otime NAME = Unicycling Gorilla # *DOCUMENTATI

[PATCH 5/6] ipc/sem.c: Replace shared sem_otime with per-semaphore value

2013-06-10 Thread Manfred Spraul
required. No performance improvement on a single-socket i3 - only important for larger systems. Signed-off-by: Manfred Spraul --- include/linux/sem.h | 1 - ipc/sem.c | 37 +++-- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/include

[PATCH 6/6] ipc/sem.c: Rename try_atomic_semop() to perform_atomic_semop(), docu update

2013-06-10 Thread Manfred Spraul
Cleanup: Some minor points that I noticed while writing the previous patches 1) The name try_atomic_semop() is misleading: The function performs the operation (if it is possible). 2) Some documentation updates. No real code change, a rename and documentation changes. Signed-off-by: Manfred

[PATCH 4/6] ipc/sem.c: Always use only one queue for alter operations.

2013-06-10 Thread Manfred Spraul
side effect, do_smart_update_queue() becomes much simpler: No more goto logic. Signed-off-by: Manfred Spraul --- ipc/sem.c | 128 ++ 1 file changed, 88 insertions(+), 40 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index e7f3d64..dcf99ef 1006

[PATCH 3/6] ipc/sem: seperate wait-for-zero and alter tasks into seperate queues

2013-06-10 Thread Manfred Spraul
linux <=3.0.9 Signed-off-by: Manfred Spraul --- include/linux/sem.h | 5 +- ipc/sem.c | 209 +--- 2 files changed, 153 insertions(+), 61 deletions(-) diff --git a/include/linux/sem.h b/include/linux/sem.h index 53d4265..55e17f6 100

[PATCH 1/6] ipc/util.c, ipc_rcu_alloc: cacheline align allocation

2013-06-10 Thread Manfred Spraul
algined pointers, the implementation of ipc_rcu_alloc breaks that. Andrew: Could you merge it into -akpm and then forward it towards Linus' tree? Signed-off-by: Manfred Spraul --- ipc/util.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ipc/util.c b/ipc/u

[PATCH 0/6] ipc/sem.c: performance improvements, FIFO

2013-06-10 Thread Manfred Spraul
one will cause an improvement for multi-socket systems, but I don't have a test setup. 6 is just a cleanup/function rename. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More ma

[PATCH 2/6] ipc/sem.c: cacheline align the semaphore structures

2013-06-10 Thread Manfred Spraul
threads are running. Andrew: Could you merge it into -akpm and then forward it towards Linus' tree? Signed-off-by: Manfred Spraul --- ipc/sem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/sem.c b/ipc/sem.c index 70480a3..1afbc57 100644 --- a/ipc/sem.c +++ b

[PATCH] leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback

2013-08-13 Thread Manfred Schlaegl
/backlight.c line 43 I would suggest to return immediately on events other than FB_EVENT_BLANK. Signed-off-by: Manfred Schlaegl --- Background information: I'm currently working on a IMX53(ARM) based hardware and Linux 3.11-rc5 and detected a problem in drivers/leds/trigger/ledtrig-backli

Re: linux-next: manual merge of the akpm tree with the tree

2013-05-06 Thread Manfred Spraul
pc/sem.c: alternatives to preempt_disable()" from the akpm tree. I would propose that 'ipc/sem.c: alternatives to preempt_disable()' is dropped. As explained in the commit: That patch is for CONFIG_PREEMPT_RT, it should go into their tree. -- Manfred -- To unsubscribe from this list: sen

ipc/sem.c: Lockup with complex ops, comments not updated

2013-05-18 Thread Manfred Spraul
ordering of the wakeups: As far as I can see complex ops are now preferred over simple ops. It's not a bug, noone exept linux implements FIFO. But the comment it line 28 should be updated Should I write a patch, do you want to fix it yourself? -- Manfred -- To unsubscribe from this list: sen

[PATCH] ipc/sem.c: fix lockup, restore FIFO behavior

2013-05-25 Thread Manfred Spraul
7;t prefer FIFO semantics). Other changes: - try_atomic_semop() also performs the semop. Thus rename the function. It passes tests with qemu, but not boot-tested due to EFI problems. Signed-off-by: Manfred Spraul --- diff --git a/include/linux/sem.h b/include/linux/sem.h index 53d4265..3f2c6c8 10064

Re: [PATCH 06/10] ipc: Don't allocate a copy larger than max

2013-05-25 Thread Manfred Spraul
rease the buffer size until msgrcv succeeds. - with MSG_COPY, something else would happen. As far as I can see, it would oops: msg_ctlmax bytes are allocated, then the E2BIG test is against bufsz, and copy_msg() doesn't check the size of the target buffer. I.e.: I would propose to rever

Re: [PATCH] ipc/sem.c: fix lockup, restore FIFO behavior

2013-05-25 Thread Manfred Spraul
Hi Rik, On 05/25/2013 03:49 PM, Rik van Riel wrote: On 05/25/2013 04:54 AM, Manfred Spraul wrote: But: Let's wait if this really exists: An application that does rarely complex operations (and that doesn't prefer FIFO semantics). I do not like that downside at all. The danger of

[PATCH v2] ipc/sem.c: fix lockup, restore FIFO behavior

2013-05-25 Thread Manfred Spraul
- Fewer restarts in update_queue(), because pending wait-for-zero do not force a restart anymore. Other changes: - try_atomic_semop() also performs the semop. Thus rename the function. It passes tests with qemu, but not boot-tested due to EFI problems. Signed-off-by: Manfred Spraul --- diff

Re: [PATCH v2] ipc/sem.c: fix lockup, restore FIFO behavior

2013-05-25 Thread Manfred Spraul
all operations are starved. I've attached a test case: ./test5.sh linux-3.0.9 completes all operations With Rik's patch, the wait-for-zero remains running. -- Manfred P.S.: Btw, I found some code that uses a semop with 2 ops: http://publib.boulder.ibm.com/infocenter/iseries/v

Re: [PATCH] ipc,sem: move restart loop to do_smart_update

2013-05-25 Thread Manfred Spraul
s released Without the "sops = NULL", [2] sleeps forever. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 0/4] ipc/sem.c: Bug fixes, regression fixes, v3

2013-05-26 Thread Manfred Spraul
an array remain parallelized. Apps that use lots of wait-for-zero semop are probably even faster, because the wait-for-zero ops are now only scanned if a semval is 0. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majo

[PATCH 1/4] ipc/sem.c: Fix missing wakeups in do_smart_update_queue()

2013-05-26 Thread Manfred Spraul
be scanned - regardless of the reason for calling do_smart_update_queue() The patch is not optimized, i.e. even completing a wait-for-zero operation causes a rescan. This is done to keep the patch as simple as possible. Avoiding unnecessary scans is implemented in the following patches. Signed-off-b

[PATCH 2/4] ipc/sem: seperate wait-for-zero and alter tasks into seperate queues

2013-05-26 Thread Manfred Spraul
linux <=3.0.9 Signed-off-by: Manfred Spraul --- include/linux/sem.h | 5 +- ipc/sem.c | 209 +--- 2 files changed, 153 insertions(+), 61 deletions(-) diff --git a/include/linux/sem.h b/include/linux/sem.h index 53d4265..55e17f6 100

[PATCH 3/4] ipc/sem.c: Always use only one queue for alter operations.

2013-05-26 Thread Manfred Spraul
side effect, do_smart_update_queue() becomes much simpler: No more goto logic. Signed-off-by: Manfred Spraul --- ipc/sem.c | 128 ++ 1 file changed, 88 insertions(+), 40 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index ce25da3..9ed3853 1006

[PATCH 4/4] ipc/sem.c: Rename try_atomic_semop() to perform_atomic_semop(), docu update

2013-05-26 Thread Manfred Spraul
: Manfred Spraul --- ipc/sem.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index 9ed3853..1dbb2fa 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -153,12 +153,15 @@ static int sysvipc_sem_proc_show(struct seq_file *s, void

Re: [PATCH 0/4] ipc/sem.c: Bug fixes, regression fixes, v3

2013-05-27 Thread Manfred Spraul
ks can run in parallel - and the task switch code is never triggered. Could you double check that the number of context switches matches the output? I usually use this tool: http://marc.info/?l=linux-kernel&m=125038376609750 -- Manfred -- To unsubscribe from this list: send the line "un

Re: [PATCH 1/4] ipc/sem.c: Fix missing wakeups in do_smart_update_queue()

2013-05-27 Thread Manfred Spraul
77817 (assuming 2 cpus, otherwise increase "2" and "20" accordingly) Here is the link to the tool: http://marc.info/?l=linux-kernel&m=125038376609750 -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a me

Re: [PATCH] ipc/sem.c: prevent ENOMEM in semop() w/ SEM_UNDO flag

2012-08-03 Thread Manfred Spraul
. > This patch makes semop() be able to use vmalloc() via ipc_alloc(). > > Signed-off-by: Seiichi Ikarashi -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vge

Re: [PATCH] ipc/sem.c: prevent ENOMEM in semop() w/ SEM_UNDO flag

2012-08-07 Thread Manfred Spraul
or all users and b) change user space visible behavior Thus I would prefer to avoid to implement it unless there are real applications that need this implementation. -- Manfred -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to major

Re: [PATCH v3 08/10] IPC: message queue copy feature introduced

2012-08-11 Thread Manfred Spraul
erstand the purpose of the decrease of msq->q_copy_cnt: Do you want to handle normal msgrcv() calls in parallel with msgrcv(|MSG_COPY) calls? I don't think that this will work: What if msq->q_copy_cnt is 1 and and msgrcv() call receives the 20th message in the queue? -- Manfred -

Re: [PATCH v3 08/10] IPC: message queue copy feature introduced

2012-08-12 Thread Manfred Spraul
Hi Stanislav, 2012/8/11 Stanislav Kinsbursky : > 11.08.2012 15:20, Manfred Spraul пишет: >> a) What about the simpler approach: >> - if MSG_COPY is set, then @mtype is interpreted as the number of the >> message that should be copied. >>If there are less than @mtyp

Re: uninteruptable sleep

2001-04-03 Thread Manfred Spraul
ur kernel? Then enable it with #echo 1 > /proc/sys/kernel/sysrq and press ++'t' It prints the complete back trace, not just one function name -- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL P

Re: softirq buggy [Re: Serial port latency]

2001-04-04 Thread Manfred Spraul
server under high load would loop forever within the softirq, never returning to process level. do_softirq cannot loop, the right fix is "check often for pending softirq's". It's checked before a process returns to user space, it's checked when a process schedules. What&#x

  1   2   3   4   5   6   7   8   >