linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2 v5][resend] tmpfs not interleaving properly
@ 2012-07-09 14:46 Nathan Zimmer
  2012-07-09 14:46 ` [PATCH 1/2 v5][resend] shmem: provide vm_ops when also providing a mem policy Nathan Zimmer
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Zimmer @ 2012-07-09 14:46 UTC (permalink / raw)
  To: akpm, linux-mm, linux-kernel; +Cc: Nathan Zimmer

When tmpfs has the memory policy interleaved it always starts allocating at each
file at node 0.  When there are many small files the lower nodes fill up
disproportionately.
This patch spreads out node usage by starting files at nodes other then 0.
The tmpfs superblock grants an offset for each inode as they are created. Each
then uses that offset to proved a prefered first node for its interleave in
the shmem_interleave.

v2: passed preferred node via addr.
v3: using current->cpuset_mem_spread_rotor instead of random_node.
v4: Switching the rotor and attempting to provide an interleave function.
Also splitting the patch into two sections.
v5: Corrected unsigned to long.

Nathan Zimmer (2):
  shmem: provide vm_ops when also providing a mem policy
  tmpfs: interleave the starting node of /dev/shmem

 include/linux/mm.h       |    7 +++++++
 include/linux/shmem_fs.h |    3 +++
 mm/mempolicy.c           |    4 ++++
 mm/shmem.c               |   35 ++++++++++++++++++++++++++++++++---
 4 files changed, 46 insertions(+), 3 deletions(-)

--
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] 9+ messages in thread

end of thread, other threads:[~2012-07-25 16:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 14:46 [PATCH 0/2 v5][resend] tmpfs not interleaving properly Nathan Zimmer
2012-07-09 14:46 ` [PATCH 1/2 v5][resend] shmem: provide vm_ops when also providing a mem policy Nathan Zimmer
2012-07-09 14:46   ` [PATCH 2/2 v5][resend] tmpfs: interleave the starting node of /dev/shmem Nathan Zimmer
2012-07-11  5:50     ` Cong Wang
2012-07-23 10:58     ` Dan Carpenter
2012-07-23 19:26       ` Nathan Zimmer
2012-07-25  4:38         ` Hugh Dickins
2012-07-25 14:58           ` KOSAKI Motohiro
2012-07-25 16:15           ` Nathan Zimmer

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).