Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Issue 110273002: Refine memory accounting in ImageDecodingStore for discardable entries. (Closed)

Created:
7 years ago by Philippe
Modified:
7 years ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Refine memory accounting in ImageDecodingStore for discardable entries. Discardable entries used not to be taken into account while computing the current cache memory usage. On Android at least, clients should not use discardable memory as an unlimited resource and should not rely on the kernel only for regular eviction without having any limit. The kernel purges unpinned memory only in case of memory pressure which means that the pages used by unpinned memory are still seen by the rest of the kernel as dirty until very/(too?) late (when the ashmem shrinker kicks in due to memory pressure after regular page frame reclamation failed). Therefore unpinned pages can't be reclaimed as early as they should be unfortunately. We should not cause memory pressure ourselves in order to handle eviction especially if we already have a limit machinery in place. Ashmem used to have a soft limit of 128 regions but this is no longer the case and ashmem allocations will now always succeed (see the corresponding bug). This change emulates the previous behavior which was to only update the cache memory usage for heap-allocated entries (i.e. when more than 128 ashmem regions were being used). BUG=299828 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164285

Patch Set 1 : #

Patch Set 2 : Add |m_discardableEntriesCount| #

Patch Set 3 : Always update m_discardableEntriesCount with discardable entries #

Patch Set 4 : Store accounting information in CacheEntry #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -6 lines) Patch
M Source/platform/graphics/ImageDecodingStore.h View 1 2 3 4 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/graphics/ImageDecodingStore.cpp View 1 2 3 4 chunks +16 lines, -6 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Alpha Left Google
You should check with qinmin@ on this change. He added that exception to excluding counting ...
7 years ago (2013-12-09 18:39:25 UTC) #1
Philippe
Who do you guys think I should add as an owner?
7 years ago (2013-12-09 19:26:36 UTC) #2
Alpha Left Google
On 2013/12/09 19:26:36, Philippe wrote: > Who do you guys think I should add as ...
7 years ago (2013-12-09 19:29:43 UTC) #3
Philippe
On 2013/12/09 19:29:43, Alpha wrote: > On 2013/12/09 19:26:36, Philippe wrote: > > Who do ...
7 years ago (2013-12-11 12:10:06 UTC) #4
qinmin
This is the loading performance, not really the cache hit rate during scrolling/fling. I don't ...
7 years ago (2013-12-11 18:41:35 UTC) #5
Alpha Left Google
There is an image_decoding_benchmark, can you use that? 2013/12/11 Min Qin <qinmin@chromium.org> > This is ...
7 years ago (2013-12-11 19:41:57 UTC) #6
qinmin
that's a benchmark for decoding png/gif/webp/jpeg files, so it only evaluates the performance of libjpeg/libpng/libwebp ...
7 years ago (2013-12-11 19:49:00 UTC) #7
Philippe
Can I use a smoothness benchmark then? It should do some scrolling, right? On Wed, ...
7 years ago (2013-12-11 19:53:05 UTC) #8
Philippe
I ran the smoothness benchmarks on the top_10 page set (nexus 10) by doing: $ ...
7 years ago (2013-12-12 10:36:34 UTC) #9
qinmin
with impl side painting and image decoding on the raster thread, does jankiness still caused ...
7 years ago (2013-12-12 17:20:12 UTC) #10
google-reveman
On Thu, Dec 12, 2013 at 12:20 PM, Min Qin <qinmin@chromium.org> wrote: > with impl ...
7 years ago (2013-12-12 17:28:54 UTC) #11
Philippe
If we do way more decoding there should be less CPU available and possibly more ...
7 years ago (2013-12-12 17:39:41 UTC) #12
Philippe
And also this patch would not be set in stone obviously :) Once we have ...
7 years ago (2013-12-12 17:47:47 UTC) #13
google-reveman
On Thu, Dec 12, 2013 at 12:47 PM, Philippe Liard <pliard@chromium.org>wrote: > And also this ...
7 years ago (2013-12-12 18:53:43 UTC) #14
Philippe
If we do have shared state/mutexes between those threads (whose priorities would be different) then ...
7 years ago (2013-12-13 12:09:02 UTC) #15
google-reveman
On Fri, Dec 13, 2013 at 7:09 AM, Philippe Liard <pliard@chromium.org> wrote: > If we ...
7 years ago (2013-12-13 17:33:58 UTC) #16
Philippe
Thanks David, image_decoding is broken at the moment: https://code.google.com/p/chromium/issues/detail?id=323015 However I could run rasterize_and_record and ...
7 years ago (2013-12-17 13:01:36 UTC) #17
Philippe
FYI, I have just uploaded a patch doing what I suggested in my previous e-mail: ...
7 years ago (2013-12-17 15:55:10 UTC) #18
google-reveman
On Tue, Dec 17, 2013 at 10:55 AM, Philippe Liard <pliard@chromium.org>wrote: > FYI, I have ...
7 years ago (2013-12-17 20:58:42 UTC) #19
Philippe
Thanks David, I have just uploaded a better version of the patch and added Stephen ...
7 years ago (2013-12-18 10:31:36 UTC) #20
Philippe
Ping :)
7 years ago (2013-12-19 13:31:54 UTC) #21
Stephen White
rsLGTM
7 years ago (2013-12-19 15:31:05 UTC) #22
Philippe
Thanks Stephen! I will need you to take a look at patch set 4 though. ...
7 years ago (2013-12-19 16:49:17 UTC) #23
Stephen White
I'd prefer that Alpha take another look, then.
7 years ago (2013-12-19 17:55:20 UTC) #24
Philippe
On 2013/12/19 17:55:20, Stephen White wrote: > I'd prefer that Alpha take another look, then. ...
7 years ago (2013-12-20 13:40:38 UTC) #25
Alpha Left Google
On 2013/12/20 13:40:38, Philippe wrote: > On 2013/12/19 17:55:20, Stephen White wrote: > > I'd ...
7 years ago (2013-12-20 18:02:48 UTC) #26
Philippe
On 2013/12/20 18:02:48, Alpha wrote: > On 2013/12/20 13:40:38, Philippe wrote: > > On 2013/12/19 ...
7 years ago (2013-12-23 09:00:00 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/110273002/80001
7 years ago (2013-12-23 09:00:19 UTC) #28
commit-bot: I haz the power
7 years ago (2013-12-23 10:06:48 UTC) #29
Message was sent while issue was closed.
Change committed as 164285

Powered by Google App Engine
This is Rietveld 408576698