+ mm-page-writebackc-add-strictlimit-feature.patch added to -mm tree
Subsystems (3)
[email protected]
maintainerSubject: + mm-page-writebackc-add-strictlimit-feature.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 21 Aug 2013 13:41:01 -0700
The patch titled
Subject: mm/page-writeback.c: add strictlimit feature
has been added to the -mm tree. Its filename is
mm-page-writebackc-add-strictlimit-feature.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-page-writebackc-add-strictlimit-feature.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-page-writebackc-add-strictlimit-feature.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Maxim Patlasov <[email protected]>
Subject: mm/page-writeback.c: add strictlimit feature
The feature prevents mistrusted filesystems to grow a large number of dirty pages before throttling. For such filesystems balance_dirty_pages always check bdi counters against bdi limits. I.e. even if global "nr_dirty" is under "freerun", it's not allowed to skip bdi checks. The only use case for now is fuse: it sets bdi max_ratio to 1% by default and system administrators are supposed to expect that this limit won't be exceeded.
The feature is on if a BDI is marked by BDI_CAP_STRICTLIMIT flag. A filesystem may set the flag when it initializes its BDI.
---
fs/fuse/inode.c | 2 include/linux/backing-dev.h | 3 mm/page-writeback.c | 261 ++++++++++++++++++++++++++-------- 3 files changed, 205 insertions(+), 61 deletions(-)
fs/fuse/inode.c renamed from fs/fuse/inode.c~mm-strictlimit-feature-v4 +1 -1
@@ -929,7 +929,7 @@ static int fuse_bdi_init(struct fuse_con fc->bdi.name ="fuse" ; fc->bdi.ra_pages = (VM_MAX_READAHEAD *1024 ) /PAGE_CACHE_SIZE ;/* fuse does it's own writeback accounting */ - fc->bdi.capabilities =BDI_CAP_NO_ACCT_WB ; + fc->bdi.capabilities =BDI_CAP_NO_ACCT_WB |BDI_CAP_STRICTLIMIT ; err =bdi_init (&fc->bdi);if (err)
include/linux/backing-dev.h renamed from include/linux/backing-dev.h~mm-strictlimit-feature-v4 +3 -0
@@ -243,6 +243,8 @@ int bdi_set_max_ratio(struct backing_dev* BDI_CAP_EXEC_MAP: Can be mapped for execution * * BDI_CAP_SWAP_BACKED: Count shmem/tmpfs objects as swap-backed. +* +* BDI_CAP_STRICTLIMIT: Keep number of dirty pages below bdi threshold. */ #define BDI_CAP_NO_ACCT_DIRTY 0x00000001#define BDI_CAP_NO_WRITEBACK 0x00000002
@@ -254,6 +256,7 @@ int bdi_set_max_ratio(struct backing_dev#define BDI_CAP_NO_ACCT_WB 0x00000080#define BDI_CAP_SWAP_BACKED 0x00000100#define BDI_CAP_STABLE_WRITES 0x00000200 +#define BDI_CAP_STRICTLIMIT 0x00000400#define BDI_CAP_VMFLAGS \ (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
mm/page-writeback.c renamed from mm/page-writeback.c~mm-strictlimit-feature-v4 +201 -60
326 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
mm-page-writebackc-add-strictlimit-feature.patch