Mel Gorman wrote:
On Tue, Apr 30, 2013 at 03:02:14PM +0400, Konstantin Khlebnikov wrote:
+static inline bool
+is_lru_milestone(struct lruvec *lruvec, struct list_head *list)
+{
+ return unlikely(list>=&lruvec->milestones[0][0].lru&&
+ list< &lruvec->milestones[NR_EVICTABLE_LRU_LISTS]
+ [NR_LRU_MILESTONES].lru);
+}
+
Not reviewing properly yet, just taking a quick look out of interest but
this check may be delicate. 32-bit x86 machines start the kernel direct
mapping at 0xC0000000 so milestones[0][0].lru will have some value betewen
0xC0000000 and 0xFFFFFFFF. HZ=250 on my distro config so after 0xC0000000
jiffies or a bit over 149 days of uptime, it looks like there will be a
window where LRU entries look like milestones. If I'm right, that is
bound to cause problems.
Nope. There is no such dangerous magic. This function compares only pointers.
List heads in page LRU list can be either &page->lru or &lru_milestone->lru.
Since milestones are embedded into struct lruvec we can separate them in this way.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>