linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Control page reclaim granularity
@ 2012-03-08  7:34 Zheng Liu
  2012-03-08  8:39 ` Greg Thelen
  2012-03-08  9:35 ` Minchan Kim
  0 siblings, 2 replies; 33+ messages in thread
From: Zheng Liu @ 2012-03-08  7:34 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: Konstantin Khlebnikov

Hi list,

Recently we encounter a problem about page reclaim.  I abstract it in here.
The problem is that there are two different file types.  One is small index
file, and another is large data file.  The index file is mmaped into memory,
and application hope that they can be kept in memory and don't be reclaimed
too frequently.  The data file is manipulted by read/write, and they should
be reclaimed more frequently than the index file.

As previously discussion [1], Konstantin suggest me to mmap index file with
PROT_EXEC flag.  Meanwhile he provides a patch to set a flag in mm_flags to
increase the priority of mmaped file pages.  However, these solutions are
not perfect.  I review the related patches (8cab4754 and c909e993) and I
think that mmaped index file with PROT_EXEC flag is too tricky.  From the
view of applicaton programmer, index file is a regular file that stores
some data.  So they should be mmap with PROT_READ | PROT_WRITE rather than
with PROT_EXEC.  As commit log said (8cab4754), the purpose of this patch
is to keep executable code in memory to improve the response of application.
In addition, Kongstantin's patch needs to adjust the application program.
So in some cases, we cannot touch the code of application, and this patch is
useless.

I have discussed with Kongstantin about this problem and we think maybe
kernel should provide some mechanism.  For example, user can set memory
pressure priorities for vma or inode, or mmaped pages and file pages can be
reclaimed separately.  If someone has thought about it, please let me know.
Any feedbacks are welcomed.  Thank you.

Previously discussion:
1. http://marc.info/?l=linux-mm&m=132947026019538&w=2

Regards,
Zheng

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2012-03-14  7:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08  7:34 Control page reclaim granularity Zheng Liu
2012-03-08  8:39 ` Greg Thelen
2012-03-08 16:13   ` Zheng Liu
2012-03-08 16:32     ` Zhu Yanhai
2012-03-14  7:19     ` Greg Thelen
2012-03-08  9:35 ` Minchan Kim
2012-03-08 16:54   ` Zheng Liu
2012-03-12  0:28     ` Minchan Kim
2012-03-12  2:06       ` Fwd: " Zheng Liu
2012-03-12  5:19         ` Minchan Kim
2012-03-12  6:20           ` Konstantin Khlebnikov
2012-03-12  8:14             ` Zheng Liu
2012-03-12 13:42               ` Minchan Kim
2012-03-12 14:18                 ` Konstantin Khlebnikov
2012-03-13  2:48                   ` Minchan Kim
2012-03-13  4:37                     ` Konstantin Khlebnikov
2012-03-13  5:00                       ` Konstantin Khlebnikov
2012-03-13  6:30                     ` Zheng Liu
2012-03-13  6:48                       ` Zheng Liu
2012-03-13  7:21                         ` Konstantin Khlebnikov
2012-03-13  7:43                           ` Kautuk Consul
2012-03-13  7:47                             ` Kautuk Consul
2012-03-13  8:05                               ` Zheng Liu
2012-03-13  8:04                                 ` Kautuk Consul
2012-03-13  8:08                                   ` Kautuk Consul
2012-03-13  8:28                                     ` Zheng Liu
2012-03-13  8:36                                       ` Kautuk Consul
2012-03-13  9:03                                         ` Kautuk Consul
2012-03-12 15:15                 ` Zheng Liu
2012-03-13  2:51                   ` Minchan Kim
2012-03-12 14:55   ` Rik van Riel
2012-03-13  2:57     ` Minchan Kim
2012-03-13 14:57       ` Rik van Riel

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