[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28c262361001171747w450c8fd8j4daf84b72fb68e1a@mail.gmail.com>
Date: Mon, 18 Jan 2010 10:47:20 +0900
From: Minchan Kim <minchan.kim@...il.com>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 2/3][v2] vmstat: add anon_scan_ratio field to zoneinfo
Hi, KOSAKI.
On Mon, Jan 18, 2010 at 10:04 AM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
>> Hi, KOSAKI.
>>
>> On Thu, Jan 14, 2010 at 2:18 PM, KOSAKI Motohiro
>> <kosaki.motohiro@...fujitsu.com> wrote:
>> >> > Well. zone->lock and zone->lru_lock should be not taked at the same time.
>> >>
>> >> I looked over the code since I am out of office.
>> >> I can't find any locking problem zone->lock and zone->lru_lock.
>> >> Do you know any locking order problem?
>> >> Could you explain it with call graph if you don't mind?
>> >>
>> >> I am out of office by tomorrow so I can't reply quickly.
>> >> Sorry for late reponse.
>> >
>> > This is not lock order issue. both zone->lock and zone->lru_lock are
>> > hotpath lock. then, same tame grabbing might cause performance impact.
>>
>> Sorry for late response.
>>
>> Your patch makes get_anon_scan_ratio of zoneinfo stale.
>> What you said about performance impact is effective when VM pressure high.
>> I think stale data is all right normally.
>> But when VM pressure is high and we want to see the information in zoneinfo(
>> this case is what you said), stale data is not a good, I think.
>>
>> If it's not a strong argue, I want to use old get_scan_ratio
>> in get_anon_scan_ratio.
>
> please looks such function again.
>
> usally we use recent_rotated/recent_scanned ratio. then following
> decreasing doesn't change any scan-ratio meaning. it only prevent
> stat overflow.
It has a primary role that floating average as well as prevenitng overflow. :)
So, It's important.
>
> if (unlikely(reclaim_stat->recent_scanned[0] > anon / 4)) {
> spin_lock_irq(&zone->lru_lock);
> reclaim_stat->recent_scanned[0] /= 2;
> reclaim_stat->recent_rotated[0] /= 2;
> spin_unlock_irq(&zone->lru_lock);
> }
>
>
> So, I don't think current implementation can show stale data.
It can make stale data when high memory pressure happens.
>
> Thanks.
>
Moreever, I don't want to make complicate thing(ie, need_update)
than old if it doesn't have some benefit.(I think lru_lock isn't big overhead)
--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists