linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Weijie Yang <weijie.yang.kh@gmail.com>
Cc: Gregory Fong <gregory.0xf0@gmail.com>,
	linux-mm@kvack.org, Laura Abbott <lauraa@codeaurora.org>,
	iamjoonsoo.kim@lge.com,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>
Subject: Re: CMA alignment question
Date: Thu, 06 Nov 2014 13:29:42 +0100	[thread overview]
Message-ID: <xa1td290ikax.fsf@mina86.com> (raw)
In-Reply-To: <CAL1ERfMk+rhd=-MaLC2VVj61-T17_SVgKL4=Z_okhEYktFJ+tQ@mail.gmail.com>

On Thu, Nov 06 2014, Weijie Yang <weijie.yang.kh@gmail.com> wrote:
> I agree the current code doesn't handle this issue properly.
> However, I prefer to add specific usage to CMA interface rather than
> modify the cma code, Because the latter hide the issue and could waste
> memory.

cma_alloc should handle whatever alignment caller uses.  Sure, if CMA
area has smaller alignment this may lead to wasted memory, but so can
allocation with small alignment followed by allocation with big
alignment.

If you're saying that platform should try to get the CMA area aligned
such that no alignment offset happens I agree.  If you're saying that
cma_alloc should fail (to properly align) an allocation request,
I disagree.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--

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

      reply	other threads:[~2014-11-06 12:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 21:03 Gregory Fong
2014-11-04 22:27 ` Michal Nazarewicz
2014-11-05  4:18   ` Gregory Fong
2014-11-05  7:20     ` Weijie Yang
2014-11-05 22:01       ` Michal Nazarewicz
2014-11-06  1:00         ` Weijie Yang
2014-11-06 12:29           ` Michal Nazarewicz [this message]

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=xa1td290ikax.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=computersforpeace@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=lauraa@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=weijie.yang.kh@gmail.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