From: Minchan Kim <minchan@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kmpark@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
mgorman@suse.de
Subject: Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory
Date: Tue, 5 Feb 2013 17:47:05 +0900 [thread overview]
Message-ID: <20130205084705.GC11197@blaptop> (raw)
In-Reply-To: <5110C506.2060209@samsung.com>
On Tue, Feb 05, 2013 at 09:38:30AM +0100, Marek Szyprowski wrote:
> Hello,
>
> On 2/5/2013 1:40 AM, Minchan Kim wrote:
>
> ...
>
> >> Previous time, it's not fully tested and now we checked it with
> >> highmem support patches.
> >
> >I get it. Sigh. then [1] inline attached below wan't good.
> >We have to code like this?
> >
> >[1] 6a6dccba, mm: cma: don't replace lowmem pages with highmem
> >
> >diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> >index b97cf12..0707e0a 100644
> >--- a/mm/page_alloc.c
> >+++ b/mm/page_alloc.c
> >@@ -5671,11 +5671,10 @@ static struct page *
> > __alloc_contig_migrate_alloc(struct page *page, unsigned long private,
> > int **resultp)
> > {
> >- gfp_t gfp_mask = GFP_USER | __GFP_MOVABLE;
> >-
> >- if (PageHighMem(page))
> >- gfp_mask |= __GFP_HIGHMEM;
> >-
> >+ gfp_t gfp_mask = GFP_HIGHUSER_MOVABLE;
> >+ struct address_space *mapping = page_mapping(page);
> >+ if (mapping)
> >+ gfp_mask = mapping_gfp_mask(mapping);
> > return alloc_page(gfp_mask);
> > }
>
> Am I right that this code will allocate more pages from himem? Old approach
Yes.
> never migrate lowmem page to himem, what is now possible as gfp mask
> is always
> taken from mapping_gfp flags. I only wonder if forcing GFP_HIGHUSER_MOVABLE
-ENOPARSE. What is not possbile ~~ take from mapping_gfp flags.
Could you clarify your statement?
> for pages without the mapping is a correct. Shouldn't we use avoid himem in
CMA pages is for pages for user, NOT kernel so HIGHUSER_MOVABLE makes sense.
> such case?
I don't get it. :(
We have to recomment use of highmem for user space pages.
Am I missing something?
Sorry, I should go out of office now so forgive my late response.
>
> Best regards
> --
> Marek Szyprowski
> Samsung Poland R&D Center
>
>
> --
> 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>
--
Kind regards,
Minchan Kim
--
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:[~2013-02-05 8:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 10:27 [PATCH] mm: cma: fix accounting of CMA pages placed in high memory Marek Szyprowski
2013-02-04 12:55 ` Kyungmin Park
2013-02-04 23:06 ` Andrew Morton
2013-02-04 23:29 ` Kyungmin Park
2013-02-04 23:43 ` Minchan Kim
2013-02-04 23:52 ` Kyungmin Park
2013-02-05 0:40 ` Minchan Kim
2013-02-05 8:38 ` Marek Szyprowski
2013-02-05 8:47 ` Minchan Kim [this message]
2013-02-05 8:28 ` Mel Gorman
2013-02-05 8:56 ` Marek Szyprowski
2013-02-04 23:34 ` Minchan Kim
2013-02-05 7:10 ` Marek Szyprowski
2013-02-05 7:34 ` Minchan Kim
2013-02-19 13:27 ` Simon Jeons
2013-02-20 2:57 ` Kyungmin Park
2013-02-20 5:31 ` Simon Jeons
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=20130205084705.GC11197@blaptop \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=kmpark@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
/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).