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

2008-02-18 Thread Pierre Peiffer
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:21 +0100 > Pierre Peiffer &

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

2008-02-18 Thread Pierre Peiffer
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:21 +0100 Pierre Peiffer [EMAIL PROTECTED

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

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, but

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

[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 PROTECTE

[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 fu

[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

[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
ux 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.kernel.org

[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/msg.c | 48

[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/ msgid64_ds/shmid64_ds

[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 function

[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 for now

[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] Acked-by: Serge

[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 insertions(+), 3 deletions

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

2008-02-12 Thread pierre . peiffer
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.kernel.org/majordomo-info.html Please

[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 which this rwmutex

[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
> >> 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 field, then add >> support in the IPC su

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

2008-02-08 Thread Pierre Peiffer
to be the clone_with_pid() extension on top of that. second, the change is incremental: first code the mechanism to set the field, then add support in the IPC subsystem, later in the DEVPTS, then in clone and so forth. Oren. Pierre Peiffer wrote: Kirill Korotaev wrote: Why user space can need this API

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

2008-02-04 Thread Pierre Peiffer
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 deletions(-) Index: b/drivers/ne

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. >> .

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. . IPC_SETALL:

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

2008-02-04 Thread Pierre Peiffer
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 deletions(-) Index: b/drivers/net/ne.c

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

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 modify the semundo-list of a task from procfs, we must be able to work on any target task

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

2008-01-31 Thread Pierre Peiffer
, 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 the points (1) and (2) as stated above are

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 concurre

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

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

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 existing code playing with the semundo-list, currently works only

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 access to the sem_undo_list of a target task

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 PROTECTED] Acked-by: Serge Hallyn [EMAIL PROTECTED] --- ipc/sem.c |6

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

2008-01-31 Thread Pierre Peiffer
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 the points (1) and (2) as stated above are the key ones. Pierre Kirill Pierre Peiffer wrote: Hi again, Thinking more about this, I think

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

2008-01-30 Thread Pierre Peiffer
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, I agree

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

2008-01-30 Thread Pierre Peiffer
. etc.. But yes, I agree that if we can directly create an IPC with the right ID, it would be better; may be with an IPC_CREATE command or something like that if the direction is to do that from userspace. -- Pierre Peiffer -- To unsubscribe from this list: send the line unsubscribe linux-kernel

[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 fo

[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 targe

[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

[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 PROTECTE

[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

[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 fu

[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,

[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,

[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 function

[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 which this rwmutex

[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 insertions(+), 3 deletions

[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] Acked-by: Serge

[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 shm_chid

[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 target task

[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 don't

[PATCH 2.6.24-rc8-mm1 13/15] (RFC) IPC/semaphores: per pid 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 contains the semid followed

[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 by the semaphores

[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 msgctl and shmctl

[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 values

[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/msg.c | 48

[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/ msgid64_ds/shmid64_ds

[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 for now

[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] --- ipc/sem.c | 61

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 message to

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 message to [EMAIL PROTECTED] More

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

2008-01-09 Thread Pierre Peiffer
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 majordomo inf

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

2008-01-09 Thread Pierre Peiffer
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 majordomo info at http

Re: 2.6.24-rc5-mm1

2007-12-13 Thread Pierre Peiffer
le.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-vmscanc-for-isolate-globa-cgroup-lru-

Re: 2.6.24-rc5-mm1

2007-12-13 Thread Pierre Peiffer
at http://www.tux.org/lkml/ -- 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/

[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] 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/exit.c

[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 fun

[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
this by 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 Peiffer <[EMAIL PROTEC

[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" i

[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 nam

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 whe

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 an ipc_namespace is released to free all ipcs

[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 in the body

[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

[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). This patch

[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
this by 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 Peiffer [EMAIL PROTECTED

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

2007-11-23 Thread Pierre Peiffer
this by 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 Peiffer <[EMAIL PROTEC

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

2007-11-23 Thread Pierre Peiffer
by 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
: > 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

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 I'd find out whether these three ipc_ids intersect any cache-line

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

2007-11-23 Thread Pierre Peiffer
by 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(-) Index: b/ipc

  1   2   3   >