[GIT PULL] MD update for 4.20

2018-10-26 Thread Shaohua Li
(1): md: allow metadata updates while suspending an array - fix Shaohua Li (2): MD: fix invalid stored role for a disk MD: fix invalid stored role for a disk - try2 Xiao Ni (1): MD: Memory leak when flush bio size is zero drivers/md/md-bitmap.c | 9 +- drivers/md

[GIT PULL] MD update for 4.20

2018-10-26 Thread Shaohua Li
(1): md: allow metadata updates while suspending an array - fix Shaohua Li (2): MD: fix invalid stored role for a disk MD: fix invalid stored role for a disk - try2 Xiao Ni (1): MD: Memory leak when flush bio size is zero drivers/md/md-bitmap.c | 9 +- drivers/md

Re: [LKP] [MD] d595567dc4: mdadm-selftests.02lineargrow.fail

2018-10-14 Thread Shaohua Li
On Fri, Oct 12, 2018 at 04:58:44PM +0800, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-7): > > commit: d595567dc4f0c1d90685ec1e2e296e2cad2643ac ("MD: fix invalid stored > role for a disk") > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git

Re: [LKP] [MD] d595567dc4: mdadm-selftests.02lineargrow.fail

2018-10-14 Thread Shaohua Li
On Fri, Oct 12, 2018 at 04:58:44PM +0800, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-7): > > commit: d595567dc4f0c1d90685ec1e2e296e2cad2643ac ("MD: fix invalid stored > role for a disk") > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git

Re: [PATCH] md/bitmap: use mddev_suspend/resume instead of ->quiesce()

2018-09-28 Thread Shaohua Li
On Thu, Sep 27, 2018 at 10:07:57AM +0200, Jack Wang wrote: > From: Jack Wang > > After 9e1cc0a54556 ("md: use mddev_suspend/resume instead of ->quiesce()") > We still have similar left in bitmap functions. > > Replace quiesce() with mddev_suspend/resume. > > Also move md_bitmap_create out of

Re: [PATCH] md/bitmap: use mddev_suspend/resume instead of ->quiesce()

2018-09-28 Thread Shaohua Li
On Thu, Sep 27, 2018 at 10:07:57AM +0200, Jack Wang wrote: > From: Jack Wang > > After 9e1cc0a54556 ("md: use mddev_suspend/resume instead of ->quiesce()") > We still have similar left in bitmap functions. > > Replace quiesce() with mddev_suspend/resume. > > Also move md_bitmap_create out of

[GIT PULL] MD update for 4.19-rc2

2018-09-07 Thread Shaohua Li
-cluster: release RESYNC lock after the last resync message (2018-08-31 17:38:10 -0700) Guoqing Jiang (1): md-cluster: release RESYNC lock after the last resync message Shaohua Li (1): md/raid5-cache: disable reshape completely

[GIT PULL] MD update for 4.19-rc2

2018-09-07 Thread Shaohua Li
-cluster: release RESYNC lock after the last resync message (2018-08-31 17:38:10 -0700) Guoqing Jiang (1): md-cluster: release RESYNC lock after the last resync message Shaohua Li (1): md/raid5-cache: disable reshape completely

[GIT PULL] MD update for 4.19-rc1

2018-08-13 Thread Shaohua Li
Hi, A few MD fixes for 4.19-rc1: - Several md-cluster fixes from Guoqing - A data corruption fix from BingJing - Other cleanups Please pull! Thanks, Shaohua The following changes since commit 06c85639897cf3ea6a11c5cb6929fb0d9d7efea5: Merge tag 'acpi-4.18-rc4' of

[GIT PULL] MD update for 4.19-rc1

2018-08-13 Thread Shaohua Li
Hi, A few MD fixes for 4.19-rc1: - Several md-cluster fixes from Guoqing - A data corruption fix from BingJing - Other cleanups Please pull! Thanks, Shaohua The following changes since commit 06c85639897cf3ea6a11c5cb6929fb0d9d7efea5: Merge tag 'acpi-4.18-rc4' of

Re: [PATCH 1/6] drivers/md/raid5: Use irqsave variant of atomic_dec_and_lock()

2018-07-18 Thread Shaohua Li
On Wed, Jul 18, 2018 at 12:57:21PM +0200, Sebastian Andrzej Siewior wrote: > On 2018-07-16 17:37:27 [-0700], Shaohua Li wrote: > > On Mon, Jul 16, 2018 at 02:27:40PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2018-07-03 22:01:36 [+0200], To linux-kernel@vger.kernel.org w

Re: [PATCH 1/6] drivers/md/raid5: Use irqsave variant of atomic_dec_and_lock()

2018-07-18 Thread Shaohua Li
On Wed, Jul 18, 2018 at 12:57:21PM +0200, Sebastian Andrzej Siewior wrote: > On 2018-07-16 17:37:27 [-0700], Shaohua Li wrote: > > On Mon, Jul 16, 2018 at 02:27:40PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2018-07-03 22:01:36 [+0200], To linux-kernel@vger.kernel.org w

Re: [PATCH 1/6] drivers/md/raid5: Use irqsave variant of atomic_dec_and_lock()

