mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: mdshahid03@gmail.com
To: mdshahid03@gmail.com
Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
	 chleroy@kernel.org, ritesh.list@gmail.com,
	sshegde@linux.ibm.com,  linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/perf/vpa-dtl: use GFP_ATOMIC for DTL buffer allocation
Date: Tue, 10 Nov 2026 23:24:14 +0530	[thread overview]
Message-ID: <179433325437.153822.17133762919793487046.b4-reply@b4> (raw)
In-Reply-To: <20261102143719.165508-1-mdshahid03@gmail.com>

Hi,

Could you please review this patch and give your feedback,when time
permits.

Thanks
Shahid.

On 2026-11-02 20:07 +0530, mdshahid03@gmail.com wrote:
> From: Mohammad Shahid <mdshahid03@gmail.com>
> 
> The DTL buffer is allocated while holding dtl_global_lock, which
> is spinlock.
> 
> GFP_KERNEL allow direct memory reclaim and may sleep. Combining
> GFP_KERNEL with GFP_ATOMIC does not remove the direct reclaim.
> 
> Use GFP_ATOMIC alone to ensure the allocation does not sleep
> while the spinlock is held.
> 
> The issue is reported by script coccinelle call_kern.cocci.
> 
> Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com>
> ---
>  arch/powerpc/perf/vpa-dtl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/perf/vpa-dtl.c b/arch/powerpc/perf/vpa-dtl.c
> index 3e3d65b6c796..3d34417e6aae 100644
> --- a/arch/powerpc/perf/vpa-dtl.c
> +++ b/arch/powerpc/perf/vpa-dtl.c
> @@ -338,7 +338,7 @@ static int vpa_dtl_mem_alloc(int cpu)
>  	if (!dtl_cache)
>  		return -ENOMEM;
>  
> -	buf = kmem_cache_alloc_node(dtl_cache, GFP_KERNEL | GFP_ATOMIC, cpu_to_node(cpu));
> +	buf = kmem_cache_alloc_node(dtl_cache, GFP_ATOMIC, cpu_to_node(cpu));
>  	if (!buf) {
>  		pr_warn("buffer allocation failed for cpu %d\n", cpu);
>  		return -ENOMEM;
> -- 
> 2.43.0
> 
> 
> 



  reply	other threads:[~2026-11-10 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 14:37 mdshahid03
2026-11-10 17:54 ` mdshahid03 [this message]
2026-11-11  3:34 ` Ritesh Harjani
2026-11-18  1:45 ` Madhavan Srinivasan

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=179433325437.153822.17133762919793487046.b4-reply@b4 \
    --to=mdshahid03@gmail.com \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=ritesh.list@gmail.com \
    --cc=sshegde@linux.ibm.com \
    /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

all inboxes | Powered by JetHome®