From: "Odzioba, Lukasz" <lukasz.odzioba@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Hansen, Dave" <dave.hansen@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"Shutemov, Kirill" <kirill.shutemov@intel.com>,
"Anaczkowski, Lukasz" <lukasz.anaczkowski@intel.com>
Subject: RE: mm: pages are not freed from lru_add_pvecs after process termination
Date: Thu, 5 May 2016 17:25:07 +0000 [thread overview]
Message-ID: <D6EDEBF1F91015459DB866AC4EE162CC023C3C4B@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <20160505072122.GA4386@dhcp22.suse.cz>
On Thu 05-05-16 09:21:00, Michal Hocko wrote:
> OK, it wasn't that tricky afterall. Maybe I have missed something but
> the following should work. Or maybe the async nature of flushing turns
> out to be just impractical and unreliable and we will end up skipping
> THP (or all compound pages) for pcp LRU add cache. Let's see...
Initially this issue was found on RH's 3.10.x kernel, but now I am using
4.6-rc6.
In overall it does help and under heavy load it is slightly better than the
second patch. Unfortunately I am still able to hit 10-20% oom kills with it -
(went down from 30-50%) partially due to earlier vmstat_update call
- it went up to 25-25% with this patch below:
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b4359f8..7a5ab0d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3264,17 +3264,17 @@ retry:
if (!is_thp_gfp_mask(gfp_mask) || (current->flags & PF_KTHREAD))
migration_mode = MIGRATE_SYNC_LIGHT;
- if(!vmstat_updated) {
- vmstat_updated = true;
- kick_vmstat_update();
- }
-
/* Try direct reclaim and then allocating */
page = __alloc_pages_direct_reclaim(gfp_mask, order, alloc_flags, ac,
&did_some_progress);
if (page)
goto got_pg;
+ if(!vmstat_updated) {
+ vmstat_updated = true;
+ kick_vmstat_update();
+ }
I don't quite see an uninvasive way to make sure that we drain all pvecs
before failing allocation and doing it asynchronously will race allocations
anyway - I guess.
Thanks,
Lukas
next prev parent reply other threads:[~2016-05-05 17:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 17:01 mm: pages are not freed from lru_add_pvecs after process termination Odzioba, Lukasz
2016-04-27 17:11 ` Dave Hansen
2016-04-28 14:37 ` Michal Hocko
2016-05-02 13:00 ` Michal Hocko
2016-05-04 19:41 ` Odzioba, Lukasz
2016-05-04 20:16 ` Dave Hansen
2016-05-04 20:36 ` Michal Hocko
2016-05-05 7:21 ` Michal Hocko
2016-05-05 17:25 ` Odzioba, Lukasz [this message]
2016-05-11 7:38 ` Michal Hocko
2016-05-06 15:10 ` Odzioba, Lukasz
2016-05-06 16:04 ` Dave Hansen
2016-05-11 7:53 ` Michal Hocko
2016-05-13 11:29 ` Vlastimil Babka
2016-05-13 12:05 ` Odzioba, Lukasz
2016-06-07 9:02 ` Odzioba, Lukasz
2016-06-07 11:19 ` Michal Hocko
2016-06-08 8:51 ` Odzioba, Lukasz
2016-05-02 14:39 ` Vlastimil Babka
2016-05-02 15:01 ` Kirill A. Shutemov
2016-05-02 15:13 ` Vlastimil Babka
2016-05-02 15:49 ` Dave Hansen
2016-05-02 16:02 ` Kirill A. Shutemov
2016-05-03 7:37 ` Michal Hocko
2016-05-03 10:07 ` Kirill A. Shutemov
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=D6EDEBF1F91015459DB866AC4EE162CC023C3C4B@IRSMSX103.ger.corp.intel.com \
--to=lukasz.odzioba@intel.com \
--cc=dave.hansen@intel.com \
--cc=kirill.shutemov@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lukasz.anaczkowski@intel.com \
--cc=mhocko@kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).