Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

remove congestion tracking framework

This framework is no longer used - so discard it.

Link: https://lkml.kernel.org/r/164549983747.9187.6171768583526866601.stgit@noble.brown
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
Cc: Chao Yu <chao@kernel.org>
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Paolo Valente <paolo.valente@linaro.org>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

NeilBrown and committed by
Linus Torvalds
a88f2096 f6bad159

-95
-8
include/linux/backing-dev-defs.h
··· 207 207 #endif 208 208 }; 209 209 210 - enum { 211 - BLK_RW_ASYNC = 0, 212 - BLK_RW_SYNC = 1, 213 - }; 214 - 215 - void clear_bdi_congested(struct backing_dev_info *bdi, int sync); 216 - void set_bdi_congested(struct backing_dev_info *bdi, int sync); 217 - 218 210 struct wb_lock_cookie { 219 211 bool locked; 220 212 unsigned long flags;
-2
include/linux/backing-dev.h
··· 135 135 136 136 struct backing_dev_info *inode_to_bdi(struct inode *inode); 137 137 138 - long congestion_wait(int sync, long timeout); 139 - 140 138 static inline bool mapping_can_writeback(struct address_space *mapping) 141 139 { 142 140 return inode_to_bdi(mapping->host)->capabilities & BDI_CAP_WRITEBACK;
-28
include/trace/events/writeback.h
··· 735 735 ) 736 736 ); 737 737 738 - DECLARE_EVENT_CLASS(writeback_congest_waited_template, 739 - 740 - TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), 741 - 742 - TP_ARGS(usec_timeout, usec_delayed), 743 - 744 - TP_STRUCT__entry( 745 - __field( unsigned int, usec_timeout ) 746 - __field( unsigned int, usec_delayed ) 747 - ), 748 - 749 - TP_fast_assign( 750 - __entry->usec_timeout = usec_timeout; 751 - __entry->usec_delayed = usec_delayed; 752 - ), 753 - 754 - TP_printk("usec_timeout=%u usec_delayed=%u", 755 - __entry->usec_timeout, 756 - __entry->usec_delayed) 757 - ); 758 - 759 - DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait, 760 - 761 - TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), 762 - 763 - TP_ARGS(usec_timeout, usec_delayed) 764 - ); 765 - 766 738 DECLARE_EVENT_CLASS(writeback_single_inode_template, 767 739 768 740 TP_PROTO(struct inode *inode,
-57
mm/backing-dev.c
··· 1005 1005 return bdi->dev_name; 1006 1006 } 1007 1007 EXPORT_SYMBOL_GPL(bdi_dev_name); 1008 - 1009 - static wait_queue_head_t congestion_wqh[2] = { 1010 - __WAIT_QUEUE_HEAD_INITIALIZER(congestion_wqh[0]), 1011 - __WAIT_QUEUE_HEAD_INITIALIZER(congestion_wqh[1]) 1012 - }; 1013 - static atomic_t nr_wb_congested[2]; 1014 - 1015 - void clear_bdi_congested(struct backing_dev_info *bdi, int sync) 1016 - { 1017 - wait_queue_head_t *wqh = &congestion_wqh[sync]; 1018 - enum wb_congested_state bit; 1019 - 1020 - bit = sync ? WB_sync_congested : WB_async_congested; 1021 - if (test_and_clear_bit(bit, &bdi->wb.congested)) 1022 - atomic_dec(&nr_wb_congested[sync]); 1023 - smp_mb__after_atomic(); 1024 - if (waitqueue_active(wqh)) 1025 - wake_up(wqh); 1026 - } 1027 - EXPORT_SYMBOL(clear_bdi_congested); 1028 - 1029 - void set_bdi_congested(struct backing_dev_info *bdi, int sync) 1030 - { 1031 - enum wb_congested_state bit; 1032 - 1033 - bit = sync ? WB_sync_congested : WB_async_congested; 1034 - if (!test_and_set_bit(bit, &bdi->wb.congested)) 1035 - atomic_inc(&nr_wb_congested[sync]); 1036 - } 1037 - EXPORT_SYMBOL(set_bdi_congested); 1038 - 1039 - /** 1040 - * congestion_wait - wait for a backing_dev to become uncongested 1041 - * @sync: SYNC or ASYNC IO 1042 - * @timeout: timeout in jiffies 1043 - * 1044 - * Waits for up to @timeout jiffies for a backing_dev (any backing_dev) to exit 1045 - * write congestion. If no backing_devs are congested then just wait for the 1046 - * next write to be completed. 1047 - */ 1048 - long congestion_wait(int sync, long timeout) 1049 - { 1050 - long ret; 1051 - unsigned long start = jiffies; 1052 - DEFINE_WAIT(wait); 1053 - wait_queue_head_t *wqh = &congestion_wqh[sync]; 1054 - 1055 - prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE); 1056 - ret = io_schedule_timeout(timeout); 1057 - finish_wait(wqh, &wait); 1058 - 1059 - trace_writeback_congestion_wait(jiffies_to_usecs(timeout), 1060 - jiffies_to_usecs(jiffies - start)); 1061 - 1062 - return ret; 1063 - } 1064 - EXPORT_SYMBOL(congestion_wait);