Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: - large KASAN update to use arm's "software tag-based mode" - a few misc things - sh updates - ocfs2 updates - just about all of MM * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (167 commits) kernel/fork.c: mark 'stack_vm_area' with __maybe_unused memcg, oom: notify on oom killer invocation from the charge path mm, swap: fix swapoff with KSM pages include/linux/gfp.h: fix typo mm/hmm: fix memremap.h, move dev_page_fault_t callback to hmm hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization memory_hotplug: add missing newlines to debugging output mm: remove __hugepage_set_anon_rmap() include/linux/vmstat.h: remove unused page state adjustment macro mm/page_alloc.c: allow error injection mm: migrate: drop unused argument of migrate_page_move_mapping() blkdev: avoid migration stalls for blkdev pages mm: migrate: provide buffer_migrate_page_norefs() mm: migrate: move migrate_page_lock_buffers() mm: migrate: lock buffers before migrate_page_move_mapping() mm: migration: factor out code to compute expected number of page references mm, page_alloc: enable pcpu_drain with zone capability kmemleak: add config to select auto scan mm/page_alloc.c: don't call kasan_free_pages() at deferred mem init ...
This commit is contained in:
+4
-3
@@ -1131,6 +1131,7 @@ EXPORT_SYMBOL_GPL(dccp_debug);
|
||||
static int __init dccp_init(void)
|
||||
{
|
||||
unsigned long goal;
|
||||
unsigned long nr_pages = totalram_pages();
|
||||
int ehash_order, bhash_order, i;
|
||||
int rc;
|
||||
|
||||
@@ -1157,10 +1158,10 @@ static int __init dccp_init(void)
|
||||
*
|
||||
* The methodology is similar to that of the buffer cache.
|
||||
*/
|
||||
if (totalram_pages >= (128 * 1024))
|
||||
goal = totalram_pages >> (21 - PAGE_SHIFT);
|
||||
if (nr_pages >= (128 * 1024))
|
||||
goal = nr_pages >> (21 - PAGE_SHIFT);
|
||||
else
|
||||
goal = totalram_pages >> (23 - PAGE_SHIFT);
|
||||
goal = nr_pages >> (23 - PAGE_SHIFT);
|
||||
|
||||
if (thash_entries)
|
||||
goal = (thash_entries *
|
||||
|
||||
@@ -1866,7 +1866,7 @@ void __init dn_route_init(void)
|
||||
dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ;
|
||||
add_timer(&dn_route_timer);
|
||||
|
||||
goal = totalram_pages >> (26 - PAGE_SHIFT);
|
||||
goal = totalram_pages() >> (26 - PAGE_SHIFT);
|
||||
|
||||
for(order = 0; (1UL << order) < goal; order++)
|
||||
/* NOTHING */;
|
||||
|
||||
@@ -1000,7 +1000,7 @@ static int __net_init tcp_net_metrics_init(struct net *net)
|
||||
|
||||
slots = tcpmhash_entries;
|
||||
if (!slots) {
|
||||
if (totalram_pages >= 128 * 1024)
|
||||
if (totalram_pages() >= 128 * 1024)
|
||||
slots = 16 * 1024;
|
||||
else
|
||||
slots = 8 * 1024;
|
||||
|
||||
@@ -2248,6 +2248,7 @@ static __always_inline unsigned int total_extension_size(void)
|
||||
|
||||
int nf_conntrack_init_start(void)
|
||||
{
|
||||
unsigned long nr_pages = totalram_pages();
|
||||
int max_factor = 8;
|
||||
int ret = -ENOMEM;
|
||||
int i;
|
||||
@@ -2267,11 +2268,11 @@ int nf_conntrack_init_start(void)
|
||||
* >= 4GB machines have 65536 buckets.
|
||||
*/
|
||||
nf_conntrack_htable_size
|
||||
= (((totalram_pages << PAGE_SHIFT) / 16384)
|
||||
= (((nr_pages << PAGE_SHIFT) / 16384)
|
||||
/ sizeof(struct hlist_head));
|
||||
if (totalram_pages > (4 * (1024 * 1024 * 1024 / PAGE_SIZE)))
|
||||
if (nr_pages > (4 * (1024 * 1024 * 1024 / PAGE_SIZE)))
|
||||
nf_conntrack_htable_size = 65536;
|
||||
else if (totalram_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
|
||||
else if (nr_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
|
||||
nf_conntrack_htable_size = 16384;
|
||||
if (nf_conntrack_htable_size < 32)
|
||||
nf_conntrack_htable_size = 32;
|
||||
|
||||
@@ -274,14 +274,15 @@ static int htable_create(struct net *net, struct hashlimit_cfg3 *cfg,
|
||||
struct xt_hashlimit_htable *hinfo;
|
||||
const struct seq_operations *ops;
|
||||
unsigned int size, i;
|
||||
unsigned long nr_pages = totalram_pages();
|
||||
int ret;
|
||||
|
||||
if (cfg->size) {
|
||||
size = cfg->size;
|
||||
} else {
|
||||
size = (totalram_pages << PAGE_SHIFT) / 16384 /
|
||||
size = (nr_pages << PAGE_SHIFT) / 16384 /
|
||||
sizeof(struct hlist_head);
|
||||
if (totalram_pages > 1024 * 1024 * 1024 / PAGE_SIZE)
|
||||
if (nr_pages > 1024 * 1024 * 1024 / PAGE_SIZE)
|
||||
size = 8192;
|
||||
if (size < 16)
|
||||
size = 16;
|
||||
|
||||
+4
-3
@@ -1368,6 +1368,7 @@ static __init int sctp_init(void)
|
||||
int status = -EINVAL;
|
||||
unsigned long goal;
|
||||
unsigned long limit;
|
||||
unsigned long nr_pages = totalram_pages();
|
||||
int max_share;
|
||||
int order;
|
||||
int num_entries;
|
||||
@@ -1426,10 +1427,10 @@ static __init int sctp_init(void)
|
||||
* The methodology is similar to that of the tcp hash tables.
|
||||
* Though not identical. Start by getting a goal size
|
||||
*/
|
||||
if (totalram_pages >= (128 * 1024))
|
||||
goal = totalram_pages >> (22 - PAGE_SHIFT);
|
||||
if (nr_pages >= (128 * 1024))
|
||||
goal = nr_pages >> (22 - PAGE_SHIFT);
|
||||
else
|
||||
goal = totalram_pages >> (24 - PAGE_SHIFT);
|
||||
goal = nr_pages >> (24 - PAGE_SHIFT);
|
||||
|
||||
/* Then compute the page order for said goal */
|
||||
order = get_order(goal);
|
||||
|
||||
Reference in New Issue
Block a user