* [PATCH 0/2] fixes for list_lru
@ 2013-06-26 6:29 Glauber Costa
2013-06-26 6:29 ` [PATCH 1/2] inode: move inode to a different list inside lock Glauber Costa
2013-06-26 6:29 ` [PATCH 2/2] super: fix for destroy lrus Glauber Costa
0 siblings, 2 replies; 4+ messages in thread
From: Glauber Costa @ 2013-06-26 6:29 UTC (permalink / raw)
To: linux-mm; +Cc: Andrew Morton, dchinner, Michal Hocko, Glauber Costa
Hi Andrew,
I can't find those fixes - or replies to it - anywehere.
Maybe I just forgot to hit send ? If that is the case, sorry
about that.
I am resending just in case. They are supposed to be
folded to their respective patches:
- inode-convert-inode-lru-list-to-generic-lru-list-code.patch
- list_lru-dynamically-adjust-node-arrays.patch
Thanks
Glauber Costa (2):
inode: move inode to a different list inside lock
super: fix for destroy lrus
fs/inode.c | 2 +-
fs/super.c | 3 +++
fs/xfs/xfs_buf.c | 2 +-
fs/xfs/xfs_qm.c | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)
--
1.8.2.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] inode: move inode to a different list inside lock
2013-06-26 6:29 [PATCH 0/2] fixes for list_lru Glauber Costa
@ 2013-06-26 6:29 ` Glauber Costa
2013-06-26 8:28 ` Michal Hocko
2013-06-26 6:29 ` [PATCH 2/2] super: fix for destroy lrus Glauber Costa
1 sibling, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2013-06-26 6:29 UTC (permalink / raw)
To: linux-mm; +Cc: Andrew Morton, dchinner, Michal Hocko, Glauber Costa
When removing an element from the lru, this will be done today after the lock
is released. This is a clear mistake, although we are not sure if the bugs we
are seeing are related to this. All list manipulations are done inside the
lock, and so should this one.
Signed-off-by: Glauber Costa <glommer@openvz.org>
---
fs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/inode.c b/fs/inode.c
index a2b49c8..e315c0a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -735,9 +735,9 @@ inode_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
WARN_ON(inode->i_state & I_NEW);
inode->i_state |= I_FREEING;
+ list_move(&inode->i_lru, freeable);
spin_unlock(&inode->i_lock);
- list_move(&inode->i_lru, freeable);
this_cpu_dec(nr_unused);
return LRU_REMOVED;
}
--
1.8.2.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] super: fix for destroy lrus
2013-06-26 6:29 [PATCH 0/2] fixes for list_lru Glauber Costa
2013-06-26 6:29 ` [PATCH 1/2] inode: move inode to a different list inside lock Glauber Costa
@ 2013-06-26 6:29 ` Glauber Costa
1 sibling, 0 replies; 4+ messages in thread
From: Glauber Costa @ 2013-06-26 6:29 UTC (permalink / raw)
To: linux-mm; +Cc: Andrew Morton, dchinner, Michal Hocko, Glauber Costa
This patch adds the missing call to list_lru_destroy (spotted by Li Zhong)
and moves the deletion to after the shrinker is unregistered, as correctly
spotted by Dave
Signed-off-by: Glauber Costa <glommer@openvz.org>
---
fs/super.c | 3 +++
fs/xfs/xfs_buf.c | 2 +-
fs/xfs/xfs_qm.c | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/super.c b/fs/super.c
index b79e732..09da975 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -328,6 +328,9 @@ void deactivate_locked_super(struct super_block *s)
/* caches are now gone, we can safely kill the shrinker now */
unregister_shrinker(&s->s_shrink);
+ list_lru_destroy(&s->s_dentry_lru);
+ list_lru_destroy(&s->s_inode_lru);
+
put_filesystem(fs);
put_super(s);
} else {
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 6c77431..8b2c5aa 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1591,8 +1591,8 @@ xfs_free_buftarg(
struct xfs_mount *mp,
struct xfs_buftarg *btp)
{
- list_lru_destroy(&btp->bt_lru);
unregister_shrinker(&btp->bt_shrinker);
+ list_lru_destroy(&btp->bt_lru);
if (mp->m_flags & XFS_MOUNT_BARRIER)
xfs_blkdev_issue_flush(btp);
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index c88cb68..1e3d4ed 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -889,8 +889,8 @@ xfs_qm_destroy_quotainfo(
qi = mp->m_quotainfo;
ASSERT(qi != NULL);
- list_lru_destroy(&qi->qi_lru);
unregister_shrinker(&qi->qi_shrinker);
+ list_lru_destroy(&qi->qi_lru);
if (qi->qi_uquotaip) {
IRELE(qi->qi_uquotaip);
--
1.8.2.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] inode: move inode to a different list inside lock
2013-06-26 6:29 ` [PATCH 1/2] inode: move inode to a different list inside lock Glauber Costa
@ 2013-06-26 8:28 ` Michal Hocko
0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2013-06-26 8:28 UTC (permalink / raw)
To: Glauber Costa; +Cc: linux-mm, Andrew Morton, dchinner, Glauber Costa
On Wed 26-06-13 02:29:40, Glauber Costa wrote:
> When removing an element from the lru, this will be done today after the lock
> is released. This is a clear mistake, although we are not sure if the bugs we
> are seeing are related to this. All list manipulations are done inside the
> lock, and so should this one.
>
> Signed-off-by: Glauber Costa <glommer@openvz.org>
Yes this fixed BUG_ONs triggered during my testing (e.g. BUG at mm/list_lru.c:92)
Tested-by: Michal Hocko <mhocko@suse.cz>
> ---
> fs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/inode.c b/fs/inode.c
> index a2b49c8..e315c0a 100644
> --- a/fs/inode.c
> +++ b/fs/inode.c
> @@ -735,9 +735,9 @@ inode_lru_isolate(struct list_head *item, spinlock_t *lru_lock, void *arg)
>
> WARN_ON(inode->i_state & I_NEW);
> inode->i_state |= I_FREEING;
> + list_move(&inode->i_lru, freeable);
> spin_unlock(&inode->i_lock);
>
> - list_move(&inode->i_lru, freeable);
> this_cpu_dec(nr_unused);
> return LRU_REMOVED;
> }
> --
> 1.8.2.1
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-26 8:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26 6:29 [PATCH 0/2] fixes for list_lru Glauber Costa
2013-06-26 6:29 ` [PATCH 1/2] inode: move inode to a different list inside lock Glauber Costa
2013-06-26 8:28 ` Michal Hocko
2013-06-26 6:29 ` [PATCH 2/2] super: fix for destroy lrus Glauber Costa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).