mm: account reaped page cache on inode cache pruning
Subsystems (2)
PATCH 1/1 mm: account reaped page cache on inode cache pruning
Inode cache pruning indirectly reclaims page-cache by invalidating mapping pages. Let's account them into reclaim-state to notice this progress in memory reclaimer.
--- fs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/inode.c +2 -0
@@ -692,6 +692,8 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)else __count_vm_events (PGINODESTEAL , reap);spin_unlock (&sb->s_inode_lru_lock); +if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += reap;dispose_list (&freeable); }
Andrew Morton
maintainerQuoted 13 lines · On Wed, 16 Nov 2011 17:47:13 +0300 Konstantin Khlebnikov…
Inode cache pruning indirectly reclaims page-cache by invalidating mapping pages. Let's account them into reclaim-state to notice this progress in memory reclaimer.
Signed-off-by Konstantin Khlebnikov <[email protected]>--- fs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fs/inode.c +0
-0
fs/inode.c void prune_icache_sb(struct super_block *sb, int nr_to_scan) · line 699
Quoted 8 lines
fs/inode.c +2
-0@@ -692,6 +692,8 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)else __count_vm_events (PGINODESTEAL , reap);spin_unlock (&sb->s_inode_lru_lock); +if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += reap;dispose_list (&freeable); }
hm, yes, I suppose we should.
It seems to be cheating to use the "reclaimed_slab" field for this. Perhaps it would be cleaner to add an additional field to reclaim_state for non-slab pages which were also reclaimed. That's a cosmetic thing and I guess we don't need to go that far, not sure...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 27 lines · Andrew Morton
Quoted 13 lines · On Wed, 16 Nov 2011 17:47:13 +0300 Konstantin…
Inode cache pruning indirectly reclaims page-cache by invalidating mapping pages. Let's account them into reclaim-state to notice this progress in memory reclaimer.
Signed-off-by Konstantin Khlebnikov<[email protected]>--- fs/inode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fs/inode.c +0
-0fs/inode.c void prune_icache_sb(struct super_block *sb, int nr_to_scan) · line 699
Quoted 8 lines
fs/inode.c +2
-0@@ -692,6 +692,8 @@ void prune_icache_sb(struct super_block *sb, int nr_to_scan)else __count_vm_events (PGINODESTEAL , reap);spin_unlock (&sb->s_inode_lru_lock); +if (current->reclaim_state) + current->reclaim_state->reclaimed_slab += reap;dispose_list (&freeable); }hm, yes, I suppose we should.
Quoted 4 lines
It seems to be cheating to use the "
reclaimed_slab" field for this. Perhaps it would be cleaner to add an additional field toreclaim_statefor non-slab pages which were also reclaimed. That's a cosmetic thing and I guess we don't need to go that far, not sure...
Do we really need separate on-stack reclaim_state structure with single field? Maybe replace it with single long (or even unsigned int) .reclaimed_pages field on task_struct and account reclaimed pages unconditionally.
Quoted 2 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 3 lines · On Fri, 18 Nov 2011 10:42:50 +0400 Konstantin Khlebnikov…
Do we really need separate on-stack
reclaim_statestructure with single field? Maybe replace it with single long (or even unsigned int) .reclaimed_pages field ontask_structand account reclaimed pages unconditionally.
I don't think it matters a lot - it's either a temporary pointer on the stack or a permanent space consumption in the task_struct.
The way thing are at present we can easily add new fields if needed. I don't think we've ever done that though.
Quoted 8 lines · Andrew Morton
Quoted 3 lines · On Fri, 18 Nov 2011 10:42:50 +0400 Konstantin…
Do we really need separate on-stack
reclaim_statestructure with single field? Maybe replace it with single long (or even unsigned int) .reclaimed_pages field ontask_structand account reclaimed pages unconditionally.I don't think it matters a lot - it's either a temporary pointer on the stack or a permanent space consumption in the
task_struct.
Yes, but currently task_struct has permanent pointer to reclaim_state =)
Quoted 3 lines
The way thing are at present we can easily add new fields if needed. I don't think we've ever done that though.