public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Ryan Roberts <ryan.roberts@arm.com>
To: Barry Song <21cnbao@gmail.com>, Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Steve French <sfrench@samba.org>,
	linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org,
	linux-mm@kvack.org, Barry Song <v-songbaohua@oppo.com>
Subject: Re: [PATCH] nfs: fix nfs_swap_rw for large-folio swap
Date: Mon, 17 Jun 2024 09:03:18 +0100	[thread overview]
Message-ID: <9ef638fc-5606-45da-a237-2e09ee05bbeb@arm.com> (raw)
In-Reply-To: <CAGsJ_4ytrnXJbfVi=PpTw34iBDqEoAm3b16oZr2VQpVWLmh5zA@mail.gmail.com>

On 16/06/2024 11:23, Barry Song wrote:
> On Sun, Jun 16, 2024 at 4:54 PM Christoph Hellwig <hch@lst.de> wrote:
>>
>> On Sun, Jun 16, 2024 at 12:16:10PM +1200, Barry Song wrote:
>>> As I understand it, this isn't happening because we don't support
>>> mTHP swapping out to a swapfile, whether it's on NFS or any
>>> other filesystem.
>>
>> It does happen.  The reason why I sent this patch is becaue I observed
>> the BUG_ON trigger on a trivial swap generation workload (usemem.c from
>> xfstests).
> 
> This is quite unusual. Could you share your setup and backtrace? I'd
> like to reproduce the issue, as the mm code only supports mTHP
> swapout on block devices. What is your swap device or swap file?
> Additionally, on what kind of filesystem is the executable file built
> from usemem.c located?

Yes, I'm also confused by this, since as Barry says, the swap-out changes to
support mTHP are only intended to be activated when the swap device is a
non-rotating block device - swap files on file systems are explicitly not
supported and all swapping should be done page-by-page in that case. This
constraint is exactly the same as for the pre-existing PMD-size THP swap-out
support. So if you are seeing large folios being written after the mTHP swap-out
change, you should also be seeing large folios before this change.

Hopefully the stack trace will tell us what's going on here.

(Sorry for my slow responses/lack of engagement over the last month; its been a
combination of paternity leave/lack of sleep/working on other things. I'm hoping
to get properly back into this stuff within the next couple of weeks).

Thanks,
Ryan



  parent reply	other threads:[~2024-06-17  8:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 10:03 fix swap on NFS Christoph Hellwig
2024-06-14 10:03 ` [PATCH] nfs: fix nfs_swap_rw for large-folio swap Christoph Hellwig
2024-06-14 17:52   ` Jeff Layton
2024-06-14 18:21   ` Andrew Morton
2024-06-16  0:16     ` Barry Song
2024-06-16  8:54       ` Christoph Hellwig
2024-06-16 10:23         ` Barry Song
2024-06-17  5:32           ` Christoph Hellwig
2024-06-17  8:02             ` Barry Song
2024-06-18  5:52               ` Christoph Hellwig
2024-06-18  6:05                 ` Barry Song
2024-06-18  6:13                   ` Christoph Hellwig
2024-06-18  6:31                     ` Barry Song
2024-06-17  8:03           ` Ryan Roberts [this message]
2024-06-17  9:40             ` Barry Song
2024-06-17 10:33               ` Ryan Roberts
2024-06-18  6:48   ` Martin Wege

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=9ef638fc-5606-45da-a237-2e09ee05bbeb@arm.com \
    --to=ryan.roberts@arm.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=sfrench@samba.org \
    --cc=trondmy@kernel.org \
    --cc=v-songbaohua@oppo.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