From: "Hiremath, Vaibhav" <hvaibhav@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: RE: CPU consumption is going as high as 95% on ARM Cortex A8
Date: Mon, 21 Dec 2009 16:56:19 +0530 [thread overview]
Message-ID: <19F8576C6E063C45BE387C64729E73940449F43F65@dbde02.ent.ti.com> (raw)
In-Reply-To: <20091221105017.GB11669@n2100.arm.linux.org.uk>
> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk]
> Sent: Monday, December 21, 2009 4:20 PM
> To: Hiremath, Vaibhav
> Cc: linux-arm-kernel@lists.infradead.org; linux-mm@kvack.org; linux-
> omap@vger.kernel.org
> Subject: Re: CPU consumption is going as high as 95% on ARM Cortex
> A8
>
> On Mon, Dec 21, 2009 at 02:51:13PM +0530, Hiremath, Vaibhav wrote:
> > > On Mon, Dec 21, 2009 at 11:56:23AM +0530, Hiremath, Vaibhav
> wrote:
<snip>...
> >
> > If I comment the line completely then I am seeing
> > CPU consumption similar to when I was setting
> PAGE_READONLY/PAGE_SHARED
> > flag, which is 25-32%.
> >
> > > I suspect that will "solve" the problem - but you'll then no
> longer
> > > have
> > > DMA coherency with userspace, so its not really a solution.
>
> So it _is_ down to purely the amount of time it takes to read from a
> non-cacheable buffer. I think you need to investigate the userspace
> program and see whether it's doing anything silly - I don't think
> the
> lack of performance is a kernel problem as such.
>
[Hiremath, Vaibhav] The User space application program is pretty simple, doing nothing as such -
It is a loopback application where the captured frame is copied to display buffer -
/*Display buffer mmap*/
display_buff_info[i].start = mmap(NULL, buf.length,
PROT_READ | PROT_WRITE, MAP_SHARED, *display_fd,
buf.m.offset);
/*Capture Buffer mmap*/
capture_buff_info[i].start = mmap(NULL, buf.length,
PROT_READ | PROT_WRITE, MAP_SHARED, *capture_fd,
buf.m.offset);
while (1)
DEQUEUE BUFFER (blocking call)
for (h = 0; h < display_fmt.fmt.pix.height; h++) {
memcpy(dis_ptr, cap_ptr, display_fmt.fmt.pix.width * 2);
cap_ptr += capture_fmt.fmt.pix.width * 2;
dis_ptr += display_fmt.fmt.pix.width * 2;
}
QUEUE BUFFER
}
I will again review the application one more time and see whether I could get anything.
> How large is this buffer?
[Hiremath, Vaibhav] The buffer size is 720x480x2, and we have 3 such buffers used in queue/dequeue operation.
> What userspace program is reading from
> it?
[Hiremath, Vaibhav] Simple loopback application doing memcpy.
> Could the userspace program be unnecessarily re-reading from the
> multiple times for the same frame?
[Hiremath, Vaibhav] Let me re-visit the code for both application and driver with respect to this suggestion, but I don't think application is reading twice.
Thanks,
Vaibhav
--
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>
prev parent reply other threads:[~2009-12-21 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 5:38 Hiremath, Vaibhav
2009-12-17 6:24 ` Shilimkar, Santosh
2009-12-17 9:56 ` Russell King - ARM Linux
2009-12-21 6:26 ` Hiremath, Vaibhav
2009-12-21 9:07 ` Russell King - ARM Linux
2009-12-21 9:21 ` Hiremath, Vaibhav
2009-12-21 10:50 ` Russell King - ARM Linux
2009-12-21 11:26 ` Hiremath, Vaibhav [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=19F8576C6E063C45BE387C64729E73940449F43F65@dbde02.ent.ti.com \
--to=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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