lkml.org 
[lkml]   [2006]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.19-rc1 full] drivers: add LCD support
Miguel Ojeda wrote:
>[...]
> Yes, I get the idea, you mean to "unmap" the page but don't remove the
> vma so a page fault is raised and nopage() op must be called again.
> May it decrease performance? (Linux /you must take care of a page
> fault calling nopage() each time you write/refresh the LCD, then
> actually use it).

Well, it's a trade-off: you pay a little extra when you write to the
display, but you pay _zero_ when you leave the display alone. And this
zero is an important concept for some applications like dynticks.

If you want to achieve deep sleep states on a laptop you might want to
be able to let it sleep for extended periods. Having a thread that wakes
up every 50 ms even when there is nothing to do is not so good in this
situation.

If your refresh rate is 20Hz you pay *at most* 20 minor faults per
second if the application is writing a lot to the display. That doesn't
sound so bad.

Even more, the application still as the option of using seek/write
instead of using mmap to avoid the page faults, but if you're writing a
lot, it might be better to take just one page fault and then write at
full speed than to pay the price of a seek/write every time.

I didn't include the locking in the description, though. If you're going
this way, you need to make sure that some of this operations are atomic
so that you don't mark the display as clean just as the userspace app is
dirtying it, leaving the physical display inconsistent until the next
refresh.

--
Paulo Marques - www.grupopie.com

"The face of a child can say it all, especially the
mouth part of the face."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-30 21:49    [W:0.073 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site