lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 5 Dec 2016 16:38:08 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
        Michal Hocko <mhocko@...e.com>,
        Johannes Weiner <hannes@...xchg.org>
Subject: linux-next: manual merge of the akpm-current tree with Linus' tree

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in:

  mm/workingset.c

between commit:

  20ab67a563f5 ("mm: workingset: fix NULL ptr in count_shadow_nodes")

from Linus' tree and commit:

  8b6983cf8ca6 ("mm: workingset: update shadow limit to reflect bigger active list")

from the akpm-current tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc mm/workingset.c
index fb1f9183d89a,02ab8746abde..000000000000
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@@ -366,16 -394,22 +394,22 @@@ static unsigned long count_shadow_nodes
  	 *
  	 * On 64-bit with 7 radix_tree_nodes per page and 64 slots
  	 * each, this will reclaim shadow entries when they consume
- 	 * ~2% of available memory:
+ 	 * ~1.8% of available memory:
  	 *
- 	 * PAGE_SIZE / radix_tree_nodes / node_entries / PAGE_SIZE
+ 	 * PAGE_SIZE / radix_tree_nodes / node_entries * 8 / PAGE_SIZE
  	 */
- 	max_nodes = pages >> (1 + RADIX_TREE_MAP_SHIFT - 3);
 -	if (memcg_kmem_enabled()) {
++	if (sc->memcg) {
+ 		cache = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid,
+ 						     LRU_ALL_FILE);
+ 	} else {
+ 		cache = node_page_state(NODE_DATA(sc->nid), NR_ACTIVE_FILE) +
+ 			node_page_state(NODE_DATA(sc->nid), NR_INACTIVE_FILE);
+ 	}
+ 	max_nodes = cache >> (RADIX_TREE_MAP_SHIFT - 3);
  
- 	if (shadow_nodes <= max_nodes)
+ 	if (nodes <= max_nodes)
  		return 0;
- 
- 	return shadow_nodes - max_nodes;
+ 	return nodes - max_nodes;
  }
  
  static enum lru_status shadow_lru_isolate(struct list_head *item,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