[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87plrxo6i5.fsf@nvdebian.thelocal>
Date: Mon, 01 Jul 2024 18:33:34 +1000
From: Alistair Popple <apopple@...dia.com>
To: Dave Chinner <david@...morbit.com>
Cc: dan.j.williams@...el.com, vishal.l.verma@...el.com,
dave.jiang@...el.com, logang@...tatee.com, bhelgaas@...gle.com,
jack@...e.cz, jgg@...pe.ca, catalin.marinas@....com, will@...nel.org,
mpe@...erman.id.au, npiggin@...il.com, dave.hansen@...ux.intel.com,
ira.weiny@...el.com, willy@...radead.org, djwong@...nel.org,
tytso@....edu, linmiaohe@...wei.com, david@...hat.com, peterx@...hat.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org,
nvdimm@...ts.linux.dev, linux-cxl@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org,
jhubbard@...dia.com, hch@....de
Subject: Re: [PATCH 00/13] fs/dax: Fix FS DAX page reference counts
Dave Chinner <david@...morbit.com> writes:
> On Thu, Jun 27, 2024 at 10:54:15AM +1000, Alistair Popple wrote:
>> FS DAX pages have always maintained their own page reference counts
>> without following the normal rules for page reference counting. In
>> particular pages are considered free when the refcount hits one rather
>> than zero and refcounts are not added when mapping the page.
>>
>> Tracking this requires special PTE bits (PTE_DEVMAP) and a secondary
>> mechanism for allowing GUP to hold references on the page (see
>> get_dev_pagemap). However there doesn't seem to be any reason why FS
>> DAX pages need their own reference counting scheme.
>>
>> By treating the refcounts on these pages the same way as normal pages
>> we can remove a lot of special checks. In particular pXd_trans_huge()
>> becomes the same as pXd_leaf(), although I haven't made that change
>> here. It also frees up a valuable SW define PTE bit on architectures
>> that have devmap PTE bits defined.
>>
>> It also almost certainly allows further clean-up of the devmap managed
>> functions, but I have left that as a future improvment.
>>
>> This is an update to the original RFC rebased onto v6.10-rc5. Unlike
>> the original RFC it passes the same number of ndctl test suite
>> (https://github.com/pmem/ndctl) tests as my current development
>> environment does without these patches.
>
> I strongly suggest running fstests on pmem devices with '-o
> dax=always' mount options to get much more comprehensive fsdax test
> coverage. That exercises a lot of the weird mmap corner cases that
> cause problems so it would be good to actually test that nothing new
> got broken in FSDAX by this patchset.
Thanks Dave, I will do that and report back. I suspect it will turn up
something, given Dan was seeing a crash with these patches.
- Alistair
> -Dave.
Powered by blists - more mailing lists