Re: [PATCH] ipc: Convert ipcs_idr to XArray

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Mar 2020 08:14:18 -0700 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>
> 
> The XArray has better loops than the IDR has, removing the need to
> open-code them.  We also don't need to call idr_destroy() any more.
> Allocating the ID is a little tricky due to needing to get 'seq'
> correct.  Open-code a variant of __xa_alloc() which lets us set the
> ID and the seq before depositing the pointer in the array.

hm, this goes rather deep.  Manfred & Davidlohr, are you able to run
this through some testing?

>
> ...
>
> --- a/ipc/util.c
> +++ b/ipc/util.c
> @@ -104,12 +104,20 @@ static const struct rhashtable_params ipc_kht_params = {
>  	.automatic_shrinking	= true,
>  };
>  
> +#ifdef CONFIG_CHECKPOINT_RESTORE

The code grew a few additional CONFIG_CHECKPOINT_RESTORE ifdefs. 
What's going on here?  Why is CRIU special in ipc/?

> +#define set_restore_id(ids, x)	ids->restore_id = x
> +#define get_restore_id(ids)	ids->restore_id
> +#else
> +#define set_restore_id(ids, x)	do { } while (0)
> +#define get_restore_id(ids)	(-1)
> +#endif

Well these are ugly.  Can't all this be done in C?

>
> ...
>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux