Re: Splitting an iomap_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 04, 2020 at 04:37:24AM +0100, Matthew Wilcox wrote:
> Kirill, do I have the handling of split_huge_page() failure correct?
> It seems reasonable to me -- unlock the page and drop the reference,
> hoping that somebody else will not have a reference to the page by the
> next time we try to split it.  Or they will split it for us.  There's a
> livelock opportunity here, but I'm not sure it's worse than the one in
> a holepunch scenario.

The worst case scenario is when the page is referenced (directly or
indirectly) by the caller. It this case we would end up with endless loop.
I'm not sure how we can guarantee that this will never happen.

Maybe it's safer to return -EINTR if the split is failed and let the
syscall (or whatever codepath brings us here) to be restarted from the
scratch? Yes, it's abuse of -EINTR, but should be fine.

-- 
 Kirill A. Shutemov



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux