Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1712362

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

From Waiman Long <longman@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries
Date 2017-08-15 19:20 +0200
Message-ID <ueNFw-48q-35@gated-at.bofh.it> (permalink)
References <u8il3-7oj-3@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


On 07/28/2017 02:34 PM, Waiman Long wrote:
>  v2->v3:
>   - Add a faster pruning rate when the free pool is closed to depletion.
>   - As suggested by James Bottomley, add an artificial delay waiting
>     loop before killing a negative dentry and properly clear the
>     DCACHE_KILL_NEGATIVE flag if killing doesn't happen.
>   - Add a new patch to track number of negative dentries that are
>     forcifully killed.
>
>  v1->v2:
>   - Move the new nr_negative field to the end of dentry_stat_t structure
>     as suggested by Matthew Wilcox.
>   - With the help of Miklos Szeredi, fix incorrect locking order in
>     dentry_kill() by using lock_parent() instead of locking the parent's
>     d_lock directly.
>   - Correctly account for positive to negative dentry transitions.
>   - Automatic pruning of negative dentries will now ignore the reference
>     bit in negative dentries but not the regular shrinking.
>
> A rogue application can potentially create a large number of negative
> dentries in the system consuming most of the memory available. This
> can impact performance of other applications running on the system.
>
> This patchset introduces changes to the dcache subsystem to limit
> the number of negative dentries allowed to be created thus limiting
> the amount of memory that can be consumed by negative dentries.
>
> Patch 1 tracks the number of negative dentries used and disallow
> the creation of more when the limit is reached.
>
> Patch 2 enables /proc/sys/fs/dentry-state to report the number of
> negative dentries in the system.
>
> Patch 3 enables automatic pruning of negative dentries when it is
> close to the limit so that we won't end up killing recently used
> negative dentries.
>
> Patch 4 prevents racing between negative dentry pruning and umount
> operation.
>
> Patch 5 shows the number of forced negative dentry killings in
> /proc/sys/fs/dentry-state. End users can then tune the neg_dentry_pc=
> kernel boot parameter if they want to reduce forced negative dentry
> killings.
>
> Waiman Long (5):
>   fs/dcache: Limit numbers of negative dentries
>   fs/dcache: Report negative dentry number in dentry-state
>   fs/dcache: Enable automatic pruning of negative dentries
>   fs/dcache: Protect negative dentry pruning from racing with umount
>   fs/dcache: Track count of negative dentries forcibly killed
>
>  Documentation/admin-guide/kernel-parameters.txt |   7 +
>  fs/dcache.c                                     | 451 ++++++++++++++++++++++--
>  include/linux/dcache.h                          |   8 +-
>  include/linux/list_lru.h                        |   1 +
>  mm/list_lru.c                                   |   4 +-
>  5 files changed, 435 insertions(+), 36 deletions(-)
>
I haven't received any comment on this v3 patch for over 2 weeks. Is
there anything I can do to make it more ready to be merged?

Thanks,
Longman

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries Waiman Long <longman@redhat.com> - 2017-08-15 19:20 +0200
  RE: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries "Wangkai (Kevin,C)" <wangkai86@huawei.com> - 2017-08-16 12:40 +0200
    Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries Waiman Long <longman@redhat.com> - 2017-08-16 15:30 +0200
      RE: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries "Wangkai (Kevin,C)" <wangkai86@huawei.com> - 2017-08-17 06:10 +0200
        Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries Waiman Long <longman@redhat.com> - 2017-08-17 15:10 +0200
          RE: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries "Wangkai (Kevin,C)" <wangkai86@huawei.com> - 2017-08-18 12:10 +0200
            Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries Waiman Long <longman@redhat.com> - 2017-08-18 16:20 +0200
              RE: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries "Wangkai (Kevin,C)" <wangkai86@huawei.com> - 2017-08-21 05:30 +0200
                Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries Waiman Long <longman@redhat.com> - 2017-08-21 15:40 +0200
                RE: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries "Wangkai (Kevin,C)" <wangkai86@huawei.com> - 2017-08-22 05:10 +0200

csiph-web