2018-07-16 Thread Shaohua Li
ing/releasing the spin lock. With this variant the call of > > local_irq_save is no longer required. > > Shaohua, are you with this? Acked-by: Shaohua Li > > Cc: Shaohua Li > > Cc: linux-r...@vger.kernel.org > > Acked-by: Peter Zijlstra (Intel) > > Signed-of

Re: [PATCH 1/6] drivers/md/raid5: Use irqsave variant of atomic_dec_and_lock()

2018-07-16 Thread Shaohua Li
ing/releasing the spin lock. With this variant the call of > > local_irq_save is no longer required. > > Shaohua, are you with this? Acked-by: Shaohua Li > > Cc: Shaohua Li > > Cc: linux-r...@vger.kernel.org > > Acked-by: Peter Zijlstra (Intel) > > Signed-of

[GIT PULL] MD update for 4.18-rc3

2018-07-02 Thread Shaohua Li
13:04:49 -0700) BingJing Chang (1): md/raid10: fix that replacement cannot complete recovery after reassemble Shaohua Li (1): MD: cleanup resources in failure drivers/md/md.c | 8 +--- drivers/md/raid10.c | 7

[GIT PULL] MD update for 4.18-rc3

2018-07-02 Thread Shaohua Li
13:04:49 -0700) BingJing Chang (1): md/raid10: fix that replacement cannot complete recovery after reassemble Shaohua Li (1): MD: cleanup resources in failure drivers/md/md.c | 8 +--- drivers/md/raid10.c | 7

[GIT PULL] MD update for 4.18-rc

2018-06-09 Thread Shaohua Li
Hi, A few fixes of MD for this merge window. Mostly bug fixes: - raid5 stripe batch fix from Amy - Read error handling for raid1 FailFast device from Gioh - raid10 recovery NULL pointer dereference fix from Guoqing - Support write hint for raid5 stripe cache from Mariusz - Fixes for device hot

[GIT PULL] MD update for 4.18-rc

2018-06-09 Thread Shaohua Li
Hi, A few fixes of MD for this merge window. Mostly bug fixes: - raid5 stripe batch fix from Amy - Read error handling for raid1 FailFast device from Gioh - raid10 recovery NULL pointer dereference fix from Guoqing - Support write hint for raid5 stripe cache from Mariusz - Fixes for device hot

Re: [PATCH 3/8] md: raid5: use refcount_t for reference counting instead atomic_t

2018-05-23 Thread Shaohua Li
On Wed, May 23, 2018 at 07:49:04PM +0200, Peter Zijlstra wrote: > On Wed, May 23, 2018 at 06:21:19AM -0700, Matthew Wilcox wrote: > > On Wed, May 09, 2018 at 09:36:40PM +0200, Sebastian Andrzej Siewior wrote: > > > refcount_t type and corresponding API should be used instead of atomic_t > > >

Re: [PATCH 3/8] md: raid5: use refcount_t for reference counting instead atomic_t

2018-05-23 Thread Shaohua Li
On Wed, May 23, 2018 at 07:49:04PM +0200, Peter Zijlstra wrote: > On Wed, May 23, 2018 at 06:21:19AM -0700, Matthew Wilcox wrote: > > On Wed, May 09, 2018 at 09:36:40PM +0200, Sebastian Andrzej Siewior wrote: > > > refcount_t type and corresponding API should be used instead of atomic_t > > >

Re: [PATCH] md: zero the original position of sb for 0.90 and 1.0

2018-05-17 Thread Shaohua Li
On Wed, May 16, 2018 at 05:18:39PM +0800, Jianchao Wang wrote: > For sb version 0.90 and 1.0 which locates after data, when we increase > the spindle volume size and grow the raid arry size, the older sb which is > different between spindles will be left there. Due to this left sb, the > spindle

Re: [PATCH] md: zero the original position of sb for 0.90 and 1.0

2018-05-17 Thread Shaohua Li
On Wed, May 16, 2018 at 05:18:39PM +0800, Jianchao Wang wrote: > For sb version 0.90 and 1.0 which locates after data, when we increase > the spindle volume size and grow the raid arry size, the older sb which is > different between spindles will be left there. Due to this left sb, the > spindle

Re: [PATCH] md/raid1: add error handling of read error from FailFast device

2018-05-14 Thread Shaohua Li
On Wed, May 02, 2018 at 01:08:11PM +0200, Gioh Kim wrote: > Current handle_read_error() function calls fix_read_error() > only if md device is RW and rdev does not include FailFast flag. > It does not handle a read error from a RW device including > FailFast flag. > > I am not sure it is

Re: [PATCH] md/raid1: add error handling of read error from FailFast device

2018-05-14 Thread Shaohua Li
On Wed, May 02, 2018 at 01:08:11PM +0200, Gioh Kim wrote: > Current handle_read_error() function calls fix_read_error() > only if md device is RW and rdev does not include FailFast flag. > It does not handle a read error from a RW device including > FailFast flag. > > I am not sure it is

[GIT PULL] MD update for 4.17-rc1

2018-04-19 Thread Shaohua Li
Hi, 3 small fixes for MD: - md-cluster fix for faulty device from Guoqing - writehint fix for writebehind IO for raid1 from Mariusz - a live lock fix for interrupted recovery from Yufen Please pull! The following changes since commit f8cf2f16a7c95acce497bfafa90e7c6d8397d653: Merge branch

[GIT PULL] MD update for 4.17-rc1

2018-04-19 Thread Shaohua Li
Hi, 3 small fixes for MD: - md-cluster fix for faulty device from Guoqing - writehint fix for writebehind IO for raid1 from Mariusz - a live lock fix for interrupted recovery from Yufen Please pull! The following changes since commit f8cf2f16a7c95acce497bfafa90e7c6d8397d653: Merge branch

[GIT PULL] MD update for 4.16-rc3

2018-03-01 Thread Shaohua Li
Hi, A few bug fixes for MD, please pull: - Fix raid5-ppl flush request handling hang from Artur - Fix a potential deadlock in raid5/10 reshape from BingJing - Fix a deadlock for dm-raid from Heinz - Fix two md-cluster of raid10 from Lidong and Guoqing - Fix a NULL deference problem in device

[GIT PULL] MD update for 4.16-rc3

2018-03-01 Thread Shaohua Li
Hi, A few bug fixes for MD, please pull: - Fix raid5-ppl flush request handling hang from Artur - Fix a potential deadlock in raid5/10 reshape from BingJing - Fix a deadlock for dm-raid from Heinz - Fix two md-cluster of raid10 from Lidong and Guoqing - Fix a NULL deference problem in device

Re: [PATCH] md: raid5: avoid string overflow warning

2018-02-21 Thread Shaohua Li
On Tue, Feb 20, 2018 at 02:09:11PM +0100, Arnd Bergmann wrote: > gcc warns about a possible overflow of the kmem_cache string, when adding > four characters to a string of the same length: > > drivers/md/raid5.c: In function 'setup_conf': > drivers/md/raid5.c:2207:34: error: '-alt' directive

Re: [PATCH] md: raid5: avoid string overflow warning

2018-02-21 Thread Shaohua Li
On Tue, Feb 20, 2018 at 02:09:11PM +0100, Arnd Bergmann wrote: > gcc warns about a possible overflow of the kmem_cache string, when adding > four characters to a string of the same length: > > drivers/md/raid5.c: In function 'setup_conf': > drivers/md/raid5.c:2207:34: error: '-alt' directive

Re: [PATCH] md: fix md_write_start() deadlock w/o metadata devices

2018-02-18 Thread Shaohua Li
On Fri, Feb 02, 2018 at 11:13:19PM +0100, Heinz Mauelshagen wrote: > If no metadata devices are configured on raid1/4/5/6/10 > (e.g. via dm-raid), md_write_start() unconditionally waits > for superblocks to be written thus deadlocking. > > Fix introduces mddev->has_superblocks bool, defines it in

Re: [PATCH] md: fix md_write_start() deadlock w/o metadata devices

2018-02-18 Thread Shaohua Li
On Fri, Feb 02, 2018 at 11:13:19PM +0100, Heinz Mauelshagen wrote: > If no metadata devices are configured on raid1/4/5/6/10 > (e.g. via dm-raid), md_write_start() unconditionally waits > for superblocks to be written thus deadlocking. > > Fix introduces mddev->has_superblocks bool, defines it in

Re: [PATCH v2] md-multipath: Use seq_putc() in multipath_status()

2018-02-17 Thread Shaohua Li
On Sat, Jan 13, 2018 at 09:55:08AM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 13 Jan 2018 09:49:03 +0100 > > A single character (closing square bracket) should be put into a sequence. > Thus use the corresponding function "seq_putc". > >

Re: [PATCH v2] md-multipath: Use seq_putc() in multipath_status()

2018-02-17 Thread Shaohua Li
On Sat, Jan 13, 2018 at 09:55:08AM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 13 Jan 2018 09:49:03 +0100 > > A single character (closing square bracket) should be put into a sequence. > Thus use the corresponding function "seq_putc". > > This issue was detected by using

Re: [PATCH] md/raid1: Fix trailing semicolon

2018-02-17 Thread Shaohua Li
On Wed, Jan 17, 2018 at 01:38:02PM +, Luis de Bethencourt wrote: > The trailing semicolon is an empty statement that does no operation. > Removing it since it doesn't do anything. > > Signed-off-by: Luis de Bethencourt > --- > > Hi, > > After fixing the same thing in

Re: [PATCH] md/raid1: Fix trailing semicolon

2018-02-17 Thread Shaohua Li
On Wed, Jan 17, 2018 at 01:38:02PM +, Luis de Bethencourt wrote: > The trailing semicolon is an empty statement that does no operation. > Removing it since it doesn't do anything. > > Signed-off-by: Luis de Bethencourt > --- > > Hi, > > After fixing the same thing in

[GIT PULL] MD update for 4.16-rc1

2018-01-30 Thread Shaohua Li
Hi, Some small fixes for MD 4.16: - Fix raid5-cache potential problems if raid5 cache isn't fully recovered - Fix a wait-within-wait warning in raid1/10 - Make raid5-PPL support disks with writeback cache enabled Please pull! Thanks, Shaohua The following changes since commit

[GIT PULL] MD update for 4.16-rc1

2018-01-30 Thread Shaohua Li
Hi, Some small fixes for MD 4.16: - Fix raid5-cache potential problems if raid5 cache isn't fully recovered - Fix a wait-within-wait warning in raid1/10 - Make raid5-PPL support disks with writeback cache enabled Please pull! Thanks, Shaohua The following changes since commit

Re: Regression with a0747a859ef6 ("bdi: add error handle for bdi_debug_register")

2017-12-19 Thread Shaohua Li
On Tue, Dec 19, 2017 at 10:17:43AM -0600, Bruno Wolff III wrote: > On Sun, Dec 17, 2017 at 21:43:50 +0800, > weiping zhang wrote: > > Hi, thanks for testing, I think you first reproduce this issue(got WARNING > > at device_add_disk) by your own build, then add my debug patch.

Re: Regression with a0747a859ef6 ("bdi: add error handle for bdi_debug_register")

2017-12-19 Thread Shaohua Li
On Tue, Dec 19, 2017 at 10:17:43AM -0600, Bruno Wolff III wrote: > On Sun, Dec 17, 2017 at 21:43:50 +0800, > weiping zhang wrote: > > Hi, thanks for testing, I think you first reproduce this issue(got WARNING > > at device_add_disk) by your own build, then add my debug patch. > > The problem is

[GIT PULL] MD update for 4.15-rc2

2017-12-07 Thread Shaohua Li
) Nate Dailey (1): md: limit mdstat resync progress to max_sectors Shaohua Li (1): md/raid1/10: add missed blk plug Song Liu (1): md/r5cache: move mddev_lock() out of r5c_journal_mode_set() bingjingc (1): md

[GIT PULL] MD update for 4.15-rc2

2017-12-07 Thread Shaohua Li
) Nate Dailey (1): md: limit mdstat resync progress to max_sectors Shaohua Li (1): md/raid1/10: add missed blk plug Song Liu (1): md/r5cache: move mddev_lock() out of r5c_journal_mode_set() bingjingc (1): md

Re: [RFC PATCH] blk-throttle: add burst allowance.

2017-11-17 Thread Shaohua Li
On Thu, Nov 16, 2017 at 08:25:58PM -0800, Khazhismel Kumykov wrote: > On Thu, Nov 16, 2017 at 8:50 AM, Shaohua Li <s...@kernel.org> wrote: > > On Tue, Nov 14, 2017 at 03:10:22PM -0800, Khazhismel Kumykov wrote: > >> Allows configuration additional bytes or ios before a th

Re: [RFC PATCH] blk-throttle: add burst allowance.

2017-11-17 Thread Shaohua Li
On Thu, Nov 16, 2017 at 08:25:58PM -0800, Khazhismel Kumykov wrote: > On Thu, Nov 16, 2017 at 8:50 AM, Shaohua Li wrote: > > On Tue, Nov 14, 2017 at 03:10:22PM -0800, Khazhismel Kumykov wrote: > >> Allows configuration additional bytes or ios before a throttle

Re: [RFC PATCH] blk-throttle: add burst allowance.

2017-11-16 Thread Shaohua Li
On Tue, Nov 14, 2017 at 03:10:22PM -0800, Khazhismel Kumykov wrote: > Allows configuration additional bytes or ios before a throttle is > triggered. > > This allows implementation of a bucket style rate-limit/throttle on a > block device. Previously, bursting to a device was limited to allowance

Re: [RFC PATCH] blk-throttle: add burst allowance.

2017-11-16 Thread Shaohua Li
On Tue, Nov 14, 2017 at 03:10:22PM -0800, Khazhismel Kumykov wrote: > Allows configuration additional bytes or ios before a throttle is > triggered. > > This allows implementation of a bucket style rate-limit/throttle on a > block device. Previously, bursting to a device was limited to allowance

Re: [PATCH 6/7] blkcg: account requests instead of bios for request based request_queues

2017-11-14 Thread Shaohua Li
/linux/blk-cgroup.h > @@ -715,7 +715,8 @@ static inline bool blkcg_bio_issue_check(struct > request_queue *q, > > throtl = blk_throtl_bio(q, blkg, bio); > > - if (!throtl) { > + /* if @q does io stat, blkcg stats are updated together with them */ > + if

Re: [PATCH 6/7] blkcg: account requests instead of bios for request based request_queues

2017-11-14 Thread Shaohua Li
/blk-cgroup.h > @@ -715,7 +715,8 @@ static inline bool blkcg_bio_issue_check(struct > request_queue *q, > > throtl = blk_throtl_bio(q, blkg, bio); > > - if (!throtl) { > + /* if @q does io stat, blkcg stats are updated together with them */ > + if (!blk_queue_io_stat(

Re: [PATCH v2 3/7] blkcg: associate a request with its blkcg_gq instead of request_list

2017-11-14 Thread Shaohua Li
On Mon, Nov 13, 2017 at 12:15:23PM -0800, Tejun Heo wrote: > From c856a199ec70e4022e997609f1b17b9106408777 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Mon, 13 Nov 2017 12:11:57 -0800 > > On the legacy request_queue, each blkcg_gq has a dedicated > request_list that

Re: [PATCH v2 3/7] blkcg: associate a request with its blkcg_gq instead of request_list

2017-11-14 Thread Shaohua Li
On Mon, Nov 13, 2017 at 12:15:23PM -0800, Tejun Heo wrote: > From c856a199ec70e4022e997609f1b17b9106408777 Mon Sep 17 00:00:00 2001 > From: Tejun Heo > Date: Mon, 13 Nov 2017 12:11:57 -0800 > > On the legacy request_queue, each blkcg_gq has a dedicated > request_list that requests for the cgroup

Re: [PATCH 4/7] blkcg: refactor blkcg_gq lookup and creation in blkcg_bio_issue_check()

2017-11-14 Thread Shaohua Li
and doesn't introduce any functional changes. > > Signed-off-by: Tejun Heo <t...@kernel.org> Reviewed-by: Shaohua Li <s...@kernel.org> > --- > block/blk-cgroup.c | 6 +++--- > block/blk-throttle.c | 2 +- > include/linux/blk-cgroup.h | 32 +++

Re: [PATCH 4/7] blkcg: refactor blkcg_gq lookup and creation in blkcg_bio_issue_check()

2017-11-14 Thread Shaohua Li
and doesn't introduce any functional changes. > > Signed-off-by: Tejun Heo Reviewed-by: Shaohua Li > --- > block/blk-cgroup.c | 6 +++--- > block/blk-throttle.c | 2 +- > include/linux/blk-cgroup.h | 32 +--- > 3 files changed, 25 i

Re: [PATCH 2/7] blkcg: use percpu_ref for blkcg_gq->refcnt

2017-11-14 Thread Shaohua Li
> Signed-off-by: Tejun Heo <t...@kernel.org> Reviewed-by: Shaohua Li <s...@kernel.org> > --- > block/blk-cgroup.c | 21 - > include/linux/blk-cgroup.h | 13 - > 2 files changed, 20 insertions(+), 14 deletions(-) > > diff --git a/bl

Re: [PATCH 2/7] blkcg: use percpu_ref for blkcg_gq->refcnt

2017-11-14 Thread Shaohua Li
> acceptable albeit restrictive and fragile. > > Now that the percpu allocator supports !GFP_KERNEL allocations, > there's no reason to keep using atomic_t refcnt. This will allow > clean separation between bio and request layers helping blkcg support > in blk-mq. >

Re: [PATCH 1/7] blkcg: relocate __blkg_release_rcu()

2017-11-14 Thread Shaohua Li
On Sun, Nov 12, 2017 at 02:26:07PM -0800, Tejun Heo wrote: > Move __blkg_release_rcu() above blkg_alloc(). This is a pure code > reorganization to prepare for the switch to percpu_ref. > > Signed-off-by: Tejun Heo <t...@kernel.org> Reviewed-by: Shaohua Li <s...@kernel.or

Re: [PATCH 1/7] blkcg: relocate __blkg_release_rcu()

2017-11-14 Thread Shaohua Li
On Sun, Nov 12, 2017 at 02:26:07PM -0800, Tejun Heo wrote: > Move __blkg_release_rcu() above blkg_alloc(). This is a pure code > reorganization to prepare for the switch to percpu_ref. > > Signed-off-by: Tejun Heo Reviewed-by: Shaohua Li > --- > block

Re: [PATCH 2/2] blk-throtl: add relative percentage support to latency=

2017-11-14 Thread Shaohua Li
ops=100 idle=100 > latency=120% > > Signed-off-by: Tejun Heo <t...@kernel.org> > Cc: Shaohua Li <s...@kernel.org> Reviewed-by: Shaohua Li <s...@kernel.org> > --- > block/blk-throttle.c | 66 > +++--

Re: [PATCH 2/2] blk-throtl: add relative percentage support to latency=

2017-11-14 Thread Shaohua Li
ops=100 idle=1000000 > latency=120% > > Signed-off-by: Tejun Heo > Cc: Shaohua Li Reviewed-by: Shaohua Li > --- > block/blk-throttle.c | 66 > +++ > 1 file changed, 51 insertions(+), 15 deletions(-) > > --- a

[GIT PULL] MD update for 4.15-rc1

2017-11-14 Thread Shaohua Li
ning of ->quiesce(.., 2) md: be cautious about using ->curr_resync_completed for ->recovery_offset Shaohua Li (2): md/bitmap: revert a patch md: use lockdep_assert_held Zdenek Kabelac (2): md: release allocated bitset sync_set md: free unused memory after bit

[GIT PULL] MD update for 4.15-rc1

2017-11-14 Thread Shaohua Li
ning of ->quiesce(.., 2) md: be cautious about using ->curr_resync_completed for ->recovery_offset Shaohua Li (2): md/bitmap: revert a patch md: use lockdep_assert_held Zdenek Kabelac (2): md: release allocated bitset sync_set md: free unused memory after bit

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-13 Thread Shaohua Li
On Mon, Nov 13, 2017 at 06:18:49AM -0800, Tejun Heo wrote: > Hello, Shaohua. Just a bit of addition. > > On Mon, Nov 13, 2017 at 03:27:10AM -0800, Tejun Heo wrote: > > What I'm trying to say is that the latency is defined as "from bio > > issue to completion", not "in-flight time on device".

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-13 Thread Shaohua Li
On Mon, Nov 13, 2017 at 06:18:49AM -0800, Tejun Heo wrote: > Hello, Shaohua. Just a bit of addition. > > On Mon, Nov 13, 2017 at 03:27:10AM -0800, Tejun Heo wrote: > > What I'm trying to say is that the latency is defined as "from bio > > issue to completion", not "in-flight time on device".

Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times

2017-11-13 Thread Shaohua Li
On Mon, Nov 13, 2017 at 07:57:45AM -0800, Tejun Heo wrote: > Hello, > > On Mon, Nov 13, 2017 at 03:13:48AM -0800, Tejun Heo wrote: > > You're right. If we wanna take this approach, we need to keep the > > throttled flag while cloning. The clearing part is still correct tho. > > Without that, I

Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times

2017-11-13 Thread Shaohua Li
On Mon, Nov 13, 2017 at 07:57:45AM -0800, Tejun Heo wrote: > Hello, > > On Mon, Nov 13, 2017 at 03:13:48AM -0800, Tejun Heo wrote: > > You're right. If we wanna take this approach, we need to keep the > > throttled flag while cloning. The clearing part is still correct tho. > > Without that, I

Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times

2017-11-13 Thread Shaohua Li
On Mon, Nov 13, 2017 at 07:57:45AM -0800, Tejun Heo wrote: > Hello, > > On Mon, Nov 13, 2017 at 03:13:48AM -0800, Tejun Heo wrote: > > You're right. If we wanna take this approach, we need to keep the > > throttled flag while cloning. The clearing part is still correct tho. > > Without that, I

Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times

2017-11-13 Thread Shaohua Li
On Mon, Nov 13, 2017 at 07:57:45AM -0800, Tejun Heo wrote: > Hello, > > On Mon, Nov 13, 2017 at 03:13:48AM -0800, Tejun Heo wrote: > > You're right. If we wanna take this approach, we need to keep the > > throttled flag while cloning. The clearing part is still correct tho. > > Without that, I

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-12 Thread Shaohua Li
On Fri, Nov 10, 2017 at 07:43:14AM -0800, Tejun Heo wrote: > Hello, Shaohua. > > On Thu, Nov 09, 2017 at 08:27:13PM -0800, Shaohua Li wrote: > > I think the absolute latency would only work for HD. For a SSD, a 4k latency > > probably is 60us and 1M latency is 500us.

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-12 Thread Shaohua Li
On Fri, Nov 10, 2017 at 07:43:14AM -0800, Tejun Heo wrote: > Hello, Shaohua. > > On Thu, Nov 09, 2017 at 08:27:13PM -0800, Shaohua Li wrote: > > I think the absolute latency would only work for HD. For a SSD, a 4k latency > > probably is 60us and 1M latency is 500us.

Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times

2017-11-12 Thread Shaohua Li
On Sun, Nov 12, 2017 at 02:26:13PM -0800, Tejun Heo wrote: > BIO_THROTTLED is used to mark already throttled bios so that a bio > doesn't get throttled multiple times. The flag gets set when the bio > starts getting dispatched from blk-throtl and cleared when it leaves > blk-throtl. > >

Re: [PATCH 7/7] blk-throtl: don't throttle the same IO multiple times

2017-11-12 Thread Shaohua Li
On Sun, Nov 12, 2017 at 02:26:13PM -0800, Tejun Heo wrote: > BIO_THROTTLED is used to mark already throttled bios so that a bio > doesn't get throttled multiple times. The flag gets set when the bio > starts getting dispatched from blk-throtl and cleared when it leaves > blk-throtl. > >

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-09 Thread Shaohua Li
On Thu, Nov 09, 2017 at 03:42:58PM -0800, Tejun Heo wrote: > Hello, Shaohua. > > On Thu, Nov 09, 2017 at 03:12:12PM -0800, Shaohua Li wrote: > > The percentage latency makes sense, but the absolute latency doesn't to me. > > A > > 4k IO latency could be much smalle

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-09 Thread Shaohua Li
On Thu, Nov 09, 2017 at 03:42:58PM -0800, Tejun Heo wrote: > Hello, Shaohua. > > On Thu, Nov 09, 2017 at 03:12:12PM -0800, Shaohua Li wrote: > > The percentage latency makes sense, but the absolute latency doesn't to me. > > A > > 4k IO latency could be much smalle

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-09 Thread Shaohua Li
smaller than 1M IO latency. If we don't add baseline latency, we can't specify a latency target which works for both 4k and 1M IO. Thanks, Shaohua > Signed-off-by: Tejun Heo <t...@kernel.org> > Cc: Shaohua Li <s...@kernel.org> > --- > block/blk-throttle.c |3 +-- >

Re: [PATCH 1/2] blk-throtl: make latency= absolute

2017-11-09 Thread Shaohua Li
smaller than 1M IO latency. If we don't add baseline latency, we can't specify a latency target which works for both 4k and 1M IO. Thanks, Shaohua > Signed-off-by: Tejun Heo > Cc: Shaohua Li > --- > block/blk-throttle.c |3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-

[PATCH V2] kthread: zero the kthread data structure

2017-11-07 Thread Shaohua Li
ov <dvyu...@google.com> Signed-off-by: Shaohua Li <s...@fb.com> --- kernel/kthread.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index f87cd8b4..8dbe245 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -20

[PATCH V2] kthread: zero the kthread data structure

2017-11-07 Thread Shaohua Li
sound much overhead. Reported-by: syzbot Fixes: 05e3db95ebfc ("kthread: add a mechanism to store cgroup info") Cc: Andrew Morton Cc: Ingo Molnar Cc: Tejun Heo Cc: Dmitry Vyukov Signed-off-by: Shaohua Li --- kernel/kthread.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-)

[PATCH] kthread: move the cgroup info initialization early

2017-11-07 Thread Shaohua Li
Andrew Morton <a...@linux-foundation.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Tejun Heo <t...@kernel.org> Signed-off-by: Shaohua Li <s...@fb.com> --- kernel/kthread.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/kthread.c b/kernel/kth

[PATCH] kthread: move the cgroup info initialization early

2017-11-07 Thread Shaohua Li
: Tejun Heo Signed-off-by: Shaohua Li --- kernel/kthread.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index f87cd8b4..cf5c113 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -205,6 +205,10 @@ static int kthread(void

Re: [PATCH] md: Convert timers to use timer_setup()

2017-10-16 Thread Shaohua Li
ong, I'll apply. Or if you want this merged in other tree, you can add my 'reviewed-by: Shaohua Li <s...@fb.com>' for md.c part. > Cc: Kent Overstreet <kent.overstr...@gmail.com> > Cc: Shaohua Li <s...@kernel.org> > Cc: Alasdair Kergon <a...@redhat.com> > Cc:

Re: [PATCH] md: Convert timers to use timer_setup()

2017-10-16 Thread Shaohua Li
ong, I'll apply. Or if you want this merged in other tree, you can add my 'reviewed-by: Shaohua Li ' for md.c part. > Cc: Kent Overstreet > Cc: Shaohua Li > Cc: Alasdair Kergon > Cc: Mike Snitzer > Cc: dm-de...@redhat.com > Cc: linux-bca...@vger.kernel.org > Cc: linux-r..

Re: [PATCH] md: raid10: remove VLAIS

2017-10-05 Thread Shaohua Li
On Fri, Oct 06, 2017 at 01:22:12PM +1100, Neil Brown wrote: > On Thu, Oct 05 2017, Matthias Kaehlcke wrote: > > > Hi Neil, > > > > El Fri, Oct 06, 2017 at 10:58:59AM +1100 NeilBrown ha dit: > > > >> On Thu, Oct 05 2017, Matthias Kaehlcke wrote: > >> > >> > The raid10 driver can't be built with

Re: [PATCH] md: raid10: remove VLAIS

2017-10-05 Thread Shaohua Li
On Fri, Oct 06, 2017 at 01:22:12PM +1100, Neil Brown wrote: > On Thu, Oct 05 2017, Matthias Kaehlcke wrote: > > > Hi Neil, > > > > El Fri, Oct 06, 2017 at 10:58:59AM +1100 NeilBrown ha dit: > > > >> On Thu, Oct 05 2017, Matthias Kaehlcke wrote: > >> > >> > The raid10 driver can't be built with

Re: [PATCH] md: raid10: remove VLAIS

2017-10-05 Thread Shaohua Li
On Thu, Oct 05, 2017 at 11:28:47AM -0700, Matthias Kaehlcke wrote: > The raid10 driver can't be built with clang since it uses a variable > length array in a structure (VLAIS): > > drivers/md/raid10.c:4583:17: error: fields must have a constant size: > 'variable length array in structure'

Re: [PATCH] md: raid10: remove VLAIS

2017-10-05 Thread Shaohua Li
On Thu, Oct 05, 2017 at 11:28:47AM -0700, Matthias Kaehlcke wrote: > The raid10 driver can't be built with clang since it uses a variable > length array in a structure (VLAIS): > > drivers/md/raid10.c:4583:17: error: fields must have a constant size: > 'variable length array in structure'

[GIT PULL] MD update for 4.14-rc3

2017-09-29 Thread Shaohua Li
-27 20:08:44 -0700) Shaohua Li (4): md: separate request handling md: fix a race condition for flush request handling dm-raid: fix a race condition in request handling md/raid5: cap worker count drivers/md/dm

[GIT PULL] MD update for 4.14-rc3

2017-09-29 Thread Shaohua Li
-27 20:08:44 -0700) Shaohua Li (4): md: separate request handling md: fix a race condition for flush request handling dm-raid: fix a race condition in request handling md/raid5: cap worker count drivers/md/dm

Re: [PATCH V3 0/4] block: make loop block device cgroup aware

2017-09-25 Thread Shaohua Li
On Thu, Sep 14, 2017 at 02:02:03PM -0700, Shaohua Li wrote: > From: Shaohua Li <s...@fb.com> > > Hi, > > The IO dispatched to under layer disk by loop block device isn't cloned from > original bio, so the IO loses cgroup information of original bio. These IO >

Re: [PATCH V3 0/4] block: make loop block device cgroup aware

2017-09-25 Thread Shaohua Li
On Thu, Sep 14, 2017 at 02:02:03PM -0700, Shaohua Li wrote: > From: Shaohua Li > > Hi, > > The IO dispatched to under layer disk by loop block device isn't cloned from > original bio, so the IO loses cgroup information of original bio. These IO > escapes from cgroup con

Re: MADV_FREE is broken

2017-09-20 Thread Shaohua Li
On Wed, Sep 20, 2017 at 11:01:47AM +0200, Artem Savkov wrote: > Hi All, > > We recently started noticing madvise09[1] test from ltp failing strangely. The > test does the following: maps 32 pages, sets MADV_FREE for the range it got, > dirties 2 of the pages, creates memory pressure and check

Re: MADV_FREE is broken

2017-09-20 Thread Shaohua Li
On Wed, Sep 20, 2017 at 11:01:47AM +0200, Artem Savkov wrote: > Hi All, > > We recently started noticing madvise09[1] test from ltp failing strangely. The > test does the following: maps 32 pages, sets MADV_FREE for the range it got, > dirties 2 of the pages, creates memory pressure and check

[GIT PULL] MD update for 4.14-rc2

2017-09-19 Thread Shaohua Li
) Dennis Yang (1): md/raid5: preserve STRIPE_ON_UNPLUG_LIST in break_stripe_batch_list Shaohua Li (1): md/raid5: fix a race condition in stripe batch drivers/md/raid5.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-)

[GIT PULL] MD update for 4.14-rc2

2017-09-19 Thread Shaohua Li
) Dennis Yang (1): md/raid5: preserve STRIPE_ON_UNPLUG_LIST in break_stripe_batch_list Shaohua Li (1): md/raid5: fix a race condition in stripe batch drivers/md/raid5.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-)

[PATCH V3 1/4] kthread: add a mechanism to store cgroup info

2017-09-14 Thread Shaohua Li
From: Shaohua Li <s...@fb.com> kthread usually runs jobs on behalf of other threads. The jobs should be charged to cgroup of original threads. But the jobs run in a kthread, where we lose the cgroup context of original threads. The patch adds a machanism to record cgroup info of original t

[PATCH V3 1/4] kthread: add a mechanism to store cgroup info

2017-09-14 Thread Shaohua Li
From: Shaohua Li kthread usually runs jobs on behalf of other threads. The jobs should be charged to cgroup of original threads. But the jobs run in a kthread, where we lose the cgroup context of original threads. The patch adds a machanism to record cgroup info of original threads in kthread

[PATCH V3 0/4] block: make loop block device cgroup aware

2017-09-14 Thread Shaohua Li
From: Shaohua Li <s...@fb.com> Hi, The IO dispatched to under layer disk by loop block device isn't cloned from original bio, so the IO loses cgroup information of original bio. These IO escapes from cgroup control. The patches try to address this issue. The idea is quite generic,

[PATCH V3 0/4] block: make loop block device cgroup aware

2017-09-14 Thread Shaohua Li
From: Shaohua Li Hi, The IO dispatched to under layer disk by loop block device isn't cloned from original bio, so the IO loses cgroup information of original bio. These IO escapes from cgroup control. The patches try to address this issue. The idea is quite generic, but we currently only make

