forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swap_configuration.h
38 lines (29 loc) · 1.51 KB
/
swap_configuration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_MEMORY_SWAP_CONFIGURATION_H_
#define CHROMEOS_MEMORY_SWAP_CONFIGURATION_H_
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "chromeos/chromeos_export.h"
namespace chromeos {
// Controls the ChromeOS /proc/sys/vm/min_filelist_kb swap tunable, if the
// feature is enabled it will use the value (in MB) from the feature param.
extern const base::Feature kCrOSTuneMinFilelist;
extern const base::FeatureParam<int> kCrOSTuneMinFilelistMb;
// Controls the ChromeOS /sys/kernel/mm/chromeos-low_mem/ram_vs_swap_weight
// tunable. The number is a zero or positive number which represents how well
// zram based swap is compressed in physical ram.
extern const base::Feature kCrOSTuneRamVsSwapWeight;
extern const base::FeatureParam<int> kCrOSRamVsSwapWeight;
// Controls the ChromeOS /proc/sys/vm/extra_free_kbytes tunable. The number is a
// zero or positive number which represents how much additional memory the
// kernel will keep around. Raising this number has the affect of causing
// swapping earlier.
extern const base::Feature kCrOSTuneExtraFree;
extern const base::FeatureParam<int> kCrOSExtraFreeMb;
// Configure swap will configure any swap related experiments that this user may
// be opted into.
CHROMEOS_EXPORT void ConfigureSwap();
} // namespace chromeos
#endif // CHROMEOS_MEMORY_SWAP_CONFIGURATION_H_