All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Knut Petersen <Knut_Petersen@t-online.de>
Cc: linux-fbdev-devel@lists.sourceforge.net, Andrew Morton <akpm@osdl.org>
Subject: Re: Fw: framebuffer blitting performance loss 2.6.12 -> 2.6.13-rc3
Date: Fri, 29 Jul 2005 23:42:34 +0800	[thread overview]
Message-ID: <42EA4E6A.70907@gmail.com> (raw)
In-Reply-To: <42EA430C.2010405@t-online.de>

Knut Petersen wrote:
> Hi everybody!
> 
>>> I haven't seen any significant performance penalty, between 
>>> 2.6.12-rc5-mm1
>>> and 2.6.13-rc3-mm1.
>>>
>>> Based on your results, I would pinpoint the culprit to be in
>>> video/console/bitblit.c.  However, the changes there are minor, and 
>>> should not
>>> alter the peformance.
>>>
>>>
>>
>> So.. what happened here?  Is the problem still present in 2.6.13-rc4?
>>
>>
> Yes, the problem still is present in 2.6.13-rc4.
> ================================================

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.

Tony

   fbdev: Replace memcpy with for-loop when preparing bitmap

    Do not use memcpy in fb_pad_aligned_buffer. It is suboptimal because only
    a few bytes are moved at a time. Replace with a for-loop.

    From: Antonino Daplas <adaplas@pol.net>
    Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 fbmem.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -80,10 +80,12 @@ EXPORT_SYMBOL(fb_get_color_depth);
  */
 void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height)
 {
-	int i;
+	int i, j;
 
 	for (i = height; i--; ) {
-		memcpy(dst, src, s_pitch);
+		/* s_pitch is a few bytes at the most, memcpy is suboptimal */
+		for (j = 0; j < s_pitch; j++)
+			dst[j] = src[j];
 		src += s_pitch;
 		dst += d_pitch;
 	}


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

  reply	other threads:[~2005-07-29 15:42 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 [this message]
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
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=42EA4E6A.70907@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.