Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535814 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2016-12-05 06:40 +0100 |
| Last post | 2016-12-05 07:10 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
linux-next: manual merge of the akpm-current tree with Linus' tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-12-05 06:40 +0100
Re: linux-next: manual merge of the akpm-current tree with Linus' tree Michal Hocko <mhocko@kernel.org> - 2016-12-05 07:00 +0100
Re: linux-next: manual merge of the akpm-current tree with Linus' tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-12-05 07:10 +0100
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-12-05 06:40 +0100 |
| Subject | linux-next: manual merge of the akpm-current tree with Linus' tree |
| Message-ID | <sKUal-jw-1@gated-at.bofh.it> |
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,
[toc] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2016-12-05 07:00 +0100 |
| Subject | Re: linux-next: manual merge of the akpm-current tree with Linus' tree |
| Message-ID | <sKUtH-qx-5@gated-at.bofh.it> |
| In reply to | #1535814 |
On Mon 05-12-16 16:38:08, Stephen Rothwell wrote:
> 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,
FWIW this resolution is correct
> 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.
Sorry about that, I haven't noticed the conflict.
> --
> 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,
--
Michal Hocko
SUSE Labs
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-12-05 07:10 +0100 |
| Subject | Re: linux-next: manual merge of the akpm-current tree with Linus' tree |
| Message-ID | <sKUDn-JO-1@gated-at.bofh.it> |
| In reply to | #1535819 |
Hi Michal, On Mon, 5 Dec 2016 06:56:56 +0100 Michal Hocko <mhocko@kernel.org> wrote: > > FWIW this resolution is correct Thanks, good to know. > > 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. > > Sorry about that, I haven't noticed the conflict. No worries, that is what I am here for :-) -- Cheers, Stephen Rothwell
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web