Bug 625749
| Summary: | Machine hangs with a large number of processes in prune_dcache(). dentry_stat->nr_unused < 0. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Sachin Prabhu <sprabhu> | ||||
| Component: | kernel | Assignee: | Red Hat Kernel Manager <kernel-mgr> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Red Hat Kernel QE team <kernel-qe> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 5.5 | CC: | aquini, dhowells, dwu, jbacik, jlayton, lmcilroy, rwheeler, shubham.git | ||||
| Target Milestone: | rc | Keywords: | Regression | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-08-23 13:28:29 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Sachin Prabhu
2010-08-20 10:38:25 UTC
Created attachment 439909 [details]
Patch to fix nr_unused counting. Patch by lmcilroy.
--
I think I see what's going on here - the accounting for nr_unused is getting out of whack. Most of the code in dcache.c assumes that the dentry->lru list pointers (when in use) always refer to the dentry_unused list and therefore do nr_unused++/-- when adding or removing a dentry from the list. The new changes I added overload the dentry->lru pointers to put the dentry on a private list which doesn't use the nr_unused++/-- accounting.
It's possible for a dentry to be hashed into the filesystem and be on either of these lists. When select_parent() traverses all the dentries hashed into the filesystem and finds one on an lru list it assumes it is the dentry_unused list and removes it and does nr_unused--. But due to the cond_resched_lock(dcache_lock) in prune_dcache() it's possible to expose a
dentry that's on a private lru list to select_parent(). It removes it from the
list and does an erroneous nr_unused--.
I can fix this easily by doing nr_unused accounting for the private list too.
I'll work up a patch.
--
|