[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D9LO1QI65D6K.NLDZ4RK2835Y@google.com>
Date: Fri, 02 May 2025 12:16:17 +0000
From: Brendan Jackman <jackmanb@...gle.com>
To: Ujwal Kundur <ujwal.kundur@...il.com>, <akpm@...ux-foundation.org>,
<peterx@...hat.com>, <shuah@...nel.org>
Cc: <linux-mm@...ck.org>, <linux-kselftest@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] selftests/mm/uffd: Refactor non-composite global vars
into struct
On Thu May 1, 2025 at 4:38 PM UTC, Ujwal Kundur wrote:
> + * count is placed in the page after pthread_mutex_t naturally aligned
> + * to avoid non alignment faults on non-x86 archs.
> + */
> +volatile unsigned long long *area_count(
> + char *area, unsigned long nr,
> + uffd_global_test_opts_t *gopts)
> +{
> + return (volatile unsigned long long *)
> + ((unsigned long) (area + nr * gopts->page_size +
> + sizeof(pthread_mutex_t) +
> + sizeof(unsigned long long) - 1) &
> + ~(unsigned long)(sizeof(unsigned long long) - 1));
Stray space after the minus there
> -static void retry_copy_page(int ufd, struct uffdio_copy *uffdio_copy,
> +static void retry_copy_page(uffd_global_test_opts_t *gopts, struct uffdio_copy *uffdio_copy,
> unsigned long offset)
> {
> - uffd_test_ops->alias_mapping(&uffdio_copy->dst,
> + uffd_test_ops->alias_mapping(gopts,
> + &uffdio_copy->dst,
Little bit of indentation mess here
I don't understand this code but since I was hurt by these global
variables I had a look over the diff anyway, it LGTM (aside from the
formatting nits), thanks.
Reviewed-by: Brendan Jackman <jackmanb@...gle.com>
Powered by blists - more mailing lists