Messages in this thread | | | Date | Wed, 22 Sep 2021 12:37:20 +0100 | From | Matthew Wilcox <> | Subject | Re: [PATCH v2 1/2] mm, thp: check page mapping when truncating page cache |
| |
On Wed, Sep 22, 2021 at 03:06:44PM +0800, Rongwei Wang wrote: > Transparent huge page has supported read-only non-shmem files. The file- > backed THP is collapsed by khugepaged and truncated when written (for > shared libraries). > > However, there is race in two possible places. > > 1) multiple writers truncate the same page cache concurrently; > 2) collapse_file rolls back when writer truncates the page cache;
As I've said before, the bug here is that somehow there is a writable fd to a file with THPs. That's what we need to track down and fix.
https://lore.kernel.org/linux-mm/YUdL3lFLFHzC80Wt@casper.infradead.org/
| |