Re: [PATCH 2.6.24-mm1] error compiling net driver NE2000/NE1000

2008-02-18 Thread Pierre Peiffer
7;t know if a fix is going on somewhere or if the bug has fallen in a black hole. (In the original mail, I've proposed a patch as a quick fix, but I don't know if it can be considered as a definitive correction or not) Thanks, P. Andrew Morton wrote: > On Mon, 4 Feb 2008 16:29:

Re: [PATCH 2.6.24-mm1 0/8] (resend) IPC: code rewrite

2008-02-15 Thread Pierre Peiffer
Andi Kleen wrote: > [EMAIL PROTECTED] writes: > >> This is a resend of the first part of the patchset sent 2 weeks >> ago. This is the part about the IPC which (again) proposes to consolidate >> some part of the existing code. >> >> It does not change the behavior of the existing code,

Re: [PATCH 2.6.24-mm1 1/8] (resend) IPC/semaphores: code factorisation

2008-02-13 Thread Pierre PEIFFER
On Feb 13, 2008 9:07 PM, Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > On Tue, Feb 12, 2008 at 05:13:41PM +0100, [EMAIL PROTECTED] wrote: > > Trivial patch which adds some small locking functions and makes use of them > > to factorize some part of the code and to make it cleaner. > > What's wrong wi

[PATCH 2.6.24-mm1 8/8] (resend) IPC: consolidate all xxxctl_down() functions

2008-02-12 Thread pierre . peiffer
these same pieces of code into one common function called ipcctl_pre_down(). It simplifies a little these xxxctl_down() functions and increases a little the maintainability. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> Acked-by: Serge Hallyn <[EMAIL PROTECTED]> --- ipc/m

[PATCH 2.6.24-mm1 7/8] (resend) IPC: introduce ipc_update_perm()

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> The IPC_SET command performs the same permission setting for all IPCs. This patch introduces a common ipc_update_perm() function to update these permissions and makes use of it for all IPCs. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]&

[PATCH 2.6.24-mm1 6/8] (resend) IPC: get rid of the use *_setbuf structure.

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> All IPCs make use of an intermetiate *_setbuf structure to handle the IPC_SET command. This is not really needed and, moreover, it complicates a little bit the code. This patch get rid of the use of it and uses directly the semid64_ds/ msgi

[PATCH 2.6.24-mm1 5/8] (resend) IPC/semaphores: remove one unused parameter from semctl_down()

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> semctl_down() takes one unused parameter: semnum. This patch proposes to get rid of it. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> Acked-by: Serge Hallyn <[EMAIL PROTECTED]> --- ipc/sem.c |6 +++--- 1 file changed, 3 insertio

[PATCH 2.6.24-mm1 3/8] (resend) IPC/message queues: introduce msgctl_down

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Currently, sys_msgctl is not easy to read. This patch tries to improve that by introducing the msgctl_down function to handle all commands requiring the rwmutex to be taken in write mode (ie IPC_SET and IPC_RMID for now). It is the equivalent funct

[PATCH 2.6.24-mm1 4/8] (resend) IPC/semaphores: move the rwmutex handling inside semctl_down

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> semctl_down is called with the rwmutex (the one which protects the list of ipcs) taken in write mode. This patch moves this rwmutex taken in write-mode inside semctl_down. This has the advantages of reducing a little bit the window during whic

