Bug 184342 - bmalloc virtual allocation API should not treat memory it vends as dirty with respect to how it drives the scavenger
Summary: bmalloc virtual allocation API should not treat memory it vends as dirty with...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: bmalloc (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks: 184207
  Show dependency treegraph
 
Reported: 2018-04-05 16:47 PDT by Saam Barati
Modified: 2018-04-06 17:02 PDT (History)
17 users (show)

See Also:


Attachments
patch (4.43 KB, patch)
2018-04-05 18:35 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch for landing (4.42 KB, patch)
2018-04-06 15:39 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2018-04-05 16:47:58 PDT
The user of this API is Wasm. Currently, treating this as dirty is worse than treating it as non-dirty, since it'll make iOS think it's constantly under memory pressure. We should eventually implement something that has a more perfect idea of the total dirty memory, but let's start with this as a stop gap.
Comment 1 Saam Barati 2018-04-05 18:35:11 PDT
Created attachment 337323 [details]
patch
Comment 2 EWS Watchlist 2018-04-05 18:38:17 PDT
Attachment 337323 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/bmalloc.h:85:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/bmalloc/bmalloc/bmalloc.h:85:  The parameter name "kind" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Lam 2018-04-06 15:36:10 PDT
Comment on attachment 337323 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=337323&action=review

r=me

> Source/bmalloc/ChangeLog:13
> +        we vend as dirty, versus what we do now, which is treat is all as dirty.

typo: /treat is all/treat it all/.

> Source/bmalloc/ChangeLog:15
> +        scavenger think its under memory pressure because memory it can't free isn't

/because memory/because of memory/.
Comment 4 Saam Barati 2018-04-06 15:39:49 PDT
Created attachment 337399 [details]
patch for landing
Comment 5 EWS Watchlist 2018-04-06 15:41:50 PDT
Attachment 337399 [details] did not pass style-queue:


ERROR: Source/bmalloc/bmalloc/bmalloc.h:85:  The parameter name "object" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/bmalloc/bmalloc/bmalloc.h:85:  The parameter name "kind" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Commit Bot 2018-04-06 17:00:39 PDT
Comment on attachment 337399 [details]
patch for landing

Clearing flags on attachment: 337399

Committed r230360: <https://trac.webkit.org/changeset/230360>
Comment 7 WebKit Commit Bot 2018-04-06 17:00:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-04-06 17:02:33 PDT
<rdar://problem/39253734>