All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-06-24  1:12 ` Gioh Kim
  0 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-06-24  1:12 UTC (permalink / raw)
  To: Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호


Hello,

I am trying to apply CMA feature for my platform.
My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
Now my platform can use CMA area effectively.

But I have many failures to allocate memory from CMA area.
I found the same situation to Laura Abbott's patch descrbing, https://lkml.org/lkml/2012/8/31/313,
that releases buffer-heads attached at CPU's LRU list.

If Joonsoo's patch is applied and/or CMA feature is applied more and more,
buffer-heads problem is going to be serious definitely.

Please look into the Laura's patch again.
I think it must be applied with Joonsoo's patch.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-06-24  1:12 ` Gioh Kim
  0 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-06-24  1:12 UTC (permalink / raw)
  To: Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호


Hello,

I am trying to apply CMA feature for my platform.
My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
Now my platform can use CMA area effectively.

But I have many failures to allocate memory from CMA area.
I found the same situation to Laura Abbott's patch descrbing, https://lkml.org/lkml/2012/8/31/313,
that releases buffer-heads attached at CPU's LRU list.

If Joonsoo's patch is applied and/or CMA feature is applied more and more,
buffer-heads problem is going to be serious definitely.

Please look into the Laura's patch again.
I think it must be applied with Joonsoo's patch.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-06-24  1:12 ` Gioh Kim
@ 2014-06-26 15:57   ` Michal Nazarewicz
  -1 siblings, 0 replies; 16+ messages in thread
From: Michal Nazarewicz @ 2014-06-26 15:57 UTC (permalink / raw)
  To: Gioh Kim, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호

On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
> Hello,
>
> I am trying to apply CMA feature for my platform.
> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
> Now my platform can use CMA area effectively.
>
> But I have many failures to allocate memory from CMA area.
> I found the same situation to Laura Abbott's patch descrbing,
> https://lkml.org/lkml/2012/8/31/313,
> that releases buffer-heads attached at CPU's LRU list.
>
> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
> buffer-heads problem is going to be serious definitely.
>
> Please look into the Laura's patch again.
> I think it must be applied with Joonsoo's patch.

Just to make sure I understood you correctly, you're saying Laura's
patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-06-26 15:57   ` Michal Nazarewicz
  0 siblings, 0 replies; 16+ messages in thread
From: Michal Nazarewicz @ 2014-06-26 15:57 UTC (permalink / raw)
  To: Gioh Kim, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호

On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
> Hello,
>
> I am trying to apply CMA feature for my platform.
> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
> Now my platform can use CMA area effectively.
>
> But I have many failures to allocate memory from CMA area.
> I found the same situation to Laura Abbott's patch descrbing,
> https://lkml.org/lkml/2012/8/31/313,
> that releases buffer-heads attached at CPU's LRU list.
>
> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
> buffer-heads problem is going to be serious definitely.
>
> Please look into the Laura's patch again.
> I think it must be applied with Joonsoo's patch.

Just to make sure I understood you correctly, you're saying Laura's
patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-06-26 15:57   ` Michal Nazarewicz
@ 2014-06-26 23:23     ` Gioh Kim
  -1 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-06-26 23:23 UTC (permalink / raw)
  To: Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호



2014-06-27 오전 12:57, Michal Nazarewicz 쓴 글:
> On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
>> Hello,
>>
>> I am trying to apply CMA feature for my platform.
>> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
>> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
>> Now my platform can use CMA area effectively.
>>
>> But I have many failures to allocate memory from CMA area.
>> I found the same situation to Laura Abbott's patch descrbing,
>> https://lkml.org/lkml/2012/8/31/313,
>> that releases buffer-heads attached at CPU's LRU list.
>>
>> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
>> buffer-heads problem is going to be serious definitely.
>>
>> Please look into the Laura's patch again.
>> I think it must be applied with Joonsoo's patch.
>
> Just to make sure I understood you correctly, you're saying Laura's
> patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?
>