[PATCH 2.6.24-mm1 2/8] (resend) IPC/shared memory: introduce shmctl_down

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Currently, the way the different commands are handled in sys_shmctl introduces some duplicated code. This patch introduces the shmctl_down function to handle all the commands requiring the rwmutex to be taken in write mode (ie IPC_SET and IPC_RMID f

[PATCH 2.6.24-mm1 1/8] (resend) IPC/semaphores: code factorisation

2008-02-12 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Trivial patch which adds some small locking functions and makes use of them to factorize some part of the code and to make it cleaner. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> Acked-by: Serge Hallyn <[EMAIL PROTECTED]> ---

[PATCH 2.6.24-mm1 0/8] (resend) IPC: code rewrite

2008-02-12 Thread pierre . peiffer
vmlinux textdata bss dec hex filename 1902917 175820 122880 2201617 219811 obj/vmlinux -- Pierre Peiffer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kerne

[PATCH 2.6.24-mm1] IPC: use ipc_buildid() directly from ipc_addid()

2008-02-08 Thread Pierre Peiffer
Hi, By continuing to consolidate a little the IPC code, each id can be built directly in ipc_addid() instead of having it built from each callers of ipc_addid() And I also remove shm_addid() in order to have, as much as possible, the same code for shm/sem/msg. Signed-off-by: Pierre Peiffer

Re: [PATCH 2.6.24-rc8-mm1 09/15] (RFC) IPC: new kernel API to change an ID

2008-02-08 Thread Pierre Peiffer
es (sigh... just > > Agreed. > >> think of clone() nightmare to add a new argument); > > Yes, and then there will need to be the clone_with_pid() extension on > top of that. > >> second, the change >> is incremental: first code the mechanism to set the f

[PATCH 2.6.24-mm1] error compiling net driver NE2000/NE1000

2008-02-04 Thread Pierre Peiffer
this error with the following patch. As NS8390p_init() does the same thing than NS8390_init(), I suppose that this is the right fix ? Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- drivers/net/ne.c |6 +++--- 1 file changed, 3 insertions(+), 3 del

Re: [PATCH 2.6.24-rc8-mm1 00/15] IPC: code rewrite + new functionalities

2008-02-04 Thread Pierre Peiffer
Pavel Machek wrote: > Hi! > >> * Patches 9 to 15 propose to add some functionalities, and thus are >> submitted here for RFC, about both the interest and their implementation. >> These functionalities are: >> - Two new control-commands: >> . IPC_SETID: to change an IPC's id. >> . I

Re: [PATCH 2.6.24-rc8-mm1 14/15] (RFC) IPC/semaphores: prepare semundo code to work on another task than current

2008-02-01 Thread Pierre Peiffer
Serge E. Hallyn wrote: > Quoting Pierre Peiffer ([EMAIL PROTECTED]): >> >> Serge E. Hallyn wrote: >>> Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): >>>> From: Pierre Peiffer <[EMAIL PROTECTED]> >>>> >>>> In order to modif

Re: [PATCH 2.6.24-rc8-mm1 09/15] (RFC) IPC: new kernel API to change an ID

2008-01-31 Thread Pierre Peiffer
of concern as well. Honestly, I don't think this really a concern at all. I mean: I've never seen "this allows non-GPL binary and thus, this is bad" as an argument to reject a functionality, but I may be wrong, and thus, it can be discussed as well. I think th

Re: [PATCH 2.6.24-rc8-mm1 05/15] IPC/semaphores: remove one unused parameter from semctl_down()

2008-01-31 Thread Pierre Peiffer
Nadia Derbey wrote: > [EMAIL PROTECTED] wrote: >> From: Pierre Peiffer <[EMAIL PROTECTED]> >> >> semctl_down() takes one unused parameter: semnum. >> This patch proposes to get rid of it. >> >> Signed-off-by: Pierre Peiffer <[EMAIL PROTECT

Re: [PATCH 2.6.24-rc8-mm1 12/15] (RFC) IPC/semaphores: make use of RCU to free the sem_undo_list

2008-01-31 Thread Pierre Peiffer
Serge E. Hallyn wrote: > Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): >> From: Pierre Peiffer <[EMAIL PROTECTED]> >> >> Today, the sem_undo_list is freed when the last task using it exits. >> There is no mechanism in place, that allows a safe concurrent ac

Re: [PATCH 2.6.24-rc8-mm1 14/15] (RFC) IPC/semaphores: prepare semundo code to work on another task than current

2008-01-31 Thread Pierre Peiffer
Serge E. Hallyn wrote: > Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): >> From: Pierre Peiffer <[EMAIL PROTECTED]> >> >> In order to modify the semundo-list of a task from procfs, we must be able to >> work on any target task. >> But all the exis

Re: [PATCH 2.6.24-rc8-mm1 09/15] (RFC) IPC: new kernel API to change an ID

2008-01-31 Thread Pierre Peiffer
Hi again, Thinking more about this, I think I must clarify why I choose this way. In fact, the idea of these patches is to provide the missing user APIs (or extend the existing ones) that allow to set or update _all_ properties of all IPCs, as needed in the case of the checkpoint/restart o

Re: [PATCH 2.6.24-rc8-mm1 09/15] (RFC) IPC: new kernel API to change an ID

2008-01-30 Thread Pierre Peiffer
necessarily a problem, as we will probably restart an application in an empty "container"/"namespace"; Thus we can create all needed IPCs in an empty IPC namespace like this: 1. create first IPC 2. change its ID 3. create the second IPC 4. change its ID 5. etc.. But yes,

[PATCH 2.6.24-rc8-mm1 15/15] (RFC) IPC/semaphores: add write() operation to semundo file in procfs

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch adds the write operation to the semundo file. This write operation allows root to add or update the semundo list and their values for a given process. The user must provide some lines, each containing the semaphores ID followed

[PATCH 2.6.24-rc8-mm1 14/15] (RFC) IPC/semaphores: prepare semundo code to work on another task than current

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> In order to modify the semundo-list of a task from procfs, we must be able to work on any target task. But all the existing code playing with the semundo-list, currently works only on the 'current' task, and does not allow to specify any ta

[PATCH 2.6.24-rc8-mm1 13/15] (RFC) IPC/semaphores: per semundo file in procfs

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch adds a new procfs interface to display the per-process semundo data. A new per-PID file is added, named "semundo". It contains one line per semaphore IPC where there is something to undo for this process. Then, each line co

[PATCH 2.6.24-rc8-mm1 12/15] (RFC) IPC/semaphores: make use of RCU to free the sem_undo_list

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Today, the sem_undo_list is freed when the last task using it exits. There is no mechanism in place, that allows a safe concurrent access to the sem_undo_list of a target task and protects efficiently against a task-exit. That is okay for now as we

[PATCH 2.6.24-rc8-mm1 11/15] (RFC) IPC: new IPC_SETALL command to modify all settings

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch adds a new IPC_SETALL command to the System V IPCs set of commands, which allows to change all the settings of an IPC It works exactly the same way as the IPC_SET command, except that it additionally changes all the times and the pids

[PATCH 2.6.24-rc8-mm1 10/15] (RFC) IPC: new IPC_SETID command to modify an ID

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch adds a new IPC_SETID command to the System V IPCs set of commands, which allows to change the ID of an existing IPC. This command can be used through the semctl/shmctl/msgctl API, with the new ID passed as the third argument for msgc

[PATCH 2.6.24-rc8-mm1 09/15] (RFC) IPC: new kernel API to change an ID

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch provides three new API to change the ID of an existing System V IPCs. These APIs are: long msg_chid(struct ipc_namespace *ns, int id, int newid); long sem_chid(struct ipc_namespace *ns, int id, int newid); long sh

[PATCH 2.6.24-rc8-mm1 08/15] IPC: consolidate all xxxctl_down() functions

2008-01-29 Thread pierre . peiffer
these same pieces of code into one common function called ipcctl_pre_down(). It simplifies a little these xxxctl_down() functions and increases a little the maintainability. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> Acked-by: Serge Hallyn <[EMAIL PROTECTED]> --- ipc/m

[PATCH 2.6.24-rc8-mm1 07/15] IPC: introduce ipc_update_perm()

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> The IPC_SET command performs the same permission setting for all IPCs. This patch introduces a common ipc_update_perm() function to update these permissions and makes use of it for all IPCs. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]&

[PATCH 2.6.24-rc8-mm1 06/15] IPC: get rid of the use *_setbuf structure.

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> All IPCs make use of an intermetiate *_setbuf structure to handle the IPC_SET command. This is not really needed and, moreover, it complicate a little bit the code. This patch get rid of the use of it and uses directly the semid64_ds/ msgi

[PATCH 2.6.24-rc8-mm1 04/15] IPC/semaphores: move the rwmutex handling inside semctl_down

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> semctl_down is called with the rwmutex (the one which protects the list of ipcs) taken in write mode. This patch moves this rwmutex taken in write-mode inside semctl_down. This has the advantages of reducing a little bit the window during whic

[PATCH 2.6.24-rc8-mm1 05/15] IPC/semaphores: remove one unused parameter from semctl_down()

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> semctl_down() takes one unused parameter: semnum. This patch proposes to get rid of it. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> Acked-by: Serge Hallyn <[EMAIL PROTECTED]> --- ipc/sem.c |6 +++--- 1 file changed, 3 insertio

[PATCH 2.6.24-rc8-mm1 03/15] IPC/message queues: introduce msgctl_down

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Currently, sys_msgctl is not easy to read. This patch tries to improve that by introducing the msgctl_down function to handle all commands requiring the rwmutex to be taken in write mode (ie IPC_SET and IPC_RMID for now). It is the equivalent funct

