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

List:       kde-kimageshop
Subject:    Patch test
From:       Andrey Kamakin <a.kamakin () icloud ! com>
Date:       2018-07-02 16:16:32
Message-ID: d30acf8b-c8c7-47d2-b971-8b8b43ad5047 () me ! com
[Download RAW message or body]

Hi, all!

I have  implemented lock free hash table for storing tiles instead of blocking one.

What is it and why it is needed?
===================

As any other programm, Krita uses threads to speed up code execution, but there are \
places where resources synchronization is needed, mainly using locks. So lock free \
is, as name states, without using any locks to read/write data and threads are not \
sleeping on locks.

This new feature will  speed up Krita on multicore systems.


What it does?
========

Its workflow is simple, tiles are added into map and read when needed. All happens \
concurrently, without threads waiting on locks.


Configuration options
=============

There is a cmake switch which is named "USE_LOCK_FREE_HASH_TABLE". By default it is \
OFF, and if you wanna try it out, then change it for ON.


How to test?
=======

the feature is in master now, so you will hae to pull it, turn option on and \
recompile Krita.


Test plan
======

Make sure  USE_LOCK_FREE_HASH_TABLE is ON. And i guess you'll have to detect some \
changes on canvas, maybe dropped tiles or something like that. Dirty reads/writes or \
simple memory failures didn't happen so far, but who knows what can happen on your \
machine.

Any help/advices are welcome :)
-- 
Andrey Kamakin


[Attachment #3 (multipart/related)]

[Attachment #5 (unknown)]

<html><body><div><meta http-equiv="content-type" content="text/html; \
charset=utf-8"><span size="-1" data-mce-style="color: #000000; font-family: Verdana, \
Geneva, Helvetica, Arial, sans-serif; font-style: normal; font-variant-ligatures: \
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: \
2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: \
#ffffff; text-decoration-style: initial; text-decoration-color: initial;" \
style="color: #000000; font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; \
font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; \
font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: \
0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial;">Hi, all!<br><br>I have&nbsp;implemented \
lock free hash table for storing tiles instead of blocking one.<br><br>What is it and \
why it is needed?<br>===================<br><br>As any other programm, Krita uses \
threads to speed up code execution, but there are places where resources \
synchronization is needed, mainly using locks. So lock free is, as name states, \
without using any locks to read/write data and threads are not sleeping on \
locks.<br><br>This new feature will&nbsp;speed up Krita on multicore \
systems.<br><br><br>What it does?<br>========<br><br>Its workflow is simple, tiles \
are added into map and read when needed. All happens concurrently, without threads \
waiting on locks.<br><br><br>Configuration options<br>=============<br><br>There is a \
cmake switch which is named "USE_LOCK_FREE_HASH_TABLE". By default it is OFF, and if \
you wanna try it out, then change it for ON.<br><br><br>How to \
test?<br>=======<br><br>the feature is in master now, so you will hae to pull it, \
turn option on and recompile Krita.<br><br><br>Test plan<br>======<br><br>Make \
sure&nbsp;<meta http-equiv="content-type" content="text/html; charset=utf-8"><span \
style="color: #000000; font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; \
font-size: 15px; font-style: normal; font-variant-ligatures: normal; \
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; \
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: \
#ffffff; text-decoration-style: initial; text-decoration-color: initial; display: \
inline !important; float: none;" data-mce-style="color: #000000; font-family: \
Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial; display: inline !important; float: \
none;">USE_LOCK_FREE_HASH_TABLE is ON. And i guess you'll have to detect some changes \
on canvas, maybe dropped tiles or something like that. Dirty reads/writes or simple \
memory failures didn't happen so far, but who knows what can happen on your \
machine.</span></span></div><div><span size="-1" data-mce-style="color: #000000; \
font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial;" style="color: #000000; font-family: \
Verdana, Geneva, Helvetica, Arial, sans-serif; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial;"><span style="color: #000000; font-family: \
Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial; display: inline !important; float: none;" \
data-mce-style="color: #000000; font-family: Verdana, Geneva, Helvetica, Arial, \
sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; \
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; \
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: \
#ffffff; text-decoration-style: initial; text-decoration-color: initial; display: \
inline !important; float: none;"><br \
data-mce-bogus="1"></span></span></div><div><span size="-1" data-mce-style="color: \
#000000; font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-style: \
normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial;" style="color: #000000; font-family: \
Verdana, Geneva, Helvetica, Arial, sans-serif; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial;"><span style="color: #000000; font-family: \
Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 15px; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial; display: inline !important; float: none;" \
data-mce-style="color: #000000; font-family: Verdana, Geneva, Helvetica, Arial, \
sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; \
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; \
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: \
#ffffff; text-decoration-style: initial; text-decoration-color: initial; display: \
inline !important; float: none;">Any help/advices are welcome \
:)</span></span></div><div><span style="color: #000000; font-family: Verdana, Geneva, \
Helvetica, Arial, sans-serif; font-size: 13.44px; font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: \
initial; text-decoration-color: initial; display: inline !important; float: none;" \
data-mce-style="color: #000000; font-family: Verdana, Geneva, Helvetica, Arial, \
sans-serif; font-size: 13.44px; font-style: normal; font-variant-ligatures: normal; \
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; \
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: \
#ffffff; text-decoration-style: initial; text-decoration-color: initial; display: \
inline !important; float: none;"></span><pre class="moz-signature" cols="72" \
style="color: #000000; font-style: normal; font-variant-ligatures: normal; \
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; \
text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: \
0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; \
text-decoration-style: initial; text-decoration-color: initial;" \
data-mce-style="color: #000000; font-style: normal; font-variant-ligatures: normal; \
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; \
text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: \
0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; \
text-decoration-style: initial; text-decoration-color: initial;">--  Andrey \
Kamakin<br></pre></div></body></html>



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

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