Yes, it is.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-06-26 23:23     ` Gioh Kim
  0 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-06-26 23:23 UTC (permalink / raw)
  To: Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호



2014-06-27 i??i ? 12:57, Michal Nazarewicz i?' e,?:
> On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
>> Hello,
>>
>> I am trying to apply CMA feature for my platform.
>> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
>> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
>> Now my platform can use CMA area effectively.
>>
>> But I have many failures to allocate memory from CMA area.
>> I found the same situation to Laura Abbott's patch descrbing,
>> https://lkml.org/lkml/2012/8/31/313,
>> that releases buffer-heads attached at CPU's LRU list.
>>
>> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
>> buffer-heads problem is going to be serious definitely.
>>
>> Please look into the Laura's patch again.
>> I think it must be applied with Joonsoo's patch.
>
> Just to make sure I understood you correctly, you're saying Laura's
> patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?
>

Yes, it is.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-06-26 23:23     ` Gioh Kim
@ 2014-06-29 19:49       ` Laura Abbott
  -1 siblings, 0 replies; 16+ messages in thread
From: Laura Abbott @ 2014-06-29 19:49 UTC (permalink / raw)
  To: Gioh Kim, Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호, Hugh Dickins

(cc-ing Hugh since he had comments on the patch before)

On 6/26/2014 4:23 PM, Gioh Kim wrote:
> 
> 
> 2014-06-27 오전 12:57, Michal Nazarewicz 쓴 글:
>> On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
>>> Hello,
>>>
>>> I am trying to apply CMA feature for my platform.
>>> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
>>> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
>>> Now my platform can use CMA area effectively.
>>>
>>> But I have many failures to allocate memory from CMA area.
>>> I found the same situation to Laura Abbott's patch descrbing,
>>> https://lkml.org/lkml/2012/8/31/313,
>>> that releases buffer-heads attached at CPU's LRU list.
>>>
>>> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
>>> buffer-heads problem is going to be serious definitely.
>>>
>>> Please look into the Laura's patch again.
>>> I think it must be applied with Joonsoo's patch.
>>
>> Just to make sure I understood you correctly, you're saying Laura's
>> patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?
>>
> 
> Yes, it is.

I submitted this before and it was suggested that this was more
related to filesystems

http://marc.info/?l=linaro-mm-sig&m=137645770708817&w=2

I never saw more discussion and pushed this into the 'CMA hacks' pile. 
So far we've been keeping the patch out of tree and it's useful to know
that others have found the same problem. I'm willing to resubmit the
patch for further discussion.

Thanks,
Laura

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-06-29 19:49       ` Laura Abbott
  0 siblings, 0 replies; 16+ messages in thread
From: Laura Abbott @ 2014-06-29 19:49 UTC (permalink / raw)
  To: Gioh Kim, Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호, Hugh Dickins

(cc-ing Hugh since he had comments on the patch before)

On 6/26/2014 4:23 PM, Gioh Kim wrote:
> 
> 
> 2014-06-27 i??i ? 12:57, Michal Nazarewicz i?' e,?:
>> On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
>>> Hello,
>>>
>>> I am trying to apply CMA feature for my platform.
>>> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
>>> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
>>> Now my platform can use CMA area effectively.
>>>
>>> But I have many failures to allocate memory from CMA area.
>>> I found the same situation to Laura Abbott's patch descrbing,
>>> https://lkml.org/lkml/2012/8/31/313,
>>> that releases buffer-heads attached at CPU's LRU list.
>>>
>>> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
>>> buffer-heads problem is going to be serious definitely.
>>>
>>> Please look into the Laura's patch again.
>>> I think it must be applied with Joonsoo's patch.
>>
>> Just to make sure I understood you correctly, you're saying Laura's
>> patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?
>>
> 
> Yes, it is.

I submitted this before and it was suggested that this was more
related to filesystems

http://marc.info/?l=linaro-mm-sig&m=137645770708817&w=2

I never saw more discussion and pushed this into the 'CMA hacks' pile. 
So far we've been keeping the patch out of tree and it's useful to know
that others have found the same problem. I'm willing to resubmit the
patch for further discussion.

Thanks,
Laura

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-06-29 19:49       ` Laura Abbott
@ 2014-07-01  1:07         ` Gioh Kim
  -1 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-07-01  1:07 UTC (permalink / raw)
  To: Laura Abbott, Michal Nazarewicz, Marek Szyprowski, linux-mm,
	linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호, Hugh Dickins

Hi,Laura.

I have a question.

Does the __evict_bh_lru() not need bh_lru_lock()?
The get_cpu_var() has already preenpt_disable() and can prevent other thread.
But get_cpu_var cannot prevent IRQ context such like page-fault.
I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.

Is my concern correct?


