[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1456439750.15821.97.camel@redhat.com>
Date: Thu, 25 Feb 2016 17:35:50 -0500
From: Rik van Riel <riel@...hat.com>
To: Hugh Dickins <hughd@...gle.com>,
Ebru Akagunduz <ebru.akagunduz@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
kirill.shutemov@...ux.intel.com, n-horiguchi@...jp.nec.com,
aarcange@...hat.com, iamjoonsoo.kim@....com, xiexiuqi@...wei.com,
gorcunov@...nvz.org, linux-kernel@...r.kernel.org, mgorman@...e.de,
rientjes@...gle.com, vbabka@...e.cz,
aneesh.kumar@...ux.vnet.ibm.com, hannes@...xchg.org,
mhocko@...e.cz, boaz@...xistor.com, raindel@...lanox.com
Subject: Re: [RFC v5 0/3] mm: make swapin readahead to gain more thp
performance
On Wed, 2016-02-24 at 23:36 -0800, Hugh Dickins wrote:
>
> Doesn't this imply that __collapse_huge_page_swapin() will initiate
> all
> the necessary swapins for a THP, then (given the
> FAULT_FLAG_ALLOW_RETRY)
> not wait for them to complete, so khugepaged will give up on that
> extent
> and move on to another; then after another full circuit of all the
> mms
> it needs to examine, it will arrive back at this extent and build a
> THP
> from the swapins it arranged last time.
>
> Which may work well when a system transitions from busy+swappingout
> to idle+swappingin, but isn't that rather a special case? It feels
> (meaning, I've not measured at all) as if the inbetween busyish case
> will waste a lot of I/O and memory on swapins that have to be
> discarded
> again before khugepaged has made its sedate way back to slotting them
> in.
>
There may be a fairly simple way to prevent
that from becoming an issue.
When khugepaged wakes up, it can check the
PGSWPOUT or even the PGSTEAL_* stats for
the system, and skip swapin readahead if
there was swapout activity (or any page
reclaim activity?) since the time it last
ran.
That way the swapin readahead will do
its thing when transitioning from
busy + swapout to idle + swapin, but not
while the system is under permanent memory
pressure.
Am I forgetting anything obvious?
Is this too aggressive?
Not aggressive enough?
Could PGPGOUT + PGSWPOUT be a useful
in-between between just PGSWPOUT or
PGSTEAL_*?
--
All rights reversed
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists