Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1431869 > unrolled thread
| Started by | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| First post | 2016-06-27 11:40 +0200 |
| Last post | 2016-06-28 10:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 4/6] mm/cma: remove ALLOC_CMA Vlastimil Babka <vbabka@suse.cz> - 2016-06-27 11:40 +0200
Re: [PATCH v3 4/6] mm/cma: remove ALLOC_CMA Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-06-28 10:20 +0200
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2016-06-27 11:40 +0200 |
| Subject | Re: [PATCH v3 4/6] mm/cma: remove ALLOC_CMA |
| Message-ID | <rOBbk-6NY-27@gated-at.bofh.it> |
On 05/26/2016 08:22 AM, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Now, all reserved pages for CMA region are belong to the ZONE_CMA
> and it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to
> consider ALLOC_CMA at all.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---
> mm/internal.h | 3 +--
> mm/page_alloc.c | 27 +++------------------------
> 2 files changed, 4 insertions(+), 26 deletions(-)
>
[...]
> @@ -2833,10 +2827,8 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
> }
>
> #ifdef CONFIG_CMA
> - if ((alloc_flags & ALLOC_CMA) &&
> - !list_empty(&area->free_list[MIGRATE_CMA])) {
> + if (!list_empty(&area->free_list[MIGRATE_CMA]))
> return true;
> - }
> #endif
Nitpick: it would be more logical to remove the whole block in this
patch, as removing ALLOC_CMA means it's effectively false? Also less churn.
[toc] | [next] | [standalone]
| From | Joonsoo Kim <iamjoonsoo.kim@lge.com> |
|---|---|
| Date | 2016-06-28 10:20 +0200 |
| Message-ID | <rOWpr-4kK-1@gated-at.bofh.it> |
| In reply to | #1431869 |
On Mon, Jun 27, 2016 at 11:30:52AM +0200, Vlastimil Babka wrote:
> On 05/26/2016 08:22 AM, js1304@gmail.com wrote:
> >From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >
> >Now, all reserved pages for CMA region are belong to the ZONE_CMA
> >and it only serves for GFP_HIGHUSER_MOVABLE. Therefore, we don't need to
> >consider ALLOC_CMA at all.
> >
> >Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >---
> > mm/internal.h | 3 +--
> > mm/page_alloc.c | 27 +++------------------------
> > 2 files changed, 4 insertions(+), 26 deletions(-)
> >
>
> [...]
>
> >@@ -2833,10 +2827,8 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
> > }
> >
> > #ifdef CONFIG_CMA
> >- if ((alloc_flags & ALLOC_CMA) &&
> >- !list_empty(&area->free_list[MIGRATE_CMA])) {
> >+ if (!list_empty(&area->free_list[MIGRATE_CMA]))
> > return true;
> >- }
> > #endif
>
> Nitpick: it would be more logical to remove the whole block in this
> patch, as removing ALLOC_CMA means it's effectively false? Also less
> churn.
No, all freepages on ZONE_CMA is attached on area->free_list[MIGRATE_CMA].
We need to check whether there is a freepage on it or not to pass watermark
check for high-order allocation.
Thanks.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web