lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87h6de54by.fsf@nvdebian.thelocal>
Date: Fri, 28 Jun 2024 09:48:24 +1000
From: Alistair Popple <apopple@...dia.com>
To: Christoph Hellwig <hch@....de>
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, david@...morbit.com
Subject: Re: [PATCH 04/13] fs/dax: Add dax_page_free callback


Christoph Hellwig <hch@....de> writes:

> On Thu, Jun 27, 2024 at 10:54:19AM +1000, Alistair Popple wrote:
>> When a fs dax page is freed it has to notify filesystems that the page
>> has been unpinned/unmapped and is free. Currently this involves
>> special code in the page free paths to detect a transition of refcount
>> from 2 to 1 and to call some fs dax specific code.
>> 
>> A future change will require this to happen when the page refcount
>> drops to zero. In this case we can use the existing
>> pgmap->ops->page_free() callback so wire that up for all devices that
>> support FS DAX (nvdimm and virtio).
>
> Given that ->page_ffree is only called from free_zone_device_folio
> and right next to a switch on the the type, can't we just do the
> wake_up_var there without the somewhat confusing indirect call that
> just back in common code without any driver logic?

Longer term I'm hoping we can get rid of that switch on type entirely as
I don't think the whole get/put_dev_pagemap() thing is very useful. Less
indirection is good though so will move the wake_up_var there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