All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonsoo Kim <js1304@gmail.com>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Laura Abbott <lauraa@codeaurora.org>
Subject: Re: [PATCH v2 3/3] mm: cma: release trigger
Date: Wed, 28 Jan 2015 10:35:52 +0900	[thread overview]
Message-ID: <CAAmzW4PEMWh_dtbtbcNEn9eW6ucz-1Frt+yOgwQ=GfbyXMYONw@mail.gmail.com> (raw)
In-Reply-To: <54C7F180.1030505@oracle.com>

2015-01-28 5:13 GMT+09:00 Sasha Levin <sasha.levin@oracle.com>:
> On 01/27/2015 01:25 PM, Sasha Levin wrote:
>> On 01/27/2015 03:10 AM, Joonsoo Kim wrote:
>>>> >> +                if (mem->n <= count) {
>>>>> >> > +                     cma_release(cma, mem->p, mem->n);
>>>>> >> > +                     count -= mem->n;
>>>>> >> > +                     kfree(mem);
>>>>> >> > +             } else {
>>>>> >> > +                     cma_release(cma, mem->p, count);
>>>>> >> > +                     mem->p += count;
>>>>> >> > +                     mem->n -= count;
>>>>> >> > +                     count = 0;
>>>>> >> > +                     cma_add_to_cma_mem_list(mem);
>>>>> >> > +             }
>>>>> >> > +     }
>>> > If order_per_bit is not 0 and count used in cma_release() is
>>> > different with the count used in cma_alloc(), problem could
>>> > occur since bitmap management code can't handle that situation.
>>> >
>>> > Could we just disable this case in this testing module?
>> How should it behave then? Just free a max of 'count' pages and
>> stop beforehand if we're going to go over it?
>
> Actually, Can I just check for order_per_bit == 0 and execute it
> then? I don't want to avoid testing these paths.

Okay. I'm okay if you check order_per_bit == 0 in such case.

Thanks.

      reply	other threads:[~2015-01-28  1:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 14:26 [PATCH v2 0/3] mm: cma: debugfs access to CMA Sasha Levin
2015-01-26 14:26 ` [PATCH v2 1/3] mm: cma: debugfs interface Sasha Levin
2015-01-26 14:26 ` [PATCH v2 2/3] mm: cma: allocation trigger Sasha Levin
2015-01-27  8:06   ` Joonsoo Kim
2015-01-27 15:08     ` Sasha Levin
2015-01-28  1:34       ` Joonsoo Kim
2015-01-26 14:26 ` [PATCH v2 3/3] mm: cma: release trigger Sasha Levin
2015-01-27  8:10   ` Joonsoo Kim
2015-01-27 18:25     ` Sasha Levin
2015-01-27 20:13       ` Sasha Levin
2015-01-28  1:35         ` Joonsoo Kim [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='CAAmzW4PEMWh_dtbtbcNEn9eW6ucz-1Frt+yOgwQ=GfbyXMYONw@mail.gmail.com' \
    --to=js1304@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=lauraa@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sasha.levin@oracle.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 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.