From: Balbir Singh <bsingharora@gmail.com> To: Michal Hocko <mhocko@kernel.org> Cc: "Andrew Morton" <akpm@linux-foundation.org>, "Johannes Weiner" <hannes@cmpxchg.org>, "Vladimir Davydov" <vdavydov.dev@gmail.com>, "Marek Marczykowski-Górecki" <marmarek@mimuw.edu.pl>, linux-mm <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes Date: Fri, 2 Dec 2016 08:24:16 +1100 [thread overview] Message-ID: <CAKTCnzmZ1cwmtg+p3=3rTQJbf12VmFzWJcM+wsAdNN20v1DMDw@mail.gmail.com> (raw) In-Reply-To: <20161201132156.21450-1-mhocko@kernel.org> On Fri, Dec 2, 2016 at 12:21 AM, Michal Hocko <mhocko@kernel.org> wrote: > From: Michal Hocko <mhocko@suse.com> > > 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") > has made the workingset shadow nodes shrinker memcg aware. The > implementation is not correct though because memcg_kmem_enabled() might > become true while we are doing a global reclaim when the sc->memcg might > be NULL which is exactly what Marek has seen: > <snip> > > - if (memcg_kmem_enabled()) { > + if (sc->memcg) { > pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid, > LRU_ALL_FILE); > } else { Acked-by: Balbir Singh <bsingharora@gmail.com>
WARNING: multiple messages have this Message-ID (diff)
From: Balbir Singh <bsingharora@gmail.com> To: Michal Hocko <mhocko@kernel.org> Cc: "Andrew Morton" <akpm@linux-foundation.org>, "Johannes Weiner" <hannes@cmpxchg.org>, "Vladimir Davydov" <vdavydov.dev@gmail.com>, "Marek Marczykowski-Górecki" <marmarek@mimuw.edu.pl>, linux-mm <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes Date: Fri, 2 Dec 2016 08:24:16 +1100 [thread overview] Message-ID: <CAKTCnzmZ1cwmtg+p3=3rTQJbf12VmFzWJcM+wsAdNN20v1DMDw@mail.gmail.com> (raw) In-Reply-To: <20161201132156.21450-1-mhocko@kernel.org> On Fri, Dec 2, 2016 at 12:21 AM, Michal Hocko <mhocko@kernel.org> wrote: > From: Michal Hocko <mhocko@suse.com> > > 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") > has made the workingset shadow nodes shrinker memcg aware. The > implementation is not correct though because memcg_kmem_enabled() might > become true while we are doing a global reclaim when the sc->memcg might > be NULL which is exactly what Marek has seen: > <snip> > > - if (memcg_kmem_enabled()) { > + if (sc->memcg) { > pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid, > LRU_ALL_FILE); > } else { Acked-by: Balbir Singh <bsingharora@gmail.com> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-12-01 21:24 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-01 13:21 [PATCH] mm: workingset: fix NULL ptr in count_shadow_nodes Michal Hocko 2016-12-01 13:21 ` Michal Hocko 2016-12-01 13:32 ` Vladimir Davydov 2016-12-01 13:32 ` Vladimir Davydov 2016-12-01 21:07 ` Johannes Weiner 2016-12-01 21:07 ` Johannes Weiner 2016-12-01 21:24 ` Balbir Singh [this message] 2016-12-01 21:24 ` Balbir Singh
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAKTCnzmZ1cwmtg+p3=3rTQJbf12VmFzWJcM+wsAdNN20v1DMDw@mail.gmail.com' \ --to=bsingharora@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=hannes@cmpxchg.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=marmarek@mimuw.edu.pl \ --cc=mhocko@kernel.org \ --cc=vdavydov.dev@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.