linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dev Jain <dev.jain@arm.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: move mask update out of the atomic context
Date: Mon, 23 Jun 2025 14:26:29 +0530	[thread overview]
Message-ID: <c11a4b2e-6895-43b7-9ff6-620793bf8551@arm.com> (raw)
In-Reply-To: <20250623080440.3005693-1-agordeev@linux.ibm.com>


On 23/06/25 1:34 pm, Alexander Gordeev wrote:
> There is not need to modify page table synchronization mask
> while apply_to_pte_range() holds user page tables spinlock.

I don't get you, what is the problem with the current code?
Are you just concerned about the duration of holding the
lock?

>
> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
> ---
>   mm/memory.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 8eba595056fe..6849ab4e44bf 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3035,12 +3035,13 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
>   			}
>   		} while (pte++, addr += PAGE_SIZE, addr != end);
>   	}
> -	*mask |= PGTBL_PTE_MODIFIED;
>   
>   	arch_leave_lazy_mmu_mode();
>   
>   	if (mm != &init_mm)
>   		pte_unmap_unlock(mapped_pte, ptl);
> +	*mask |= PGTBL_PTE_MODIFIED;
> +
>   	return err;
>   }
>   


  reply	other threads:[~2025-06-23  8:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23  8:04 Alexander Gordeev
2025-06-23  8:56 ` Dev Jain [this message]
2025-06-23  9:37   ` Alexander Gordeev
2025-06-23 10:09     ` Dev Jain
2025-06-23 19:45       ` David Hildenbrand
2025-06-24  9:37         ` Alexander Gordeev
2025-06-24  9:40           ` David Hildenbrand
2025-06-24 12:00             ` Alexander Gordeev
2025-06-24 12:03               ` David Hildenbrand

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=c11a4b2e-6895-43b7-9ff6-620793bf8551@arm.com \
    --to=dev.jain@arm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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