Re: [RFC PATCH 11/11] mm/hmm: Do not use list*_rcu() for hmm->ranges

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

 



On Thu, May 23, 2019 at 9:05 PM Jason Gunthorpe <jgg@xxxxxxxx> wrote:
>
> From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
>
> This list is always read and written while holding hmm->lock so there is
> no need for the confusing _rcu annotations.
>
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

Acked-by: Souptick Joarder <jrdr.linux@xxxxxxxxx>

> ---
>  mm/hmm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/hmm.c b/mm/hmm.c
> index 02752d3ef2ed92..b4aafa90a109a5 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -912,7 +912,7 @@ int hmm_range_register(struct hmm_range *range,
>         /* Initialize range to track CPU page table update */
>         mutex_lock(&range->hmm->lock);
>
> -       list_add_rcu(&range->list, &range->hmm->ranges);
> +       list_add(&range->list, &range->hmm->ranges);
>
>         /*
>          * If there are any concurrent notifiers we have to wait for them for
> @@ -940,7 +940,7 @@ void hmm_range_unregister(struct hmm_range *range)
>                 return;
>
>         mutex_lock(&range->hmm->lock);
> -       list_del_rcu(&range->list);
> +       list_del(&range->list);
>         mutex_unlock(&range->hmm->lock);
>
>         /* Drop reference taken by hmm_range_register() */
> --
> 2.21.0
>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux