stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: David Hildenbrand <david@redhat.com>
Cc: "Petr Vaněk" <arkamar@atlas.cz>,
	stable@vger.kernel.org,
	"Kefeng Wang" <wangkefeng.wang@huawei.com>,
	"Leo Fu" <bfu@redhat.com>, "Thomas Huth" <thuth@redhat.com>,
	"Ryan Roberts" <ryan.roberts@arm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Janosch Frank" <frankja@linux.ibm.com>,
	"Matthew Wilcox" <willy@infradead.org>
Subject: Re: [PATCH 6.6.y] mm: huge_memory: add vma_thp_disabled() and thp_disabled_by_hw()
Date: Tue, 5 Nov 2024 17:38:28 +0100	[thread overview]
Message-ID: <2024110508-cascade-employed-e28f@gregkh> (raw)
In-Reply-To: <26be0c08-1c83-451d-902b-a843b9ef4b0e@redhat.com>

On Tue, Nov 05, 2024 at 05:30:14PM +0100, David Hildenbrand wrote:
> On 05.11.24 13:56, Petr Vaněk wrote:
> > Hi David,
> > 
> 
> Hi Petr,
> 
> > On Tue, Oct 22, 2024 at 11:07:55AM +0200, David Hildenbrand wrote:
> > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> > > index 9aea11b1477c..dfd6577225d8 100644
> > > --- a/mm/huge_memory.c
> > > +++ b/mm/huge_memory.c
> > > @@ -78,19 +78,8 @@ bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags,
> > >   	if (!vma->vm_mm)		/* vdso */
> > >   		return false;
> > > -	/*
> > > -	 * Explicitly disabled through madvise or prctl, or some
> > > -	 * architectures may disable THP for some mappings, for
> > > -	 * example, s390 kvm.
> > > -	 * */
> > > -	if ((vm_flags & VM_NOHUGEPAGE) ||
> > > -	    test_bit(MMF_DISABLE_THP, &vma->vm_mm->flags))
> > > -		return false;
> > > -	/*
> > > -	 * If the hardware/firmware marked hugepage support disabled.
> > > -	 */
> > > -	if (transparent_hugepage_flags & (1 << TRANSPARENT_HUGEPAGE_UNSUPPORTED))
> > > -		return false;
> > > +	if (thp_disabled_by_hw() || vma_thp_disabled(vma, vm_flags))
> > > +		return 0;
> > 
> > Shouldn't this return false for consistency with the rest of the
> > function?
> 
> Yes, that's better. Same applies to the 6.1.y backport of this.

Ok, dropping this from the review queue, please resend the updated
versions.

thansk,

greg k-h

  reply	other threads:[~2024-11-05 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18  7:57 FAILED: patch "[PATCH] mm: don't install PMD mappings when THPs are disabled by the" failed to apply to 6.6-stable tree gregkh
2024-10-22  9:07 ` [PATCH 6.6.y] mm: huge_memory: add vma_thp_disabled() and thp_disabled_by_hw() David Hildenbrand
2024-11-05 12:56   ` Petr Vaněk
2024-11-05 16:30     ` David Hildenbrand
2024-11-05 16:38       ` Greg KH [this message]
2024-10-22  9:09 ` [PATCH 6.6.y] mm: don't install PMD mappings when THPs are disabled by the hw/process/vma David Hildenbrand
2024-11-04 15:42   ` David Hildenbrand
2024-11-05 17:25 ` [PATCH 6.6.y 0/2] " David Hildenbrand
2024-11-05 17:25   ` [PATCH 6.6.y 1/2] mm: huge_memory: add vma_thp_disabled() and thp_disabled_by_hw() David Hildenbrand
2024-11-05 17:25   ` [PATCH 6.6.y 2/2] mm: don't install PMD mappings when THPs are disabled by the hw/process/vma David Hildenbrand
2024-11-06  7:23   ` [PATCH 6.6.y 0/2] " Greg KH

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=2024110508-cascade-employed-e28f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arkamar@atlas.cz \
    --cc=bfu@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=hughd@google.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=ryan.roberts@arm.com \
    --cc=stable@vger.kernel.org \
    --cc=thuth@redhat.com \
    --cc=wangkefeng.wang@huawei.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).