]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thp: merge page pre-alloc in khugepaged_loop into khugepaged_do_scan
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Fri, 7 Sep 2012 00:23:39 +0000 (10:23 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Sep 2012 07:08:28 +0000 (17:08 +1000)
commitf36bbe2634a6da386abec6bec61912782c507045
treec54dd9423c61f0932321e7aaf173c10640691c9f
parent2bcc90cdfb26c68d14085fa097865a7668116d31
thp: merge page pre-alloc in khugepaged_loop into khugepaged_do_scan

There are two pre-alloc operations in these two function, the different is:
- it allows to sleep if page alloc fail in khugepaged_loop
- it exits immediately if page alloc fail in khugepaged_do_scan

Actually, in khugepaged_do_scan, we can allow the pre-alloc to sleep on
the first failure, then the operation in khugepaged_loop can be removed

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c