[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Review Request: DamageNotify handling
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2011-07-10 8:52:54
Message-ID: 20110710085254.24270.6049 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On July 9, 2011, 1:16 p.m., Martin Gr=C3=A4=C3=9Flin wrote:
> > sounds very promising.
> =

> Thomas L=C3=BCbking wrote:
>     Don't be too eager. Heavily updating clients will still suck CPU on t=
heir own as well as on the X11 process.
>     So if you remove load from kwin it will just go there :-(
> =

> Thomas L=C3=BCbking wrote:
>     http://commits.kde.org/kde-workspace/62a43652355613a696f1037ad81d98ae=
c5312d01

Could it be that this change is causing the screen to be black when startin=
g kwin till you have the first repaint? It's just that I see this behavior =
since I recompiled today.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101861/#review4551
-----------------------------------------------------------


On July 5, 2011, 10:32 p.m., Thomas L=C3=BCbking wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101861/
> -----------------------------------------------------------
> =

> (Updated July 5, 2011, 10:32 p.m.)
> =

> =

> Review request for kwin.
> =

> =

> Summary
> -------
> =

> Client updates are expensiv to the compositor.
> While KWin limits the framerate (vsync or not) the client still can send =
a bazillion damage notifications between two frames w/o any gain on screen.
> =

> So far the handling is pretty expensive.
> a) KWin would handle the damage notification even though the window is st=
ill tagged completely damaged.
> b) It uses QRegion operations, though we know that the rects in the damag=
e notification won't overlap (and the region is added rectwise, causing mor=
e QRegion ops anyway)
> c) it allows up to 200 rects but doesn't care about the damage ratio befo=
re the window is "just completely damaged"
> =

> The patch changes this.
> =

> Target are high frequently updating clients, possibly using XShape.
> @Martin: do you recall that Java IDE you confirmed to perform horribly un=
der composition? Can you test it against this patch?
> Are there still known clients using XShape for text DnD?
> =

> I tried (and actually figured the problem) phoronixing KWin against Mutte=
r (wanted to know about all that FUD) and figured that Mutter did actually =
"better" until i turned off the resize handle (Bespin, but Oxygen has a com=
parable thing) which causes glxgears to damage in 12 rects. ("only")
> =

> In consequence of the patch the kwin CPU usage dropped from constant over=
all 25% to constant 15% (and the 10% being distributed to glxgears and X11)=
 - ie. a 40% improvement (and higher framerates!!)
> =

> Yes, i know that glxgears is special, no i'm not optimizing towards phoro=
nix results, yes Martin, i've read the article - not that it was new to me =
;-)
> =

> =

> Diffs
> -----
> =

>   kwin/composite.cpp 8c87984 =

>   kwin/toplevel.h 35f1bb5 =

> =

> Diff: http://git.reviewboard.kde.org/r/101861/diff
> =

> =

> Testing
> -------
> =

> Yes, phoronixing.
> =

> =

> Thanks,
> =

> Thomas
> =

>


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/101861/">http://git.reviewboard.kde.org/r/101861/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On July 9th, 2011, 1:16 p.m., <b>Martin \
Gräßlin</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">sounds very promising.</pre>  </blockquote>




 <p>On July 9th, 2011, 4:22 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Don&#39;t be too eager. \
Heavily updating clients will still suck CPU on their own as well as on the X11 \
process. So if you remove load from kwin it will just go there :-(</pre>
 </blockquote>





 <p>On July 9th, 2011, 10:19 p.m., <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">http://commits.kde.org/kde-workspace/62a43652355613a696f1037ad81d98aec5312d01</pre>
  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Could it be that this \
change is causing the screen to be black when starting kwin till you have the first \
repaint? It&#39;s just that I see this behavior since I recompiled today.</pre> <br \
/>








<p>- Martin</p>


<br />
<p>On July 5th, 2011, 10:32 p.m., Thomas Lübking wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated July 5, 2011, 10:32 p.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Client updates are expensiv to the compositor. While KWin limits the \
framerate (vsync or not) the client still can send a bazillion damage notifications \
between two frames w/o any gain on screen.

So far the handling is pretty expensive.
a) KWin would handle the damage notification even though the window is still tagged \
completely damaged. b) It uses QRegion operations, though we know that the rects in \
the damage notification won&#39;t overlap (and the region is added rectwise, causing \
more QRegion ops anyway) c) it allows up to 200 rects but doesn&#39;t care about the \
damage ratio before the window is &quot;just completely damaged&quot;

The patch changes this.

Target are high frequently updating clients, possibly using XShape.
@Martin: do you recall that Java IDE you confirmed to perform horribly under \
composition? Can you test it against this patch? Are there still known clients using \
XShape for text DnD?

I tried (and actually figured the problem) phoronixing KWin against Mutter (wanted to \
know about all that FUD) and figured that Mutter did actually &quot;better&quot; \
until i turned off the resize handle (Bespin, but Oxygen has a comparable thing) \
which causes glxgears to damage in 12 rects. (&quot;only&quot;)

In consequence of the patch the kwin CPU usage dropped from constant overall 25% to \
constant 15% (and the 10% being distributed to glxgears and X11) - ie. a 40% \
improvement (and higher framerates!!)

Yes, i know that glxgears is special, no i&#39;m not optimizing towards phoronix \
results, yes Martin, i&#39;ve read the article - not that it was new to me ;-)</pre>  \
</td>  </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Yes, phoronixing.</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/composite.cpp <span style="color: grey">(8c87984)</span></li>

 <li>kwin/toplevel.h <span style="color: grey">(35f1bb5)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/101861/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic