All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Jeons <simon.jeons@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, mgorman@suse.de,
	kyungmin.park@samsung.com
Subject: Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory
Date: Tue, 19 Feb 2013 21:27:55 +0800	[thread overview]
Message-ID: <51237DDB.2050305@gmail.com> (raw)
In-Reply-To: <5110B05B.5070109@samsung.com>

On 02/05/2013 03:10 PM, Marek Szyprowski wrote:
> Hello,
>
> On 2/5/2013 12:34 AM, Minchan Kim wrote:
>> On Mon, Feb 04, 2013 at 11:27:05AM +0100, Marek Szyprowski wrote:
>> > The total number of low memory pages is determined as
>> > totalram_pages - totalhigh_pages, so without this patch all CMA
>> > pageblocks placed in highmem were accounted to low memory.
>>
>> So what's the end user effect? With the effect, we have to decide
>> routing it on stable.
>>
>> >
>> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> > ---
>> >  mm/page_alloc.c |    4 ++++
>> >  1 file changed, 4 insertions(+)
>> >
>> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> > index f5bab0a..6415d93 100644
>> > --- a/mm/page_alloc.c
>> > +++ b/mm/page_alloc.c
>> > @@ -773,6 +773,10 @@ void __init init_cma_reserved_pageblock(struct 
>> page *page)
>> >      set_pageblock_migratetype(page, MIGRATE_CMA);
>> >      __free_pages(page, pageblock_order);
>> >      totalram_pages += pageblock_nr_pages;
>> > +#ifdef CONFIG_HIGHMEM
>>
>> We don't need #ifdef/#endif.
>
> #ifdef is required to let this code compile when highmem is not enabled,
> becuase totalhigh_pages is defined as 0, see include/linux/highmem.h
>

Hi Marek,

1) Why can support CMA regions placed in highmem? CMA is for dma buffer, 
correct? Then how can old dma device access highmem?
2) Why there is no totalhigh_pages variable define in the case of config 
highmem?

>> > +    if (PageHighMem(page))
>> > +        totalhigh_pages += pageblock_nr_pages;
>> > +#endif
>> >  }
>> >  #endif
>> >
>
> Best regards

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Simon Jeons <simon.jeons@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, mgorman@suse.de,
	kyungmin.park@samsung.com
Subject: Re: [PATCH] mm: cma: fix accounting of CMA pages placed in high memory
Date: Tue, 19 Feb 2013 21:27:55 +0800	[thread overview]
Message-ID: <51237DDB.2050305@gmail.com> (raw)
In-Reply-To: <5110B05B.5070109@samsung.com>

On 02/05/2013 03:10 PM, Marek Szyprowski wrote:
> Hello,
>
> On 2/5/2013 12:34 AM, Minchan Kim wrote:
>> On Mon, Feb 04, 2013 at 11:27:05AM +0100, Marek Szyprowski wrote:
>> > The total number of low memory pages is determined as
>> > totalram_pages - totalhigh_pages, so without this patch all CMA
>> > pageblocks placed in highmem were accounted to low memory.
>>
>> So what's the end user effect? With the effect, we have to decide
>> routing it on stable.
>>
>> >
>> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> > ---
>> >  mm/page_alloc.c |    4 ++++
>> >  1 file changed, 4 insertions(+)
>> >
>> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> > index f5bab0a..6415d93 100644
>> > --- a/mm/page_alloc.c
>> > +++ b/mm/page_alloc.c
>> > @@ -773,6 +773,10 @@ void __init init_cma_reserved_pageblock(struct 
>> page *page)
>> >      set_pageblock_migratetype(page, MIGRATE_CMA);
>> >      __free_pages(page, pageblock_order);
>> >      totalram_pages += pageblock_nr_pages;
>> > +#ifdef CONFIG_HIGHMEM
>>
>> We don't need #ifdef/#endif.
>
> #ifdef is required to let this code compile when highmem is not enabled,
> becuase totalhigh_pages is defined as 0, see include/linux/highmem.h
>

Hi Marek,

1) Why can support CMA regions placed in highmem? CMA is for dma buffer, 
correct? Then how can old dma device access highmem?
2) Why there is no totalhigh_pages variable define in the case of config 
highmem?

>> > +    if (PageHighMem(page))
>> > +        totalhigh_pages += pageblock_nr_pages;
>> > +#endif
>> >  }
>> >  #endif
>> >
>
> Best regards


  parent reply	other threads:[~2013-02-19 13:28 UTC|newest]

Thread overview: 33+ 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 10:27 ` Marek Szyprowski
2013-02-04 12:55 ` Kyungmin Park
2013-02-04 23:06 ` Andrew Morton
2013-02-04 23:06   ` Andrew Morton
2013-02-04 23:29   ` Kyungmin Park
2013-02-04 23:29     ` Kyungmin Park
2013-02-04 23:43     ` Minchan Kim
2013-02-04 23:43       ` Minchan Kim
2013-02-04 23:52       ` Kyungmin Park
2013-02-04 23:52         ` Kyungmin Park
2013-02-05  0:40         ` Minchan Kim
2013-02-05  0:40           ` Minchan Kim
2013-02-05  8:38           ` Marek Szyprowski
2013-02-05  8:38             ` Marek Szyprowski
2013-02-05  8:47             ` Minchan Kim
2013-02-05  8:47               ` Minchan Kim
2013-02-05  8:28     ` Mel Gorman
2013-02-05  8:28       ` Mel Gorman
2013-02-05  8:56       ` Marek Szyprowski
2013-02-05  8:56         ` Marek Szyprowski
2013-02-04 23:34 ` Minchan Kim
2013-02-04 23:34   ` Minchan Kim
2013-02-05  7:10   ` Marek Szyprowski
2013-02-05  7:10     ` Marek Szyprowski
2013-02-05  7:34     ` Minchan Kim
2013-02-05  7:34       ` Minchan Kim
2013-02-19 13:27     ` Simon Jeons [this message]
2013-02-19 13:27       ` Simon Jeons
2013-02-20  2:57       ` Kyungmin Park
2013-02-20  2:57         ` Kyungmin Park
2013-02-20  5:31         ` Simon Jeons
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=51237DDB.2050305@gmail.com \
    --to=simon.jeons@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mgorman@suse.de \
    --cc=minchan@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 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.