[Webkit-unassigned] [Bug 143652] Network Cache: Deduplicate body data

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 14 05:26:42 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=143652

--- Comment #10 from Antti Koivisto <koivisto at iki.fi> ---
(In reply to comment #4)
> Comment on attachment 250632 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=250632&action=review
> 
> > Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:155
> > +    return stat.st_nlink - 1;
> 
> Any danger of using more links to a single file than the file system
> supports?

Not really. On Apple platforms the limit seems to be 32767. If that fills then the link call will fail. We won't create new cache entries for that resource but it shouldn't be a problem otherwise.

> Don’t we have thread safety issues with the reference count of this data
> member? I don’t understand the threading restrictions on this class. Maybe
> the only function that is safe to call on another thread is
> approximateSize()?

It is ok as long as the ref count is not accessed from any other thread (and it isn't). Cache is currently a singleton so these s guaranteed to stay alive. But I'll switch to isolatedCopy() based scheme suggested by Anders which reads better.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150414/448f91bb/attachment-0001.html>


More information about the webkit-unassigned mailing list