Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-29 Thread Eric W. Biederman
Manfred Spraul writes: > On 03/14/2018 08:49 PM, Eric W. Biederman wrote: >> To make it possible to keep checkpoint/restore working I have renamed >> the sysctls from xxx_next_id to xxx_nextid.  That is enough change that >> a smart CRIU implementation can see that what is exporte

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-29 Thread Matthew Wilcox
On Thu, Mar 29, 2018 at 08:07:44PM +0200, Manfred Spraul wrote: > Hello Mathew, > > On 03/29/2018 12:56 PM, Matthew Wilcox wrote: > > On Thu, Mar 29, 2018 at 10:47:45AM +0200, Manfred Spraul wrote: > > > > > > > > This can be implemented trivially with the current code > > > > > > > > using idr_al

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-29 Thread Eric W. Biederman
Manfred Spraul writes: > Hello Mathew, > > On 03/29/2018 12:56 PM, Matthew Wilcox wrote: >> On Thu, Mar 29, 2018 at 10:47:45AM +0200, Manfred Spraul wrote: This can be implemented trivially with the current code using idr_alloc_cyclic. >>> Is there a performance impact? >>> Righ

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-29 Thread Manfred Spraul
Hello Mathew, On 03/29/2018 12:56 PM, Matthew Wilcox wrote: On Thu, Mar 29, 2018 at 10:47:45AM +0200, Manfred Spraul wrote: This can be implemented trivially with the current code using idr_alloc_cyclic. Is there a performance impact? Right now, the idr tree is only large if there are lots of

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-29 Thread Matthew Wilcox
On Thu, Mar 29, 2018 at 10:47:45AM +0200, Manfred Spraul wrote: > > > > > > This can be implemented trivially with the current code > > > > > > using idr_alloc_cyclic. > > Is there a performance impact? > Right now, the idr tree is only large if there are lots of objects. > What happens if we have

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-29 Thread Manfred Spraul
Hello together, On 03/29/2018 04:14 AM, Davidlohr Bueso wrote: Cc'ing mtk, Manfred and linux-api. See below. On Thu, 15 Mar 2018, Waiman Long wrote: On 03/15/2018 03:00 PM, Eric W. Biederman wrote: Waiman Long writes: On 03/14/2018 08:49 PM, Eric W. Biederman wrote: The define IPCMNI was

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-28 Thread Davidlohr Bueso
Cc'ing mtk, Manfred and linux-api. See below. On Thu, 15 Mar 2018, Waiman Long wrote: On 03/15/2018 03:00 PM, Eric W. Biederman wrote: Waiman Long writes: On 03/14/2018 08:49 PM, Eric W. Biederman wrote: The define IPCMNI was originally the size of a statically sized array in the kernel a

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-15 Thread Waiman Long
On 03/15/2018 03:00 PM, Eric W. Biederman wrote: > Waiman Long writes: > >> On 03/14/2018 08:49 PM, Eric W. Biederman wrote: >>> The define IPCMNI was originally the size of a statically sized array in >>> the kernel and that has long since been removed. Therefore there is no >>> fundamental reas

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-15 Thread Matthew Wilcox
On Wed, Mar 14, 2018 at 07:49:29PM -0500, Eric W. Biederman wrote: > @@ -109,20 +109,13 @@ void free_ipcs(struct ipc_namespace *ns, struct ipc_ids > *ids, > { > struct kern_ipc_perm *perm; > int next_id; > - int total, in_use; > > down_write(&ids->rwsem); > - > - in_us

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-15 Thread Eric W. Biederman
Waiman Long writes: > On 03/14/2018 08:49 PM, Eric W. Biederman wrote: >> The define IPCMNI was originally the size of a statically sized array in >> the kernel and that has long since been removed. Therefore there is no >> fundamental reason for IPCMNI. >> >> The only remaining use IPCMNI serve

Re: [RFC][PATCH] ipc: Remove IPCMNI

2018-03-15 Thread Waiman Long
On 03/14/2018 08:49 PM, Eric W. Biederman wrote: > The define IPCMNI was originally the size of a statically sized array in > the kernel and that has long since been removed. Therefore there is no > fundamental reason for IPCMNI. > > The only remaining use IPCMNI serves is as a convoluted way to f

[RFC][PATCH] ipc: Remove IPCMNI

2018-03-14 Thread Eric W. Biederman
The define IPCMNI was originally the size of a statically sized array in the kernel and that has long since been removed. Therefore there is no fundamental reason for IPCMNI. The only remaining use IPCMNI serves is as a convoluted way to format the ipc id to userspace. It does not appear that a