linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vishal Moola <vishal.moola@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 akpm@linux-foundation.org, muchun.song@linux.dev
Subject: Re: [PATCH 4/5] mm: Make pgoff non-const in struct vm_fault
Date: Tue, 26 Mar 2024 13:06:19 -0700	[thread overview]
Message-ID: <CAOzc2pyj54X7QpzMXcRBtoG650k3C3G+SYrsOGKDWjHXQ1yvrQ@mail.gmail.com> (raw)
In-Reply-To: <ZgI1CF2dw-mauoIZ@casper.infradead.org>

On Mon, Mar 25, 2024 at 7:38 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Mar 25, 2024 at 03:33:38PM -0700, Vishal Moola (Oracle) wrote:
> > Hugetlb calculates addresses and page offsets differently from the rest of
> > mm. In order to pass struct vm_fault through the fault pathway we will let
> > hugetlb_fault() and __handle_mm_fault() set those variables themselves
> > instead.
>
> I don't think this is a great idea.  I'd rather not do patch 5 than do
> patch 4+5.  If you look at the history, commits 742d33729a0df11 and
> 5857c9209ce58f show that drivers got into the bad habit of changing
> address & pgoff, so they got made const to prevent that.
>
> So can we make hugetlbfs OK with using addresses & pgoffsets that aren't
> aligned to HPAGE boundaries?  Worth playing with for a bit to see how
> deep that assumption runs.

Hmmm, I'll take a look. I don't think there should be too many issues
with that.


  reply	other threads:[~2024-03-26 20:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 22:33 [PATCH 0/5] Define struct vm_fault in handle_mm_fault() Vishal Moola (Oracle)
2024-03-25 22:33 ` [PATCH 1/5] hugetlb: Convert hugetlb_fault() to use struct vm_fault Vishal Moola (Oracle)
2024-03-25 22:33 ` [PATCH 2/5] hugetlb: Convert hugetlb_no_page() " Vishal Moola (Oracle)
2024-03-25 22:33 ` [PATCH 3/5] hugetlb: Convert hugetlb_wp() " Vishal Moola (Oracle)
2024-03-25 22:33 ` [PATCH 4/5] mm: Make pgoff non-const in " Vishal Moola (Oracle)
2024-03-26  2:38   ` Matthew Wilcox
2024-03-26 20:06     ` Vishal Moola [this message]
2024-03-25 22:33 ` [PATCH 5/5] memory: Define struct vm_fault in handle_mm_fault() Vishal Moola (Oracle)

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=CAOzc2pyj54X7QpzMXcRBtoG650k3C3G+SYrsOGKDWjHXQ1yvrQ@mail.gmail.com \
    --to=vishal.moola@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --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