Some of our production workloads which processes a large amount of data spends considerable amount of CPUs on truncation and invalidation of large sized files (100s of GiBs of size). Tracing the operations showed that most of the time is in shadow entries removal. This patch series optimizes the truncation and invalidation operations. Shakeel Butt (2): mm: optimize truncation of shadow entries mm: optimize invalidation of shadow entries mm/truncate.c | 99 +++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 55 deletions(-) -- 2.43.5