* mem_cgroup_lru_del_before_commit_swapcache() seems broken
@ 2009-05-14 16:50 Balbir Singh
2009-05-14 16:56 ` Balbir Singh
0 siblings, 1 reply; 2+ messages in thread
From: Balbir Singh @ 2009-05-14 16:50 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki, nishimura
Cc: Andrew Morton, linux-mm, lizf, KOSAKI Motohiro
Hi, Kame,
mem_cgroup_lru_del_before_commit_swapcache() seems to be broken, here
is why
static void mem_cgroup_lru_del_before_commit_swapcache(struct page
*page)
{
unsigned long flags;
struct zone *zone = page_zone(page);
struct page_cgroup *pc = lookup_page_cgroup(page);
spin_lock_irqsave(&zone->lru_lock, flags);
/*
* Forget old LRU when this page_cgroup is *not* used. This
* Used bit
* is guarded by lock_page() because the page is SwapCache.
*/
if (!PageCgroupUsed(pc))
mem_cgroup_del_lru_list(page, page_lru(page));
...
...
void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru)
{
struct page_cgroup *pc;
struct mem_cgroup *mem;
struct mem_cgroup_per_zone *mz;
if (mem_cgroup_disabled())
return;
pc = lookup_page_cgroup(page);
/* can happen while we handle swapcache. */
if (!PageCgroupUsed(pc))
return;
In mem_cgroup_lru_del_before_commit_swapcache() we say
if (!PageCgroupused(pc))
mem_cgroup_del_lru_list()
in mem_cgroup_del_lru_list() we say
if (!PageCgroupUsed(pc))
return;
So why call mem_cgroup_del_lru_list() at all? Am I missing something.
--
Balbir
--
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] 2+ messages in thread
* Re: mem_cgroup_lru_del_before_commit_swapcache() seems broken
2009-05-14 16:50 mem_cgroup_lru_del_before_commit_swapcache() seems broken Balbir Singh
@ 2009-05-14 16:56 ` Balbir Singh
0 siblings, 0 replies; 2+ messages in thread
From: Balbir Singh @ 2009-05-14 16:56 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki, nishimura
Cc: Andrew Morton, linux-mm, lizf, KOSAKI Motohiro
* Balbir Singh <balbir@linux.vnet.ibm.com> [2009-05-14 22:20:45]:
> Hi, Kame,
>
> mem_cgroup_lru_del_before_commit_swapcache() seems to be broken, here
> is why
>
>
> static void mem_cgroup_lru_del_before_commit_swapcache(struct page
> *page)
> {
> unsigned long flags;
> struct zone *zone = page_zone(page);
> struct page_cgroup *pc = lookup_page_cgroup(page);
>
> spin_lock_irqsave(&zone->lru_lock, flags);
> /*
> * Forget old LRU when this page_cgroup is *not* used. This
> * Used bit
> * is guarded by lock_page() because the page is SwapCache.
> */
> if (!PageCgroupUsed(pc))
> mem_cgroup_del_lru_list(page, page_lru(page));
>
> ...
> ...
> void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru)
> {
> struct page_cgroup *pc;
> struct mem_cgroup *mem;
> struct mem_cgroup_per_zone *mz;
>
> if (mem_cgroup_disabled())
> return;
> pc = lookup_page_cgroup(page);
> /* can happen while we handle swapcache. */
> if (!PageCgroupUsed(pc))
> return;
>
>
> In mem_cgroup_lru_del_before_commit_swapcache() we say
> if (!PageCgroupused(pc))
> mem_cgroup_del_lru_list()
>
> in mem_cgroup_del_lru_list() we say
> if (!PageCgroupUsed(pc))
> return;
>
> So why call mem_cgroup_del_lru_list() at all? Am I missing something.
>
Please ignore, looks like a badly applied diff, let the change over in
my sources. Sorry for the noise
--
Balbir
--
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] 2+ messages in thread
end of thread, other threads:[~2009-05-14 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-14 16:50 mem_cgroup_lru_del_before_commit_swapcache() seems broken Balbir Singh
2009-05-14 16:56 ` Balbir Singh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox