From: Coly Li <colyli@suse.de>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>,
dm-devel@redhat.com, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, drbd-dev@lists.linbit.com,
linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org,
linux-btrfs@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] writeback: remove bdi->congested_fn
Date: Thu, 2 Jul 2020 08:38:29 +0800 [thread overview]
Message-ID: <69234075-06c9-fcca-0c59-2452aa4e2714@suse.de> (raw)
Message-ID: <20200702003829.DJj-CMBhG9Eby-1hr-3Jw3uA1W22Uh7NKjblf2vwcsY@z> (raw)
In-Reply-To: <20200701090622.3354860-5-hch@lst.de>
On 2020/7/1 17:06, Christoph Hellwig wrote:
> Except for pktdvd, the only places setting congested bits are file
> systems that allocate their own backing_dev_info structures. And
> pktdvd is a deprecated driver that isn't useful in stack setup
> either. So remove the dead congested_fn stacking infrastructure.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
For the bcache part, Acked-by: Coly Li <colyli@suse.de>
Thanks.
Coly Li
> ---
> drivers/block/drbd/drbd_main.c | 59 --------------------------------
> drivers/md/bcache/request.c | 43 -----------------------
> drivers/md/bcache/super.c | 1 -
> drivers/md/dm-cache-target.c | 19 ----------
> drivers/md/dm-clone-target.c | 15 --------
> drivers/md/dm-era-target.c | 15 --------
> drivers/md/dm-raid.c | 12 -------
> drivers/md/dm-table.c | 37 +-------------------
> drivers/md/dm-thin.c | 16 ---------
> drivers/md/dm.c | 33 ------------------
> drivers/md/dm.h | 1 -
> drivers/md/md-linear.c | 24 -------------
> drivers/md/md-multipath.c | 23 -------------
> drivers/md/md.c | 23 -------------
> drivers/md/md.h | 4 ---
> drivers/md/raid0.c | 16 ---------
> drivers/md/raid1.c | 31 -----------------
> drivers/md/raid10.c | 26 --------------
> drivers/md/raid5.c | 25 --------------
> fs/btrfs/disk-io.c | 23 -------------
> include/linux/backing-dev-defs.h | 4 ---
> include/linux/backing-dev.h | 4 ---
> include/linux/device-mapper.h | 11 ------
> 23 files changed, 1 insertion(+), 464 deletions(-)
>
[snipped]
> diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
> index 7acf024e99f351..cda05fc61c3afa 100644
> --- a/drivers/md/bcache/request.c
> +++ b/drivers/md/bcache/request.c
> @@ -1228,36 +1228,10 @@ static int cached_dev_ioctl(struct bcache_device *d, fmode_t mode,
> return __blkdev_driver_ioctl(dc->bdev, mode, cmd, arg);
> }
>
> -static int cached_dev_congested(void *data, int bits)
> -{
> - struct bcache_device *d = data;
> - struct cached_dev *dc = container_of(d, struct cached_dev, disk);
> - struct request_queue *q = bdev_get_queue(dc->bdev);
> - int ret = 0;
> -
> - if (bdi_congested(q->backing_dev_info, bits))
> - return 1;
> -
> - if (cached_dev_get(dc)) {
> - unsigned int i;
> - struct cache *ca;
> -
> - for_each_cache(ca, d->c, i) {
> - q = bdev_get_queue(ca->bdev);
> - ret |= bdi_congested(q->backing_dev_info, bits);
> - }
> -
> - cached_dev_put(dc);
> - }
> -
> - return ret;
> -}
> -
> void bch_cached_dev_request_init(struct cached_dev *dc)
> {
> struct gendisk *g = dc->disk.disk;
>
> - g->queue->backing_dev_info->congested_fn = cached_dev_congested;
> dc->disk.cache_miss = cached_dev_cache_miss;
> dc->disk.ioctl = cached_dev_ioctl;
> }
> @@ -1342,27 +1316,10 @@ static int flash_dev_ioctl(struct bcache_device *d, fmode_t mode,
> return -ENOTTY;
> }
>
> -static int flash_dev_congested(void *data, int bits)
> -{
> - struct bcache_device *d = data;
> - struct request_queue *q;
> - struct cache *ca;
> - unsigned int i;
> - int ret = 0;
> -
> - for_each_cache(ca, d->c, i) {
> - q = bdev_get_queue(ca->bdev);
> - ret |= bdi_congested(q->backing_dev_info, bits);
> - }
> -
> - return ret;
> -}
> -
> void bch_flash_dev_request_init(struct bcache_device *d)
> {
> struct gendisk *g = d->disk;
>
> - g->queue->backing_dev_info->congested_fn = flash_dev_congested;
> d->cache_miss = flash_dev_cache_miss;
> d->ioctl = flash_dev_ioctl;
> }
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index 2014016f9a60d3..1810d7ca2f6653 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -877,7 +877,6 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
>
> d->disk->queue = q;
> q->queuedata = d;
> - q->backing_dev_info->congested_data = d;
> q->limits.max_hw_sectors = UINT_MAX;
> q->limits.max_sectors = UINT_MAX;
> q->limits.max_segment_size = UINT_MAX;
> diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
> index d3bb355819a421..24549dc92eeec5 100644
> --- a/drivers/md/dm-cache-target.c
> +++ b/drivers/md/dm-cache-target.c
> @@ -421,8 +421,6 @@ struct cache {
>
> struct rw_semaphore quiesce_lock;
>
> - struct dm_target_callbacks callbacks;
> -
> /*
> * origin_blocks entries, discarded if set.
> */
> @@ -2423,20 +2421,6 @@ static void set_cache_size(struct cache *cache, dm_cblock_t size)
> cache->cache_size = size;
> }
>
> -static int is_congested(struct dm_dev *dev, int bdi_bits)
> -{
> - struct request_queue *q = bdev_get_queue(dev->bdev);
> - return bdi_congested(q->backing_dev_info, bdi_bits);
> -}
> -
> -static int cache_is_congested(struct dm_target_callbacks *cb, int bdi_bits)
> -{
> - struct cache *cache = container_of(cb, struct cache, callbacks);
> -
> - return is_congested(cache->origin_dev, bdi_bits) ||
> - is_congested(cache->cache_dev, bdi_bits);
> -}
> -
> #define DEFAULT_MIGRATION_THRESHOLD 2048
>
> static int cache_create(struct cache_args *ca, struct cache **result)
> @@ -2471,9 +2455,6 @@ static int cache_create(struct cache_args *ca, struct cache **result)
> goto bad;
> }
>
> - cache->callbacks.congested_fn = cache_is_congested;
> - dm_table_add_target_callbacks(ti->table, &cache->callbacks);
> -
> cache->metadata_dev = ca->metadata_dev;
> cache->origin_dev = ca->origin_dev;
> cache->cache_dev = ca->cache_dev;
[snipped]
next prev parent reply other threads:[~2020-07-02 0:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 9:06 remove dead bdi congestion leftovers Christoph Hellwig
2020-07-01 9:06 ` Christoph Hellwig
2020-07-01 9:06 ` [PATCH 1/4] drbd: remove a bogus bdi_rw_congested call Christoph Hellwig
2020-07-01 9:06 ` Christoph Hellwig
2020-07-01 9:06 ` [PATCH 2/4] writeback: remove {set,clear}_wb_congested Christoph Hellwig
2020-07-01 9:06 ` Christoph Hellwig
[not found] ` <20200701090622.3354860-1-hch-jcswGhMUV9g@public.gmane.org>
2020-07-01 9:06 ` [PATCH 3/4] writeback: remove struct bdi_writeback_congested Christoph Hellwig
2020-07-01 9:06 ` Christoph Hellwig
2020-07-01 16:38 ` remove dead bdi congestion leftovers Tejun Heo
2020-07-01 16:38 ` Tejun Heo
2020-07-08 23:14 ` Jens Axboe
2020-07-08 23:14 ` Jens Axboe
[not found] ` <b5d6df17-68af-d535-79e4-f95e16dd5632-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2020-07-09 5:32 ` Christoph Hellwig
2020-07-09 5:32 ` Christoph Hellwig
[not found] ` <20200709053233.GA3243-jcswGhMUV9g@public.gmane.org>
2020-07-09 13:58 ` Jens Axboe
2020-07-09 13:58 ` Jens Axboe
[not found] ` <82e2785d-2091-1986-0014-3b7cea7cd0d8-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2020-07-09 14:01 ` Christoph Hellwig
2020-07-09 14:01 ` Christoph Hellwig
2020-07-01 9:06 ` [PATCH 4/4] writeback: remove bdi->congested_fn Christoph Hellwig
2020-07-01 9:06 ` Christoph Hellwig
2020-07-01 14:48 ` David Sterba
2020-07-02 0:38 ` Coly Li [this message]
2020-07-02 0:38 ` Coly Li
[not found] ` <20200701090622.3354860-5-hch-jcswGhMUV9g@public.gmane.org>
2020-07-02 5:36 ` Song Liu
2020-07-02 5:36 ` Song Liu
2020-07-01 16:41 ` remove dead bdi congestion leftovers Mike Snitzer
2020-07-01 16:41 ` Mike Snitzer
2020-07-01 17:57 ` Matthew Wilcox
2020-07-01 17:57 ` Matthew Wilcox
2020-07-01 18:25 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69234075-06c9-fcca-0c59-2452aa4e2714@suse.de \
--to=colyli@suse.de \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=dm-devel@redhat.com \
--cc=drbd-dev@lists.linbit.com \
--cc=hch@lst.de \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-raid@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).