[PATCH V3 2/4] blkcg: delete unused APIs

2017-09-14 Thread Shaohua Li
From: Shaohua Li <s...@fb.com> Nobody uses the APIs right now. Acked-by: Tejun Heo <t...@kernel.org> Signed-off-by: Shaohua Li <s...@fb.com> --- block/bio.c| 31 --- include/linux/bio.h| 2 -- include/linux/blk-cgroup.h |

[PATCH V3 2/4] blkcg: delete unused APIs

2017-09-14 Thread Shaohua Li
From: Shaohua Li Nobody uses the APIs right now. Acked-by: Tejun Heo Signed-off-by: Shaohua Li --- block/bio.c| 31 --- include/linux/bio.h| 2 -- include/linux/blk-cgroup.h | 12 3 files changed, 45 deletions(-) diff --git

[PATCH V3 4/4] block/loop: make loop cgroup aware

2017-09-14 Thread Shaohua Li
From: Shaohua Li <s...@fb.com> loop block device handles IO in a separate thread. The actual IO dispatched isn't cloned from the IO loop device received, so the dispatched IO loses the cgroup context. I'm ignoring buffer IO case now, which is quite complicated. Making the loop thread

[PATCH V3 4/4] block/loop: make loop cgroup aware

2017-09-14 Thread Shaohua Li
From: Shaohua Li loop block device handles IO in a separate thread. The actual IO dispatched isn't cloned from the IO loop device received, so the dispatched IO loses the cgroup context. I'm ignoring buffer IO case now, which is quite complicated. Making the loop thread aware cgroup context

  1   2   3   4   5   6   7   8   9   10   >