lkml.org 
[lkml]   [2021]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 06/11] mm: support GUP-triggered unsharing via FAULT_FLAG_UNSHARE (!hugetlb)
On Sat, Dec 18, 2021 at 04:52:13AM +0000, Nadav Amit wrote:
> Take for instance memcached and assume you overcommit memory with a very fast
> swap (e.g., pmem, zram, perhaps even slower). Now, it turns out memcached
> often accesses a page first for read and shortly after for write. I
> encountered, in a similar scenario, that the page reference that
> lru_cache_add() takes during the first faultin event (for read), causes a COW
> on a write page-fault that happens shortly after [1]. So on memcached I
> assume this would also trigger frequent unnecessary COWs.

Why are we comparing page_count() against 1 and not 1 + PageLRU(page)?
Having a reference from the LRU should be expected. Is it because of
some race that we'd need to take the page lock to protect against?

\
 
 \ /
  Last update: 2021-12-18 06:04    [W:0.077 / U:1.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site