linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Zhao Qiang-B45475 <qiang.zhao@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"Xie Xiaobo-R63061" <X.Xie@freescale.com>
Subject: Re: [PATCH 2/2] rheap: move rheap.c from arch/powerpc/lib/ to lib/
Date: Thu, 9 Jul 2015 01:09:03 -0500	[thread overview]
Message-ID: <1436422143.2658.121.camel@freescale.com> (raw)
In-Reply-To: <SN1PR0301MB1550CBF05BAD7AB19EC244519B900@SN1PR0301MB1550.namprd03.prod.outlook.com>

On Thu, 2015-07-09 at 01:05 -0500, Zhao Qiang-B45475 wrote:
> On Wed, 2015-07-09 at 11:51 -0500, Wood Scott wrote:
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Thursday, July 09, 2015 11:51 AM
> > To: Zhao Qiang-B45475
> > Cc: linuxppc-dev@lists.ozlabs.org; Xie Xiaobo-R63061
> > Subject: Re: [PATCH 2/2] rheap: move rheap.c from arch/powerpc/lib/ to
> > lib/
> > 
> > That doesn't involve a different alignment for each allocation.  It uses
> > the same alignment for all of them, and the alignment that cpm_common.c
> > provides to rh_init() is 1 byte.
> > 
> > ...but sigh, cpm_muram_alloc() is changing cpm_muram_info.alignment
> > behind the rheap code's back.  Despite the existence of rh_alloc_align().
> > 
> > So yes, add aligned allocation functionality to genalloc, but don't
> > duplicate
> > gen_pool_alloc() to do so.  Instead, rename gen_pool_alloc() to
> > gen_pool_alloc_align() with an alignment parameter (also modifying the
> > algo function to take an alignment arg, which
> > gen_pool_first_fit_order_align() would ignore), and provide a
> 
> Here, I don’t understand how to handle the algo In your mind. 
> Can you explain more detailly?

The algorithms would be unchanged except that they would receive a new 
alignment (or alignment mask) parameter.  gen_pool_first_fit_order_align() 
would ignore it, but the other algorithms would pass it through to the bitmap 
allocator.

-Scott

  reply	other threads:[~2015-07-09  6:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27  9:11 [PATCH 1/2] qe_common: add qe common functions into qe_common.c Zhao Qiang
2015-05-27  9:12 ` [PATCH 2/2] rheap: move rheap.c from arch/powerpc/lib/ to lib/ Zhao Qiang
2015-05-27 17:36   ` Scott Wood
2015-06-04  5:56     ` Zhao Qiang
2015-06-04  6:13       ` Scott Wood
2015-06-04  9:27         ` Zhao Qiang
2015-06-04 22:40           ` Scott Wood
2015-07-08  2:54             ` Zhao Qiang
2015-07-08  2:55               ` Scott Wood
2015-07-08  3:26                 ` Zhao Qiang
2015-07-08  3:27                   ` Scott Wood
2015-07-08  7:25                     ` Zhao Qiang
2015-07-08 18:58                       ` Scott Wood
2015-07-09  3:18                         ` Zhao Qiang
2015-07-09  3:50                           ` Scott Wood
2015-07-09  6:05                             ` Zhao Qiang
2015-07-09  6:09                               ` Scott Wood [this message]
2015-07-09  6:14                                 ` Zhao Qiang
2015-07-09  6:47                                   ` Scott Wood
2015-05-27 22:51 ` [PATCH 1/2] qe_common: add qe common functions into qe_common.c Scott Wood

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=1436422143.2658.121.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=X.Xie@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=qiang.zhao@freescale.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;
as well as URLs for NNTP newsgroup(s).