2019-03-18 12:59:40

by Pankaj Suryawanshi

[permalink] [raw]
Subject: mm/cma.c: High latency for cma allocation

Hello,

I am facing issue of high latency in CMA allocation of large size buffer.

I am frequently allocating/deallocation CMA memory, latency of allocation is very high.

Below are the stat for allocation/deallocation latency issue.

(390100 kB), latency 29997 us
(390100 kB), latency 22957 us
(390100 kB), latency 25735 us
(390100 kB), latency 12736 us
(390100 kB), latency 26009 us
(390100 kB), latency 18058 us
(390100 kB), latency 27997 us
(16 kB), latency 560 us
(256 kB), latency 280 us
(4 kB), latency 311 us

I am using kernel 4.14.65 with android pie(9.0).

Is there any workaround or solution for this(cma_alloc latency) issue ?

Regards,
Pankaj
************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************


2019-03-18 13:09:30

by Michal Hocko

[permalink] [raw]
Subject: Re: mm/cma.c: High latency for cma allocation

On Mon 18-03-19 12:58:28, Pankaj Suryawanshi wrote:
> Hello,
>
> I am facing issue of high latency in CMA allocation of large size buffer.
>
> I am frequently allocating/deallocation CMA memory, latency of allocation is very high.
>
> Below are the stat for allocation/deallocation latency issue.
>
> (390100 kB), latency 29997 us
> (390100 kB), latency 22957 us
> (390100 kB), latency 25735 us
> (390100 kB), latency 12736 us
> (390100 kB), latency 26009 us
> (390100 kB), latency 18058 us
> (390100 kB), latency 27997 us
> (16 kB), latency 560 us
> (256 kB), latency 280 us
> (4 kB), latency 311 us
>
> I am using kernel 4.14.65 with android pie(9.0).
>
> Is there any workaround or solution for this(cma_alloc latency) issue ?

Do you have any more detailed information on where the time is spent?
E.g. migration tracepoints?

--
Michal Hocko
SUSE Labs

2019-03-18 13:31:11

by Pankaj Suryawanshi

[permalink] [raw]
Subject: Re: [External] Re: mm/cma.c: High latency for cma allocation









From: Michal Hocko <[email protected]>
Sent: 18 March 2019 18:37:57
To: Pankaj Suryawanshi
Cc: [email protected]; [email protected]; [email protected]; Kirill Tkhai
Subject: [External] Re: mm/cma.c: High latency for cma allocation


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


On Mon 18-03-19 12:58:28, Pankaj Suryawanshi wrote:
> Hello,
>
> I am facing issue of high latency in CMA allocation of large size buffer.
>
> I am frequently allocating/deallocation CMA memory, latency of allocation is very high.
>
> Below are the stat for allocation/deallocation latency issue.
>
> (390100 kB), latency 29997 us
> (390100 kB), latency 22957 us
> (390100 kB), latency 25735 us
> (390100 kB), latency 12736 us
> (390100 kB), latency 26009 us
> (390100 kB), latency 18058 us
> (390100 kB), latency 27997 us
> (16 kB), latency 560 us
> (256 kB), latency 280 us
> (4 kB), latency 311 us
>
> I am using kernel 4.14.65 with android pie(9.0).
>
> Is there any workaround or solution for this(cma_alloc latency) issue ?

Do you have any more detailed information on where the time is spent?
E.g. migration tracepoints?

Hello Michal,

I have the system(vanilla kernel) with 2GB of RAM, reserved 1GB for CMA. No swap or zram.
Sorry, I don't have information where the time is spent.
time is calculated in between cma_alloc call.
I have just cma_alloc trace information/function graph.

--
Michal Hocko
SUSE Labs

************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************