From: Andrew Morton <akpm@linux-foundation.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Manfred Spraul <manfred@colorfullife.com>,
Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCH] ipc: Convert ipcs_idr to XArray
Date: Sat, 18 Apr 2020 13:15:09 -0700 [thread overview]
Message-ID: <20200418131509.fb3c19bf450d618be797c030@linux-foundation.org> (raw)
In-Reply-To: <20200326151418.27545-1-willy@infradead.org>
On Thu, 26 Mar 2020 08:14:18 -0700 Matthew Wilcox <willy@infradead.org> wrote:
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>
> 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?
>
> ...
>
next prev parent reply other threads:[~2020-04-18 20:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 15:14 [PATCH] ipc: Convert ipcs_idr to XArray Matthew Wilcox
2020-04-18 20:15 ` Andrew Morton [this message]
2020-04-18 21:34 ` Matthew Wilcox
2020-04-18 22:08 ` Andrew Morton
2020-04-20 15:35 ` Manfred Spraul
2020-04-20 17:06 ` Matthew Wilcox
2020-04-21 18:33 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200418131509.fb3c19bf450d618be797c030@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).