mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heesub Shin <heesub.shin@samsung.com>
To: Pintu Kumar <pintu.k@samsung.com>,
	akpm@linux-foundation.org, gregkh@linuxfoundation.org,
	john.stultz@linaro.org, rebecca@android.com, ccross@android.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: pintu_agarwal@yahoo.com, vishnu.ps@samsung.com, iqbal.ams@samsung.com
Subject: Re: [PATCH 1/1] [ion]: system-heap use PAGE_ALLOC_COSTLY_ORDER for high order
Date: Mon, 06 Oct 2014 19:27:59 +0900	[thread overview]
Message-ID: <54326EAF.8060004@samsung.com> (raw)
In-Reply-To: <1412584263-22531-1-git-send-email-pintu.k@samsung.com>

Hello Kumar,

On 10/06/2014 05:31 PM, Pintu Kumar wrote:
> The Android ion_system_heap uses allocation fallback mechanism
> based on 8,4,0 order pages available in the system.
> It changes gfp flags based on higher order allocation request.
> This higher order value is hard-coded as 4, instead of using
> the system defined higher order value.
> Thus replacing this hard-coded value with PAGE_ALLOC_COSTLY_ORDER
> which is defined as 3.
> This will help mapping the higher order request in system heap with
> the actual allocation request.

Quite reasonable.

Reviewed-by: Heesub Shin <heesub.shin@samsung.com>

BTW, Anyone knows how the allocation order (8,4 and 0) was decided? I 
think only Google guys might know the answer.

regards,
heesub

>
> Signed-off-by: Pintu Kumar <pintu.k@samsung.com>
> ---
>   drivers/staging/android/ion/ion_system_heap.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
> index da2a63c..e6c393f 100644
> --- a/drivers/staging/android/ion/ion_system_heap.c
> +++ b/drivers/staging/android/ion/ion_system_heap.c
> @@ -65,7 +65,7 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
>   	} else {
>   		gfp_t gfp_flags = low_order_gfp_flags;
>
> -		if (order > 4)
> +		if (order > PAGE_ALLOC_COSTLY_ORDER)
>   			gfp_flags = high_order_gfp_flags;
>   		page = alloc_pages(gfp_flags | __GFP_COMP, order);
>   		if (!page)
> @@ -276,7 +276,7 @@ struct ion_heap *ion_system_heap_create(struct ion_platform_heap *unused)
>   		struct ion_page_pool *pool;
>   		gfp_t gfp_flags = low_order_gfp_flags;
>
> -		if (orders[i] > 4)
> +		if (orders[i] > PAGE_ALLOC_COSTLY_ORDER)
>   			gfp_flags = high_order_gfp_flags;
>   		pool = ion_page_pool_create(gfp_flags, orders[i]);
>   		if (!pool)
>

  reply	other threads:[~2014-10-06 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06  8:31 Pintu Kumar
2014-10-06 10:27 ` Heesub Shin [this message]
2014-10-06 14:07   ` Laura Abbott

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=54326EAF.8060004@samsung.com \
    --to=heesub.shin@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=ccross@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=iqbal.ams@samsung.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pintu.k@samsung.com \
    --cc=pintu_agarwal@yahoo.com \
    --cc=rebecca@android.com \
    --cc=vishnu.ps@samsung.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

Powered by JetHome