All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Knut Petersen <Knut_Petersen@t-online.de>, Andrew Morton <akpm@osdl.org>
Subject: Re: Fw: framebuffer blitting performance loss 2.6.12 -> 2.6.13-rc3
Date: Sat, 30 Jul 2005 06:45:11 +0800	[thread overview]
Message-ID: <42EAB177.6070808@gmail.com> (raw)
In-Reply-To: <9e4733910507291321609b4c48@mail.gmail.com>

Jon Smirl wrote:
> On 7/29/05, James Simmons <jsimmons@infradead.org> wrote:
>>> Thank you for your persistence.  I think I know the culprit.  Someone
>>> insisted on using memcpy in fb_pad_aligned_buffer().  I have already
>>> fixed this before, but apparently, the memcpy was brought back.  Try
>>> the attached patch and let me know.
>> Yipes, I did that. The memcpy function is suppose to be optimized for the
>> platform. See string.h in the include/asm directory. I seen for example
>> the Athlon would use the 3DNow instruction set to copy data. Something
>> is really wrong with memcpy if moving byte by byte is faster !!!!
>> Alot of drivers use memcpy. If memcpy sucks then drivers should be copying
>> byte by byte then. The question I have is this the case for non intel
>> platforms as well. Could someone run the numbers on other platforms?
> 
> memmove/memcpy is faster. memcpy is faster than memmove so use it if
> you can. But, there is a lower limit probably around 16 bytes or so
> where the loop becomes faster.  So if you know that you will always be
> copying small fragments use the loop.  The compiler can't decide

Yes, the loop copies each row of a font character.  For an 8x16 font
that's 1 byte. The maximum fontwidth is 32. A 12x22 font does not pass
through this function because the width is not a multiple of 8.  So,
currently, it's used mostly for 8x16 fonts. 

I already know people using 16x30 fonts. There are probably others bigger
than that. 

Of course, we can always use Duff's version to loop-unroll that particular
section, but even at 4 bytes, I don't know if it's worth the effort. Anyone
knows people using 32 wide fonts?

Tony



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

  reply	other threads:[~2005-07-29 22:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-15 10:39 Fw: framebuffer blitting performance loss 2.6.12 -> 2.6.13-rc3 Andrew Morton
2005-07-22  3:58 ` Antonino A. Daplas
2005-07-29  7:17   ` Andrew Morton
2005-07-29 14:54     ` Knut Petersen
2005-07-29 15:42       ` Antonino A. Daplas
2005-07-29 19:02         ` Andrew Morton
2005-07-29 19:52           ` James Simmons
2005-07-29 19:59           ` James Simmons
2005-07-29 19:51         ` James Simmons
2005-07-29 20:21           ` Jon Smirl
2005-07-29 22:45             ` Antonino A. Daplas [this message]
2005-08-03 17:29               ` James Simmons
2005-07-29 22:45           ` Luca
2005-07-29 20:10         ` Knut Petersen

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=42EAB177.6070808@gmail.com \
    --to=adaplas@gmail.com \
    --cc=Knut_Petersen@t-online.de \
    --cc=akpm@osdl.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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.