Skip to content

Change page reference handling semantic of page cache

Minchan Kim linux-mm lkml 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 0 repliesNew
  2. v37 patches 1 replySuperseded
  3. v27 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches9 repliesSuperseded

Changes in v4 from the cover letter

- Add Acked-by
- rebase on mmotm-02-04
- remove the patch about fuse

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Introduce delete_from_page_cacheinclude/linux/pagemap.h mm/filemap.c+17 -00 replies
2/6hugetlbfs: Change remove_from_page_cachefs/hugetlbfs/inode.c+1 -20 replies
3/6shmem: Change remove_from_page_cachemm/shmem.c+1 -20 replies
4/6truncate: Change remove_from_page_cachemm/truncate.c+2 -30 replies
5/6Good bye remove_from_page_cacheinclude/linux/pagemap.h mm/filemap.c+10 -170 replies
6/6Change __remove_from_page_cacheinclude/linux/pagemap.h mm/filemap.c mm/memory-failure.c +2 more+8 -80 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchHugh DickinsMel GormanKAMEZAWA HiroyukiJohannes WeinerKOSAKI Motohiro
1/6A-b A-b R-b R-b R-b
2/6A-b A-b R-b R-b R-b
3/6A-b A-b R-b R-b R-b
4/6A-b A-b R-b R-b R-b
5/6A-b A-b R-b R-b R-b
6/6A-b A-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/6] Change page reference handling semantic of page cache

Now we increase page reference on add_to_page_cache but don't decrease it in remove_from_page_cache. Such asymmetric rule makes confusing about page reference so that caller should notice it and comment why they release page reference. It's not good API.

Long time ago, Hugh tried it[1] but gave up of reason which reiser4's drop_page had to unlock the page between removing it from page cache and doing the page_cache_release. But now the situation is changed. I think at least things in current mainline doesn't have any obstacles. The problem is fs or somethings out of mainline. If it has done such thing like reiser4, this patch could be a problem but they found it when compile time since we remove remove_from_page_cache.

[1] http://lkml.org/lkml/2004/10/24/140

The series configuration is following as.

[1/6] : This patch introduces new API delete_from_page_cache. [2,3,4/6] : Change remove_from_page_cache with delete_from_page_cache. Intentionally I divide patch per file since someone might have a concern about releasing page reference of delete_from_page_cache in somecase (ex, truncate.c)
[5/6] : Remove old API so out of fs can meet compile error when build time and can notice it.
[6/6] : Change __remove_from_page_cache with __delete_from_page_cache, too. In this time, I made all-in-one patch because it doesn't change old behavior so it has no concern. Just clean up patch.

This patch series pass LTP test on mm and fs.

from v3
- Add Acked-by
- rebase on mmotm-02-04
- remove the patch about fuse

from v2
- Add Acked-by
- rebase on mmotm-01-06
- change title of some patch

from v1
- Add Acked-by
- rebase on mmotm-12-23

Minchan Kim (6):
[1/6] Introduce delete_from_page_cache
[2/6] hugetlbfs: Change remove_from_page_cache
[3/6] shmem: Change remove_from_page_cache
[4/6] truncate: Change remove_from_page_cache
[5/6] Good bye remove_from_page_cache
[6/6] Change __remove_from_page_cache

 fs/hugetlbfs/inode.c    |    3 +--
 include/linux/pagemap.h |    4 ++--
 mm/filemap.c            |   22 ++++++++++++++++------
 mm/memory-failure.c     |    2 +-
 mm/shmem.c              |    3 +--
 mm/truncate.c           |    7 +++----
 mm/vmscan.c             |    2 +-
 7 files changed, 25 insertions(+), 18 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>