From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Mel Gorman <mgorman@suse.de>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH RFC] mm: lru milestones, timestamps and ages
Date: Fri, 10 May 2013 18:12:09 +0400 [thread overview]
Message-ID: <518D0039.6070006@openvz.org> (raw)
In-Reply-To: <20130510102809.GA31738@suse.de>
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@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>
prev parent reply other threads:[~2013-05-10 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 11:02 [PATCH RFC] mm: lru milestones, timestamps and ages Konstantin Khlebnikov
2013-05-03 14:07 ` Zlatko Calusic
2013-05-04 11:53 ` Konstantin Khlebnikov
2013-05-04 13:01 ` Konstantin Khlebnikov
2013-05-04 21:36 ` Zlatko Calusic
2013-05-06 19:08 ` Johannes Weiner
2013-05-04 13:32 ` Zlatko Calusic
2013-05-10 10:28 ` Mel Gorman
2013-05-10 14:12 ` Konstantin Khlebnikov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518D0039.6070006@openvz.org \
--to=khlebnikov@openvz.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).