[PATCH 2.6.24-rc8-mm1 02/15] IPC/shared memory: introduce shmctl_down

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Currently, the way the different commands are handled in sys_shmctl introduces some duplicated code. This patch introduces the shmctl_down function to handle all the commands requiring the rwmutex to be taken in write mode (ie IPC_SET and IPC_RMID f

[PATCH 2.6.24-rc8-mm1 01/15] IPC/semaphores: code factorisation

2008-01-29 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Trivial patch which adds some small locking functions and makes use of them to factorize some part of code and makes it cleaner. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> Acked-by: Serge Hallyn <[EMAIL PROTECTED]> ---

[PATCH 2.6.24-rc8-mm1 00/15] IPC: code rewrite + new functionalities

2008-01-29 Thread pierre . peiffer
Hi, Here is a patchset about the IPC, which proposes to consolidate some part of the existing code and to add some functionalities. * Patches 1 to 8 don't change the existing behavior, but propose to rewrite some parts of the existing code. In fact, the three kinds of IPC (semaphores, mes

Re: [-mm] new warning in ipc/msg.c

2008-01-10 Thread Pierre Peiffer
Andrew Morton wrote: > Doing this in a piecemeal through-a-pinhole fashion won't work very well > and is a bit risky. Yes, agree, that's also my feeling. -- Pierre Peiffer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a m

[-mm] new warning in ipc/msg.c

2008-01-09 Thread Pierre Peiffer
the actual message follows immediately */ }; is acceptable ? Otherwise, either a cast can be added or this patch can be dropped... Thanks, -- Pierre Peiffer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More maj

Re: 2.6.24-rc5-mm1

2007-12-13 Thread Pierre Peiffer
-fix-comment-for-nonexistent-variable.patch > +ext-use-ext_get_group_desc.patch > +ext-remove-unused-argument-for-ext_find_goal.patch > +ext-cleanup-ext_bg_num_gdb.patch > > ext2/3/4 cleanups > > +per-zone-and-reclaim-enhancements-for-memory-controller-take-3-modifies-vmsca

[PATCH] Remove one useless extern declaration

2007-11-29 Thread Pierre Peiffer
The file exit.c contains one useless extern declaration of sem_exit(). Moreover, it refers to nothing. This trivial patch removes it. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- kernel/exit.c |2 -- 1 file changed, 2 deletions(-) Index: b/kernel/

[PATCH 2.6.24-rc3-mm1 2/3] IPC/semaphores: consolidate SEM_STAT and IPC_STAT commands

2007-11-27 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> These both commands (SEM_STAT and IPC_STAT) are rather doing the same things (only the meaning of the id given as input and the return value differ). However, for the semaphores, they are handled in two different places (two different functions).

[PATCH 2.6.24-rc3-mm1 3/3] IPC: consolidate sem_exit_ns(), msg_exit_ns and shm_exit_ns()

2007-11-27 Thread pierre . peiffer
introducing a common function, free_ipcs(), that do the job. The specific routine to call on each individual ipcs is passed as parameter. For this, these ipc-specific 'free' routines are reworked to take a generic 'struct ipc_perm' as parameter. Signed-off-by: Pierre Peiff

[PATCH 2.6.24-rc3-mm1 0/3] [resend] IPC: some code consolidation

2007-11-27 Thread pierre . peiffer
Andrew, Following this discussion http://lkml.org/lkml/2007/11/27/54, I resend the three patches that I've sent last friday to let you have all of them in the right order. Thanks, -- Pierre Peiffer - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

[PATCH 2.6.24-rc3-mm1 1/3] IPC: make struct ipc_ids static in ipc_namespace

2007-11-27 Thread pierre . peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Each ipc_namespace contains a table of 3 pointers to struct ipc_ids (3 for msg, sem and shm, structure used to store each ipcs) These pointers are dynamically allocated for each icp_namespace as the ipc_namespace itself (for the init namespace, th

Re: [PATCH 2.6.24-rc3-mm1] IPC: consolidate sem_exit_ns(), msg_exit_ns and shm_exit_ns()

2007-11-27 Thread Pierre Peiffer
Andrew Morton wrote: > On Mon, 26 Nov 2007 22:44:38 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote: > >> On Fri, 23 Nov 2007 17:52:50 +0100 Pierre Peiffer <[EMAIL PROTECTED]> wrote: >> >>> sem_exit_ns(), msg_exit_ns() and shm_exit_ns() are all called when a

[PATCH 2.6.24-rc3-mm1] IPC: consolidate sem_exit_ns(), msg_exit_ns and shm_exit_ns()

2007-11-23 Thread Pierre Peiffer
introducing a common function, free_ipcs(), that do the job. The specific routine to call on each individual ipcs is passed as parameter. For this, these ipc-specific 'free' routines are reworked to take a generic 'struct ipc_perm' as parameter. Signed-off-by: Pierre Peiff

[PATCH 2.6.24-rc3-mm1] IPC/semaphores: consolidate SEM_STAT and IPC_STAT commands

2007-11-23 Thread Pierre Peiffer
handling these both commands in the same place in semctl_nolock(). It also removes one unused parameter for this function. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- ipc/sem.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) In