2014-06-30 오전 4:49, Laura Abbott 쓴 글:
> (cc-ing Hugh since he had comments on the patch before)
>
> On 6/26/2014 4:23 PM, Gioh Kim wrote:
>>
>>
>> 2014-06-27 오전 12:57, Michal Nazarewicz 쓴 글:
>>> On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
>>>> Hello,
>>>>
>>>> I am trying to apply CMA feature for my platform.
>>>> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
>>>> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
>>>> Now my platform can use CMA area effectively.
>>>>
>>>> But I have many failures to allocate memory from CMA area.
>>>> I found the same situation to Laura Abbott's patch descrbing,
>>>> https://lkml.org/lkml/2012/8/31/313,
>>>> that releases buffer-heads attached at CPU's LRU list.
>>>>
>>>> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
>>>> buffer-heads problem is going to be serious definitely.
>>>>
>>>> Please look into the Laura's patch again.
>>>> I think it must be applied with Joonsoo's patch.
>>>
>>> Just to make sure I understood you correctly, you're saying Laura's
>>> patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?
>>>
>>
>> Yes, it is.
>
> I submitted this before and it was suggested that this was more
> related to filesystems
>
> http://marc.info/?l=linaro-mm-sig&m=137645770708817&w=2
>
> I never saw more discussion and pushed this into the 'CMA hacks' pile.
> So far we've been keeping the patch out of tree and it's useful to know
> that others have found the same problem. I'm willing to resubmit the
> patch for further discussion.
>
> Thanks,
> Laura
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-07-01  1:07         ` Gioh Kim
  0 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-07-01  1:07 UTC (permalink / raw)
  To: Laura Abbott, Michal Nazarewicz, Marek Szyprowski, linux-mm,
	linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호, Hugh Dickins

Hi,Laura.

I have a question.

Does the __evict_bh_lru() not need bh_lru_lock()?
The get_cpu_var() has already preenpt_disable() and can prevent other thread.
But get_cpu_var cannot prevent IRQ context such like page-fault.
I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.

Is my concern correct?


2014-06-30 i??i ? 4:49, Laura Abbott i?' e,?:
> (cc-ing Hugh since he had comments on the patch before)
>
> On 6/26/2014 4:23 PM, Gioh Kim wrote:
>>
>>
>> 2014-06-27 i??i ? 12:57, Michal Nazarewicz i?' e,?:
>>> On Tue, Jun 24 2014, Gioh Kim <gioh.kim@lge.com> wrote:
>>>> Hello,
>>>>
>>>> I am trying to apply CMA feature for my platform.
>>>> My kernel version, 3.10.x, is not allocating memory from CMA area so that I applied
>>>> a Joonsoo Kim's patch (https://lkml.org/lkml/2014/5/28/64).
>>>> Now my platform can use CMA area effectively.
>>>>
>>>> But I have many failures to allocate memory from CMA area.
>>>> I found the same situation to Laura Abbott's patch descrbing,
>>>> https://lkml.org/lkml/2012/8/31/313,
>>>> that releases buffer-heads attached at CPU's LRU list.
>>>>
>>>> If Joonsoo's patch is applied and/or CMA feature is applied more and more,
>>>> buffer-heads problem is going to be serious definitely.
>>>>
>>>> Please look into the Laura's patch again.
>>>> I think it must be applied with Joonsoo's patch.
>>>
>>> Just to make sure I understood you correctly, you're saying Laura's
>>> patch at <https://lkml.org/lkml/2012/8/31/313> fixes your issue?
>>>
>>
>> Yes, it is.
>
> I submitted this before and it was suggested that this was more
> related to filesystems
>
> http://marc.info/?l=linaro-mm-sig&m=137645770708817&w=2
>
> I never saw more discussion and pushed this into the 'CMA hacks' pile.
> So far we've been keeping the patch out of tree and it's useful to know
> that others have found the same problem. I'm willing to resubmit the
> patch for further discussion.
>
> Thanks,
> Laura
>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-07-01  1:07         ` Gioh Kim
@ 2014-07-01  2:02           ` Laura Abbott
  -1 siblings, 0 replies; 16+ messages in thread
From: Laura Abbott @ 2014-07-01  2:02 UTC (permalink / raw)
  To: Gioh Kim, Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호, Hugh Dickins

On 6/30/2014 6:07 PM, Gioh Kim wrote:
> Hi,Laura.
> 
> I have a question.
> 
> Does the __evict_bh_lru() not need bh_lru_lock()?
> The get_cpu_var() has already preenpt_disable() and can prevent other thread.
> But get_cpu_var cannot prevent IRQ context such like page-fault.
> I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.
> 
> Is my concern correct?
> 
> 

__evict_bh_lru is called via on_each_cpu_cond which I believe will disable irqs.
I based the code on the existing invalidate_bh_lru which did not take the bh_lru_lock
either. It's possible I missed something though.

Thanks,
Laura

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-07-01  2:02           ` Laura Abbott
  0 siblings, 0 replies; 16+ messages in thread
