lkml.org 
[lkml]   [2021]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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>

    \
     
     \ /
      Last update: 2021-10-04 22:26    [W:3.398 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site