From: "Odzioba, Lukasz" <lukasz.odzioba@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
"aarcange@redhat.com" <aarcange@redhat.com>,
"vdavydov@parallels.com" <vdavydov@parallels.com>,
"mingli199x@qq.com" <mingli199x@qq.com>,
"minchan@kernel.org" <minchan@kernel.org>,
"Hansen, Dave" <dave.hansen@intel.com>,
"Anaczkowski, Lukasz" <lukasz.anaczkowski@intel.com>
Subject: RE: [PATCH 1/1] mm/swap.c: flush lru_add pvecs on compound page arrival
Date: Thu, 9 Jun 2016 08:01:52 +0000 [thread overview]
Message-ID: <D6EDEBF1F91015459DB866AC4EE162CC023F8E78@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <20160608150422.GO22570@dhcp22.suse.cz>
On Wed 08-07-16 17:04:00, Michal Hocko wrote:
> I do not see how a SIGTERM would make any difference. But see below.
This is how we encounter this problem initially, by hitting ctr-c while
running parallel memory intensive workload, which ended up
not calling munmap on allocated memory.
> Is this really true? Both munmap and exit_mmap do the same
> lru_add_drain() which flushes only the local CPU cache so munmap
> shouldn't make any difference.
Damn, I forgot to escape # in pragma parallel, it should be
void main(){
#pragma parallel
{
(...)
And then yes, exit_mmap will flush just the local CPU cache, but not the
rest. This would be another way of fixing the problem, but I concluded
that it would hurt performance on short running processes like scripts
if we do it synchronously, and we will be racing with next processes if
we do it asynchronously, not tested it though.
> I believe this deserves a more explanation. What do you think about the
> following.
> "
> The primary point of the LRU add cache is to save the zone lru_lock
> contention with a hope that more pages will belong to the same zone
> and so their addition can be batched. The huge page is already a
> form of batched addition (it will add 512 worth of memory in one go)
> so skipping the batching seems like a safer option when compared to a
> potential excess in the caching which can be quite large and much
> harder to fix because lru_add_drain_all is way to expensive and
> it is not really clear what would be a good moment to call it.
>"
>
> Does this sound better?
Far better, thanks.
Lukas
--
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-06-09 8:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 14:35 Lukasz Odzioba
2016-06-08 15:04 ` Michal Hocko
2016-06-09 8:01 ` Odzioba, Lukasz [this message]
2016-06-08 15:31 ` Dave Hansen
2016-06-08 16:06 ` Michal Hocko
2016-06-08 16:34 ` Dave Hansen
2016-06-09 12:21 ` Michal Hocko
2016-06-16 18:08 ` Odzioba, Lukasz
2016-06-16 18:19 ` Michal Hocko
2016-06-16 20:03 ` Odzioba, Lukasz
2016-06-09 8:50 ` Odzioba, Lukasz
2016-06-09 15:41 ` Dave Hansen
2016-06-13 21:01 ` Odzioba, Lukasz
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=D6EDEBF1F91015459DB866AC4EE162CC023F8E78@IRSMSX103.ger.corp.intel.com \
--to=lukasz.odzioba@intel.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lukasz.anaczkowski@intel.com \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=mingli199x@qq.com \
--cc=vdavydov@parallels.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: 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