From: Laura Abbott @ 2014-07-01  2:02 UTC (permalink / raw)
  To: Gioh Kim, Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel
  Cc: Joonsoo Kim, Mel Gorman, 이건호, Hugh Dickins

On 6/30/2014 6:07 PM, Gioh Kim wrote:
> Hi,Laura.
> 
> I have a question.
> 
> Does the __evict_bh_lru() not need bh_lru_lock()?
> The get_cpu_var() has already preenpt_disable() and can prevent other thread.
> But get_cpu_var cannot prevent IRQ context such like page-fault.
> I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.
> 
> Is my concern correct?
> 
> 

__evict_bh_lru is called via on_each_cpu_cond which I believe will disable irqs.
I based the code on the existing invalidate_bh_lru which did not take the bh_lru_lock
either. It's possible I missed something though.

Thanks,
Laura

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-07-01  2:02           ` Laura Abbott
@ 2014-07-02  5:46             ` Andrew Morton
  -1 siblings, 0 replies; 16+ messages in thread
From: Andrew Morton @ 2014-07-02  5:46 UTC (permalink / raw)
  To: Laura Abbott
  Cc: Gioh Kim, Michal Nazarewicz, Marek Szyprowski, linux-mm,
	linux-kernel, Joonsoo Kim, Mel Gorman, 이건호,
	Hugh Dickins

On Mon, 30 Jun 2014 19:02:45 -0700 Laura Abbott <lauraa@codeaurora.org> wrote:

> On 6/30/2014 6:07 PM, Gioh Kim wrote:
> > Hi,Laura.
> > 
> > I have a question.
> > 
> > Does the __evict_bh_lru() not need bh_lru_lock()?
> > The get_cpu_var() has already preenpt_disable() and can prevent other thread.
> > But get_cpu_var cannot prevent IRQ context such like page-fault.
> > I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.
> > 
> > Is my concern correct?
> > 
> > 
> 
> __evict_bh_lru is called via on_each_cpu_cond which I believe will disable irqs.
> I based the code on the existing invalidate_bh_lru which did not take the bh_lru_lock
> either. It's possible I missed something though.

I fear that running on_each_cpu() within try_to_free_buffers() is going
to be horridly expensive in some cases.

Maybe CMA can use invalidate_bh_lrus() to shoot down everything before
trying the allocation attempt.  That should increase the success rate
greatly and doesn't burden page reclaim.  The bh LRU isn't terribly
important from a performance point of view, so emptying it occasionally
won't hurt.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-07-02  5:46             ` Andrew Morton
  0 siblings, 0 replies; 16+ messages in thread
From: Andrew Morton @ 2014-07-02  5:46 UTC (permalink / raw)
  To: Laura Abbott
  Cc: Gioh Kim, Michal Nazarewicz, Marek Szyprowski, linux-mm,
	linux-kernel, Joonsoo Kim, Mel Gorman, 이건호,
	Hugh Dickins

On Mon, 30 Jun 2014 19:02:45 -0700 Laura Abbott <lauraa@codeaurora.org> wrote:

> On 6/30/2014 6:07 PM, Gioh Kim wrote:
> > Hi,Laura.
> > 
> > I have a question.
> > 
> > Does the __evict_bh_lru() not need bh_lru_lock()?
> > The get_cpu_var() has already preenpt_disable() and can prevent other thread.
> > But get_cpu_var cannot prevent IRQ context such like page-fault.
> > I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.
> > 
> > Is my concern correct?
> > 
> > 
> 
> __evict_bh_lru is called via on_each_cpu_cond which I believe will disable irqs.
> I based the code on the existing invalidate_bh_lru which did not take the bh_lru_lock
> either. It's possible I missed something though.

I fear that running on_each_cpu() within try_to_free_buffers() is going
to be horridly expensive in some cases.

Maybe CMA can use invalidate_bh_lrus() to shoot down everything before
trying the allocation attempt.  That should increase the success rate
greatly and doesn't burden page reclaim.  The bh LRU isn't terribly
important from a performance point of view, so emptying it occasionally
won't hurt.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
  2014-07-02  5:46             ` Andrew Morton
@ 2014-07-03  7:34               ` Gioh Kim
  -1 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-07-03  7:34 UTC (permalink / raw)
  To: Andrew Morton, Laura Abbott
  Cc: Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel,
	Joonsoo Kim, Mel Gorman, 이건호,
	Hugh Dickins


