From: Joonsoo Kim <js1304@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Mel Gorman <mgorman@techsingularity.net>,
Minchan Kim <minchan@kernel.org>,
Alexander Potapenko <glider@google.com>,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/6] mm/page_owner: use stackdepot to store stacktrace
Date: Tue, 10 May 2016 16:07:14 +0900 [thread overview]
Message-ID: <CAAmzW4N1UocTRaX+K=-2OtaARPOu+WjsBLCayzr20pP15GNo4g@mail.gmail.com> (raw)
In-Reply-To: <20160504194019.GE21490@dhcp22.suse.cz>
2016-05-05 4:40 GMT+09:00 Michal Hocko <mhocko@kernel.org>:
> On Thu 05-05-16 00:30:35, Joonsoo Kim wrote:
>> 2016-05-04 18:21 GMT+09:00 Michal Hocko <mhocko@kernel.org>:
> [...]
>> > Do we really consume 512B of stack during reclaim. That sounds more than
>> > worrying to me.
>>
>> Hmm...I checked it by ./script/stackusage and result is as below.
>>
>> shrink_zone() 128
>> shrink_zone_memcg() 248
>> shrink_active_list() 176
>>
>> We have a call path that shrink_zone() -> shrink_zone_memcg() ->
>> shrink_active_list().
>> I'm not sure whether it is the deepest path or not.
>
> This is definitely not the deepest path. Slab shrinkers can take more
> but 512B is still a lot. Some call paths are already too deep when
> calling into the allocator and some of them already use GFP_NOFS to
> prevent from potentially deep callchain slab shrinkers. Anyway worth
> exploring for better solutions.
>
> And I believe it would be better to solve this in the stackdepot
> directly so other users do not have to invent their own ways around the
> same issue. I have just checked the code and set_track uses save_stack
> which does the same thing and it seems to be called from the slab
> allocator. I have missed this usage before so the problem already does
> exist. It would be unfair to request you to fix that in order to add a
> new user. It would be great if this got addressed though.
Yes, fixing it in stackdepot looks more reasonable.
Then, I will just change PAGE_OWNER_STACK_DEPTH from 64 to 16 and
leave the code as is for now. With this change, we will just consume 128B stack
and would not cause stack problem. If anyone has an objection,
please let me know.
Thanks.
--
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-05-10 7:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 5:22 [PATCH 0/6] mm/page_owner: use tackdepot " js1304
2016-05-03 5:22 ` [PATCH 1/6] mm/compaction: split freepages without holding the zone lock js1304
2016-05-10 14:56 ` Vlastimil Babka
2016-05-12 2:51 ` Joonsoo Kim
2016-05-03 5:23 ` [PATCH 2/6] mm/page_owner: initialize page owner " js1304
2016-05-10 15:00 ` Vlastimil Babka
2016-05-03 5:23 ` [PATCH 3/6] mm/page_owner: copy last_migrate_reason in copy_page_owner() js1304
2016-05-10 15:13 ` Vlastimil Babka
2016-05-12 2:58 ` Joonsoo Kim
2016-05-12 6:48 ` Vlastimil Babka
2016-05-03 5:23 ` [PATCH 4/6] mm/page_owner: introduce split_page_owner and replace manual handling js1304
2016-05-10 15:14 ` Vlastimil Babka
2016-05-03 5:23 ` [PATCH 5/6] tools/vm/page_owner: increase temporary buffer size js1304
2016-05-03 5:23 ` [PATCH 6/6] mm/page_owner: use stackdepot to store stacktrace js1304
2016-05-03 8:53 ` Michal Hocko
2016-05-04 2:14 ` Joonsoo Kim
2016-05-04 2:35 ` Joonsoo Kim
2016-05-04 9:23 ` Michal Hocko
2016-05-04 15:31 ` Joonsoo Kim
2016-05-04 9:21 ` Michal Hocko
2016-05-04 15:30 ` Joonsoo Kim
2016-05-04 15:45 ` Joonsoo Kim
2016-05-04 19:41 ` Michal Hocko
2016-05-04 19:40 ` Michal Hocko
2016-05-10 7:07 ` Joonsoo Kim [this message]
2016-05-10 8:57 ` Michal Hocko
2016-05-12 11:57 ` Vlastimil Babka
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='CAAmzW4N1UocTRaX+K=-2OtaARPOu+WjsBLCayzr20pP15GNo4g@mail.gmail.com' \
--to=js1304@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=glider@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=minchan@kernel.org \
--cc=vbabka@suse.cz \
/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