Re: [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-23 Thread Pierre Peiffer
Pavel Emelyanov wrote: > Well I think you're right. The structure gains 50% in size... Really too > much to fight for performance in IPC :) > > Thanks for checking this thing. > > You may put my Acked-by in the original patch. > Cool. Thanks ! P. > Thanks, > P

Re: [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-23 Thread Pierre Peiffer
wrote: > Pierre Peiffer wrote: >> Hi, >> >> Thanks for reviewing this ! >> >> Pavel Emelyanov wrote: >>> Pavel Emelyanov wrote: >>>> Cedric Le Goater wrote: >>>>> Pierre Peiffer wrote: >>> [snip] >>> >>

Re: [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-23 Thread Pierre Peiffer
Hi, Thanks for reviewing this ! Pavel Emelyanov wrote: > Pavel Emelyanov wrote: >> Cedric Le Goater wrote: >>> Pierre Peiffer wrote: > > [snip] > >>> Pavel, what do you think of it ? >> Looks sane, good catch, Pierre. >> >> But

[PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-22 Thread Pierre Peiffer
e ipc_ids separately. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- include/linux/ipc_namespace.h | 13 +++-- ipc/msg.c | 26 -- ipc/namespace.c | 25 - ipc/sem.c

Re: [PATCH 2.6.23-mm1] Change the ida/idr_pre_get() return value to follow the kernel convention

2007-10-31 Thread Pierre Peiffer
Andrew Morton wrote: > On Tue, 30 Oct 2007 17:13:50 +0100 > Pierre Peiffer <[EMAIL PROTECTED]> wrote: > >> ida_pre_get() and idr_pre_get() currently return 0 in case of error, and 1 >> in case of success, what is not the conventional way to handle error cases. >>

[PATCH 2.6.23-mm1] Change the ida/idr_pre_get() return value to follow the kernel convention

2007-10-30 Thread Pierre Peiffer
reported instead of ENOMEM. This avoids to the callers to make any assumption about the cause of the error. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- arch/powerpc/mm/mmu_context_64.c |5 +++-- block/bsg.c|4 +--- drivers/ch

[RFC][PATCH] IPC: fix error check in all new xxx_lock() and xxx_exit_ns() functions

2007-10-23 Thread Pierre Peiffer
eck will be done several times (in all sub-callers...), what is not very funny/optimal... That's why I send this as RFC. Comments or other proposals are welcome, but there are some corrections to do anyway. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- ipc/msg.c |

[RFC][PATCH -mm] IPC: fix error checking in all new xxx_lock() functions

2007-10-11 Thread Pierre Peiffer
d solution is simple and correct. But it has the drawback of adding one more check ('if' statement) in the chain: we do a first check in ipc_lock(), now in xxx_lock() and then one later in the caller of xxx_lock() That's why I send this as RFC, may be another approach could be conside

[PATCH] IPC: fix error case when idr-cache is empty in ipcget()

2007-10-11 Thread Pierre Peiffer
d. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- ipc/msg.c |4 ++-- ipc/sem.c |4 ++-- ipc/shm.c |5 +++-- ipc/util.c | 16 +++- 4 files changed, 18 insertions(+), 11 deletions(-) In

[PATCH] IPC: fix error case when idr-cache is empty in ipcget()

2007-10-10 Thread Pierre Peiffer
in 2.6.24 if Nadia's patches are included. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- ipc/msg.c |4 ++-- ipc/sem.c |4 ++-- ipc/shm.c |5 +++-- ipc/util.c | 35 +-- 4 files changed, 28 insertions(+), 20 deletions(-) Index:

[PATCH] IPC: cleanup some code and wrong comments about semundo list managment

2007-10-05 Thread Pierre Peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> Some comments about sem_undo_list seem wrong. About the comment above unlock_semundo: "... If task2 now exits before task1 releases the lock (by calling unlock_semundo()), then task1 will never call spin_unlock(). ..." This is just wrong,

Re: [RFC][PATCH 0/2] New API to change the IDs of an existing IPC

2007-10-01 Thread Pierre Peiffer
it. These patches give you the possibility of changing this ID once the IPC is created. -- Pierre Peiffer - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[RFC][PATCH 2/2] System V IPC: new IPC_SETID command to modify an ID

2007-09-28 Thread Pierre Peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch adds a new IPC_SETID command to the System V IPCs set of commands, which allows to change the ID of an existing IPC. This command can be used through the semctl/shmctl/msgctl API, with the new ID passed as the third argument for msgc

[RFC][PATCH 1/2] System V IPC: new kernel API to change an ID

2007-09-28 Thread Pierre Peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This patch provides three new API for changing the ID of an existing System V IPCs. These APIs are: long msg_mvid(struct ipc_namespace *ns, int id, int newid); long sem_mvid(struct ipc_namespace *ns, int id, int newid);

[RFC][PATCH 0/2] New API to change the IDs of an existing IPC

2007-09-28 Thread Pierre Peiffer
Hi, As I'm seeing some discussion/interest about IPC, I would like to propose these patches, which provide an easy way to change the ID of an exiting IPC. This work is done around the checkpoint/restart of applications. In the case of the IPCs, we need (among others) this functionality.

Re: [resend][PATCH] Remove duplicated declarations in procfs

2007-09-28 Thread Pierre Peiffer
Andrew Morton a écrit : > > yup, thanks, the maps2 patches in -mm already accidentally fixed this so I > haven't > bothered merging it as a standalone thing. > Ok, good. Thanks, -- Pierre - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [

[resend][PATCH] Remove duplicated declarations in procfs

2007-09-28 Thread Pierre Peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> This is a trivial patch that removes some duplicated declarations of extern variables. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- fs/proc/internal.h |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --g

[PATCH] fs/proc/internal.h cleanup.

2007-09-14 Thread Pierre Peiffer
From: Pierre Peiffer <[EMAIL PROTECTED]> These extern variables are declared twice, so it removes one of the declaration. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- fs/proc/internal.h |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/fs/proc/

Re: [PATCH] Futex: Revert the non-functional REQUEUE_PI

2007-06-18 Thread Pierre Peiffer
Thomas Gleixner wrote : Patch d0aa7a70bf03b9de9e995ab272293be1f7937822 titled "futex_requeue_pi optimization" introduced user space visible changes to the futex syscall. The patch is non-functional and there is no way to fix it proper before the 2.6.22 release. The breakage report ( http:/

Re: [PATCH, take6] FUTEX : new PRIVATE futexes

2007-04-26 Thread Pierre Peiffer
Eric Dumazet a écrit : Hi Andrew Not sure if you prefer to wait Pierre work on futex64, so just in case, I prepared this patch. Update on this take6 : - Rebased on linux-2.6.21-rc7-mm2 , since futex64 were droped from mm Pierre, I can resubmit another patch on top on your next patch, so ple

[PATCH -mm take2] 64bit-futex - provide new commands instead of new syscall

2007-04-24 Thread Pierre Peiffer
u use continuous values a simple jump table can be used and no conditionals. Smaller and faster. Something like that may be... Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> -- Pierre --- include/asm-ia64/futex.h|8 - include/asm-powerpc/futex.h |6 - include/asm-s

[PATCH -mm] 64bit-futex - provide new commands instead of new syscall

2007-04-23 Thread Pierre Peiffer
will be done with 64bit futexes, I can't really maintain it. So I'll let you take/modify/adapt this patch following your needs. Thanks, Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> -- Pierre --- include/asm-ia64/futex.h|8 - include/asm-powerpc/futex.h |6 -

Re: [PATCH -mm] fix undefined symbol if CONFIG_PAGE_GROUP_BY_MOBILITY not set

2007-04-20 Thread Pierre Peiffer
Hi, Your fix looks correct but the compile-time option CONFIG_PAGE_GROUP_BY_MOBILITY was removed in a patch I sent to Andrew two days ago. It went into mm-commits last night so this problem should no longer exist. Ah ok, fine. Just forget it in this case :) Thanks, -- Pierre - To unsubscr

[PATCH -mm] fix undefined symbol if CONFIG_PAGE_GROUP_BY_MOBILITY not set

2007-04-20 Thread Pierre Peiffer
Hi, This is a fix against the patch do-not-group-pages-by-mobility-type-on-low-memory-systems.patch (include in -mm tree): The error "page_group_by_mobility_disabled undefinied" occured if CONFIG_PAGE_GROUP_BY_MOBILITY is not set. Signed-off-by: Pierre Peiffer <[EMAIL PROTECT

Re: [PATCH, take4] FUTEX : new PRIVATE futexes

2007-04-11 Thread Pierre Peiffer
safe side we should enforce it in get_futex_key(). I agree with you : If we want to maximize performance, we could say : The check *must* be done by the caller. Well we _control_ the API, so let's make it as clean and performant as possible from the start. -- Pierre Peiffer - To u

[PATCH -mm] Fix: timeout not passed anymore to futex_lock_pi

2007-03-26 Thread Pierre Peiffer
This is a fix for a bug introduced by the patch make-futex_wait-use-an-hrtimer-for-timeout.patch : the timeout value is not passed anymore to futex_lock_pi. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- kernel/futex.c|8 ++-- kernel/futex_compat.c |4 +++- 2

[PATCH 2.6.21-rc4-mm1 2/4] Make futex_wait() use an hrtimer for timeout

2007-03-21 Thread Pierre . Peiffer
off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- include/linux/futex.h |3 + kernel/futex.c| 85 -- kernel/futex_compat.c | 17 -- 3 files changed, 51 insertions(+), 54 deletions(-) Index: b/ke

[PATCH 2.6.21-rc4-mm1 3/4] futex_requeue_pi optimization

2007-03-21 Thread Pierre . Peiffer
the glibc in pthread_broadcast, when using "normal" mutexes. With futex_requeue_pi, it can be used with PRIO_INHERIT mutexes too. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- include/linux/futex.h |9 kernel/futex.c

[PATCH 2.6.21-rc4-mm1 4/4] sys_futex64 : allows 64bit futexes

2007-03-21 Thread Pierre . Peiffer
x64 for now). Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- include/asm-x86_64/futex.h | 113 ++ include/asm-x86_64/unistd.h |4 include/linux/futex.h |9 - include/linux/syscalls.h|3 kernel/futex.c

[PATCH 2.6.21-rc4-mm1 0/4] Futexes functionalities and improvements

2007-03-21 Thread Pierre . Peiffer
Hi Andrew, This is a re-send of a series of patches concerning futexes (here after is a short description). I have reworked the patches to take into account the last changes about futex, and this series should apply cleanly on -mm tree (the changes mostly affect patch 2 "futex_wait

[PATCH 2.6.21-rc4-mm1 1/4] futex priority based wakeup

2007-03-21 Thread Pierre . Peiffer
be woken last, in FIFO order (RT-threads are woken first, in priority order). Signed-off-by: Sebastien Dugue <[EMAIL PROTECTED]> Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- kernel/futex.c | 78 +++-- 1 file changed, 4

Re: [PATCH 2.6.21-rc3-mm2 3/4] futex_requeue_pi optimization

2007-03-20 Thread Pierre Peiffer
Peter Zijlstra a écrit : Unfortunately not, nonlinear vmas don't have a linear relation between address and offset. What you would need to do is do a linear walk of the page tables. But even that might not suffice if nonlinear vmas may form a non-injective, surjective mapping. /me checks.. Hm

Re: [PATCH 2.6.21-rc3-mm2 3/4] futex_requeue_pi optimization

2007-03-20 Thread Pierre Peiffer
Peter Zijlstra a écrit : +static void *get_futex_address(union futex_key *key) +{ + void *uaddr; + + if (key->both.offset & 1) { + /* shared mapping */ + uaddr = (void*)((key->shared.pgoff << PAGE_SHIFT) + + key->shared.offset

[PATCH 2.6.21-rc3-mm2 3/4] futex_requeue_pi optimization

2007-03-13 Thread Pierre . Peiffer
used with PRIO_INHERIT mutexes too. Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- include/linux/futex.h |8 kernel/futex.c | 557 +++- kernel/futex_compat.c |3 kernel/rtmutex.c| 41 --- kernel/rtmutex_commo

[PATCH 2.6.21-rc3-mm2 4/4] sys_futex64 : allows 64bit futexes

2007-03-13 Thread Pierre . Peiffer
now). Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- include/asm-x86_64/futex.h | 113 include/asm-x86_64/unistd.h |4 include/linux/futex.h |7 - include/linux/syscalls.h|3 kernel/futex.c

[PATCH 2.6.21-rc3-mm2 0/4] Futexes functionalities and improvements

2007-03-13 Thread Pierre . Peiffer
Hi Andrew, This is a re-send of a series of patches concerning futexes (here after is a short description) Could you consider them for inclusion in -mm tree ? All of them have already been discussed in January and have already been included in -rt for a while. I think t

[PATCH 2.6.21-rc3-mm2 1/4] futex priority based wakeup

2007-03-13 Thread Pierre . Peiffer
be woken last, in FIFO order (RT-threads are woken first, in priority order). Signed-off-by: Sébastien Dugué <[EMAIL PROTECTED]> Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- kernel/futex.c | 78 +++-- 1 file changed, 4

[PATCH 2.6.21-rc3-mm2 2/4] Make futex_wait() use an hrtimer for timeout

2007-03-13 Thread Pierre . Peiffer
} if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE) val2 = (int) (unsigned long) utime; - return do_futex(uaddr, op, val, timeout, uaddr2, val2, val3); + return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); } -- -- Pierre Peiffer - To unsubscribe from this li

Re: How to distinguish original kernel vs -rt kernel

2007-03-07 Thread Pierre Peiffer
Thomas Gleixner a écrit : It is HRTIMER_MODE_xx in mainline as of 2.6.21-rc1. -rt kernels are always a bit ahead of time. :) Great ! Thanks. -- Pierre - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info a

How to distinguish original kernel vs -rt kernel

2007-03-07 Thread Pierre Peiffer
Hi, Supposing I have an external kernel module which I would like to compile against both original kernel and -rt kernel, what is the proper/most elegant way to know which kernel I'm compiling with ? I've only found the EXTRAVERSION define, am I missing a better way ? In fact, I'm facing the

Re: [PATCH] futex null pointer timeout

2007-01-18 Thread Pierre Peiffer
lowing patch: futex_lock_pi is also involved. --- futex.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- Index: linux-2.6/kernel/futex.c === --- li

[PATCH 2.6.20-rc5 4/4] sys_futex64 : allows 64bit futexes

2007-01-17 Thread Pierre Peiffer
| 247 ++-- kernel/futex_compat.c |3 kernel/sys_ni.c |1 7 files changed, 299 insertions(+), 77 deletions(-) --- Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- Index: linux-2.6/include/as

[PATCH 2.6.20-rc5 3/4] futex_requeue_pi optimization

2007-01-17 Thread Pierre Peiffer
deletions(-) --- Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- Index: linux-2.6/include/linux/futex.h === --- linux-2.6.orig/include/linux/futex.h2007-01-17 09:44:42.0 +0100 +++ linux-2.6/include/linux/

[PATCH 2.6.20-rc5 2/4] Make futex_wait() use an hrtimer for timeout

2007-01-17 Thread Pierre Peiffer
/futex_compat.c | 11 + 3 files changed, 41 insertions(+), 30 deletions(-) --- Signed-off-by: Sébastien Dugué <[EMAIL PROTECTED]> Signed-off-by: Pierre Peiffer <[EMAIL PROTECTED]> --- Index: linux-2.6/kernel/futex.c =

[PATCH 2.6.20-rc5 1/4] futex priority based wakeup

2007-01-17 Thread Pierre Peiffer
them to be woken last, in FIFO order (RT-threads are woken first, in priority order). --- futex.c | 78 1 file changed, 49 insertions(+), 29 deletions(-) --- Signed-off-by: Sébastien Dugué <[EMAIL PROTECTED]> Signed-off-by:

[PATCH 2.6.20-rc5 0/4] futexes functionalities and improvements

2007-01-17 Thread Pierre Peiffer
Hi, Today, there are several functionalities or improvements about futexes included in -rt kernel tree, which, I think, it make sense to have in mainline. Among them, there are: * futex use prio list : allows RT-threads to be woken in priority order instead of FIFO order. * fute

Re: [PATCH 2.6.20-rc4 0/4] futexes functionalities and improvements

2007-01-16 Thread Pierre Peiffer
Ingo Molnar a écrit : * Ulrich Drepper <[EMAIL PROTECTED]> wrote: what do you mean by that - which is this same resource? From what has been said here before, all futexes are stored in the same list or hash table or whatever it was. I want to see how that code behaves if many separate proces

Re: [PATCH 2.6.20-rc4 0/4] futexes functionalities and improvements

2007-01-16 Thread Pierre Peiffer
Hi, Ingo Molnar a écrit : yeah. As an alternative, it might be a good idea to pthread-ify hackbench.c - that should replicate the Volano workload pretty accurately. I've attached hackbench.c. (it's process based right now, so it wont trigger contended futex ops) Ok, thanks. I've adapted your

Re: [PATCH 2.6.20-rc4 0/4] futexes functionalities and improvements

2007-01-11 Thread Pierre Peiffer
Andrew Morton a écrit : > OK. Unfortunately patches 2-4 don't apply without #1 present and the fix > is not immediately obvious, so we'll need a respin+retest, please. Ok, I'll provide updated patches for -mm ASAP. On Thu, 11 Jan 2007 09:47:28 -0800 Ulrich Drepper <[EMAIL PROTECTED]> wrote:

Re: [PATCH 2.6.20-rc4 1/4] futex priority based wakeup

2007-01-10 Thread Pierre Peiffer
Daniel Walker a écrit : On Tue, 2007-01-09 at 17:16 +0100, Pierre Peiffer wrote: @@ -1358,7 +1366,7 @@ static int futex_unlock_pi(u32 __user *u struct futex_hash_bucket *hb; struct futex_q *this, *next; u32 uval; - struct list_head *head; + struct plist_head

  1   2   >