Hi, Laura,

I has replaced the evict_bh_lrus(bh) with invalidate_bh_lrus() and it is working fine.
How about submit new patch with invalidate_bh_lrus()?
I would appreciate it.



2014-07-02 오후 2:46, Andrew Morton 쓴 글:
> On Mon, 30 Jun 2014 19:02:45 -0700 Laura Abbott <lauraa@codeaurora.org> wrote:
>
>> On 6/30/2014 6:07 PM, Gioh Kim wrote:
>>> Hi,Laura.
>>>
>>> I have a question.
>>>
>>> Does the __evict_bh_lru() not need bh_lru_lock()?
>>> The get_cpu_var() has already preenpt_disable() and can prevent other thread.
>>> But get_cpu_var cannot prevent IRQ context such like page-fault.
>>> I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.
>>>
>>> Is my concern correct?
>>>
>>>
>>
>> __evict_bh_lru is called via on_each_cpu_cond which I believe will disable irqs.
>> I based the code on the existing invalidate_bh_lru which did not take the bh_lru_lock
>> either. It's possible I missed something though.
>
> I fear that running on_each_cpu() within try_to_free_buffers() is going
> to be horridly expensive in some cases.
>
> Maybe CMA can use invalidate_bh_lrus() to shoot down everything before
> trying the allocation attempt.  That should increase the success rate
> greatly and doesn't burden page reclaim.  The bh LRU isn't terribly
> important from a performance point of view, so emptying it occasionally
> won't hurt.
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC] CMA page migration failure due to buffers on bh_lru
@ 2014-07-03  7:34               ` Gioh Kim
  0 siblings, 0 replies; 16+ messages in thread
From: Gioh Kim @ 2014-07-03  7:34 UTC (permalink / raw)
  To: Andrew Morton, Laura Abbott
  Cc: Michal Nazarewicz, Marek Szyprowski, linux-mm, linux-kernel,
	Joonsoo Kim, Mel Gorman, 이건호,
	Hugh Dickins


Hi, Laura,

I has replaced the evict_bh_lrus(bh) with invalidate_bh_lrus() and it is working fine.
How about submit new patch with invalidate_bh_lrus()?
I would appreciate it.



2014-07-02 i??i?? 2:46, Andrew Morton i?' e,?:
> On Mon, 30 Jun 2014 19:02:45 -0700 Laura Abbott <lauraa@codeaurora.org> wrote:
>
>> On 6/30/2014 6:07 PM, Gioh Kim wrote:
>>> Hi,Laura.
>>>
>>> I have a question.
>>>
>>> Does the __evict_bh_lru() not need bh_lru_lock()?
>>> The get_cpu_var() has already preenpt_disable() and can prevent other thread.
>>> But get_cpu_var cannot prevent IRQ context such like page-fault.
>>> I think if a page-fault occured and a file is read in IRQ context it can change cpu-lru.
>>>
>>> Is my concern correct?
>>>
>>>
>>
>> __evict_bh_lru is called via on_each_cpu_cond which I believe will disable irqs.
>> I based the code on the existing invalidate_bh_lru which did not take the bh_lru_lock
>> either. It's possible I missed something though.
>
> I fear that running on_each_cpu() within try_to_free_buffers() is going
> to be horridly expensive in some cases.
>
> Maybe CMA can use invalidate_bh_lrus() to shoot down everything before
> trying the allocation attempt.  That should increase the success rate
> greatly and doesn't burden page reclaim.  The bh LRU isn't terribly
> important from a performance point of view, so emptying it occasionally
> won't hurt.
>
>

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-07-03  7:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24  1:12 [RFC] CMA page migration failure due to buffers on bh_lru Gioh Kim
2014-06-24  1:12 ` Gioh Kim
2014-06-26 15:57 ` Michal Nazarewicz
2014-06-26 15:57   ` Michal Nazarewicz
2014-06-26 23:23   ` Gioh Kim
2014-06-26 23:23     ` Gioh Kim
2014-06-29 19:49     ` Laura Abbott
2014-06-29 19:49       ` Laura Abbott
2014-07-01  1:07       ` Gioh Kim
2014-07-01  1:07         ` Gioh Kim
2014-07-01  2:02         ` Laura Abbott
2014-07-01  2:02           ` Laura Abbott
2014-07-02  5:46           ` Andrew Morton
2014-07-02  5:46             ` Andrew Morton
2014-07-03  7:34             ` Gioh Kim
2014-07-03  7:34               ` Gioh Kim

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.