#ifndef TRAFGEN_L3_H #define TRAFGEN_L3_H enum ip4_field { IP4_VER, IP4_IHL, IP4_DSCP, IP4_ECN, IP4_TOS, IP4_LEN, IP4_ID, IP4_FLAGS, IP4_MF, IP4_DF, IP4_FRAG_OFFS, IP4_TTL, IP4_PROTO, IP4_CSUM, IP4_SADDR, IP4_DADDR, }; enum ip6_field { IP6_VER, IP6_CLASS, IP6_FLOW_LBL, IP6_LEN, IP6_NEXT_HDR, IP6_HOP_LIMIT, IP6_SADDR, IP6_DADDR, }; extern void protos_l3_init(void); #endif /* TRAFGEN_L2_H */ t.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Cochran <hcochran@kernelspring.com>2016-03-10 01:12:39 -0500
committerJens Axboe <axboe@fb.com>2016-05-05 15:44:55 -0600
commit74d369443325063a5f0260e63971decb950fd8fa (patch)
tree35e1be5dd64d165cca608d916d15985f9d40f7b7
parenta7297a6a3a3322b054592e8e988981d2f5f29cc4 (diff)
writeback: Fix performance regression in wb_over_bg_thresh()
Commit 947e9762a8dd ("writeback: update wb_over_bg_thresh() to use wb_domain aware operations") unintentionally changed this function's meaning from "are there more dirty pages than the background writeback threshold" to "are there more dirty pages than the writeback threshold". The background writeback threshold is typically half of the writeback threshold, so this had the effect of raising the number of dirty pages required to cause a writeback worker to perform background writeout. This can cause a very severe performance regression when a BDI uses BDI_CAP_STRICTLIMIT because balance_dirty_pages() and the writeback worker can now disagree on whether writeback should be initiated. For example, in a system having 1GB of RAM, a single spinning disk, and a "pass-through" FUSE filesystem mounted over the disk, application code mmapped a 128MB file on the disk and was randomly dirtying pages in that mapping. Because FUSE uses strictlimit and has a default max_ratio of only 1%, in balance_dirty_pages, thresh is ~200, bg_thresh is ~100, and the dirty_freerun_ceiling is the average of those, ~150. So, it pauses the dirtying processes when we have 151 dirty pages and wakes up a background writeback worker. But the worker tests the wrong threshold (200 instead of 100), so it does not initiate writeback and just returns. Thus, balance_dirty_pages keeps looping, sleeping and then waking up the worker who will do nothing. It remains stuck in this state until the few dirty pages that we have finally expire and we write them back for that reason. Then the whole process repeats, resulting in near-zero throughput through the FUSE BDI. The fix is to call the parameterized variant of wb_calc_thresh, so that the worker will do writeback if the bg_thresh is exceeded which was the behavior before the referenced commit. Fixes: 947e9762a8dd ("writeback: update wb_over_bg_thresh() to use wb_domain aware operations") Signed-off-by: Howard Cochran <hcochran@kernelspring.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> # v4.2+ Tested-by Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>