Messages in this thread | | | From | Song Liu <> | Date | Mon, 4 Oct 2021 13:26:26 -0700 | Subject | Re: [PATCH v2 1/2] mm, thp: check page mapping when truncating page cache |
| |
On Mon, Oct 4, 2021 at 10:26 AM Rongwei Wang <rongwei.wang@linux.alibaba.com> wrote: > > Hi, > I have run our cases these two days to stress test new Patch #1. The new > Patch #1 mainly add filemap_invalidate_{un}lock before and after > truncate_pagecache(), basing on original Patch #1. And the crash has not > happened. > > Now, I keep the original Patch #1, then adding the code below which > suggested by liu song (I'm not sure which one I should add in the next > version, Suggested-by or Signed-off-by? If you know, please remind me). > > - if (filemap_nr_thps(inode->i_mapping)) > + if (filemap_nr_thps(inode->i_mapping)) { > + filemap_invalidate_lock(inode->i_mapping); > truncate_pagecache(inode, 0); > + filemap_invalidate_unlock(inode->i_mapping); > + }
It is mostly suggested by Matthew. If the patch goes that way, you can add
Tested-by: Song Liu <song@kernel.org>
| |