mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm: bdi init hooks
provide BDI constructor/destructor hooks [[email protected]: compile fix] Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dc62a30e27
commit
e0bf68ddec
19 changed files with 131 additions and 7 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/backing-dev.h>
|
||||
|
||||
/* How many pages do we try to swap or page in/out together? */
|
||||
int page_cluster;
|
||||
|
|
@ -547,6 +548,10 @@ void __init swap_setup(void)
|
|||
{
|
||||
unsigned long megs = num_physpages >> (20 - PAGE_SHIFT);
|
||||
|
||||
#ifdef CONFIG_SWAP
|
||||
bdi_init(swapper_space.backing_dev_info);
|
||||
#endif
|
||||
|
||||
/* Use a smaller cluster for small-memory machines */
|
||||
if (megs < 16)
|
||||
page_cluster = 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue