[RFC 1/5] inode reservation v0.1

2007-05-23 Thread coly
several months, I will try best to write a usable patch :-) Coly - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://w

[RFC 2/5] inode reservation v0.1 (ext4 kernel patch)

2007-05-23 Thread coly
The patch is generated based on 2.6.20-ext4-2 branch. you can find the benchmark from other email. DO NOT waste time on reading the patch :-) I post this patch here is to show that I really spent time on it and the patch can work (even not well). diff --git a/Makefile b/Makefile index 7e2750f..2

[RFC 4/5] inode reservation v0.1 (benchmark result)

2007-05-23 Thread coly
Current patch avoids inodes from different directories mixed together in the inode table. Therefore the benchmakr emulate a situation that mixes inodes of different sub-directories together. and record the time on removing them all. In the first part, reserving 16 inodes for each new created direc

[RFC 5/5] inode reservation v0.1 (next step working)

2007-05-23 Thread coly
I/O for magic inode. 4, Modify mke2fs to support new on-disk layout for inode reservation. Coly - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Pl

[RFC 3/5] inode reservation v0.1 (e2fsprogs patch)

2007-05-23 Thread coly
This patch only makes mke2fs support on-disk layout for inode reservation. Just for experiment. e2fsck and other utils can not work with magic inode yet. diff -u -r e2fsprogs-1.39-tyt1/debugfs/debugfs.c ../e2fsprogs/debugfs/debugfs.c --- e2fsprogs-1.39-tyt1/debugfs/debugfs.c 2006-10-07 11:42:54.

Re: [RFC 2/5] inode reservation v0.1 (ext4 kernel patch)

2007-05-24 Thread coly
Dave, Yes, I found all TABs gone when I received the mail. When I post next version of the patch, I will test to send to me first :-) Thanks for your information. Coly 在 2007-05-24四的 08:20 -0500,Dave Kleikamp写道: > On Thu, 2007-05-24 at 02:06 +0800, coly wrote: > > The patch is genera

it seems Evolution remove the Tabs

2007-05-24 Thread coly
Hi, I tested again, it seems Evolution removes the Tabs with blanks. How to resolve this issue on Evolution ? I am trying :-) Coly 在 2007-05-25五的 07:52 +0200,Jan Engelhardt写道: > On May 25 2007 09:30, WANG Cong wrote: > >>> > >>>Yes, I found all TABs gone when I rec

Re: it seems Evolution remove the Tabs

2007-05-24 Thread coly
Andrew, Thanks for your information :-) Coly 在 2007-05-25五的 16:33 +1000,andrew hendry写道: > select your whole mail and use pre-format in evolution. > or change it to pre-format and do insert->text file. > this should send it with tabs intact, the confusing bit i think is if > you

[RFC] Designing and Implementation of Directory Inode Reservation

2007-03-26 Thread coly
Hi, list, I am working on the directory inode reservation feature now. Here is the detailed description of my understand of the designing, and current implementations. Please give me your comments on this idea. Thanks for your help in advance. Best regards. Coly Li

Re: [PATCH] ext4: dir inode reservation V3

2007-11-19 Thread Coly Li
Thanks for the feedback :-) Mingming Cao wrote: > On Tue, 2007-11-13 at 22:12 +0800, Coly Li wrote: >> Basic idea of my dir inode reservation patch can be found here, >> http://lists.openwall.net/linux-ext4/2007/11/05/3 >> >> 1, What does dir inode reservation do >&g

Re: [PATCH] ext4: dir inode reservation V3

2007-11-20 Thread Coly Li
Jan, Thanks for taking time to review the patch :-) Jan Kara wrote: > Hi Coly, > > finally I've found some time to have a look at a new version of your > patch. > >> 5, Performance number >> On a Core-Duo, 2MB DDM memory, 7200 RPM SATA PC, I built a 50GB

[PATCH] ext4: dir inode reservation V3

2007-11-13 Thread Coly Li
and other friendly guys who discussed ext4 stuffs with me in irc. Thanks to make me enjoy open source development. 7, Feedback For any feedback, criticism, please email to coyli at suse dot de. I am very happy to hear from you and improve the dir inode reservation patch. Signed-off-

Re: [PATCH] ext4: dir inode reservation V3

2007-11-13 Thread Coly Li
e so many empty directories, they also can mount the file system without dir inode reservation to get better performance. > thanks, Alex > > Coly Li wrote: >> normal ext4ext4 with dir inode reservation >> mount options:-o data=writeba

Re: [PATCH] ext4: dir inode reservation V3

2007-11-13 Thread Coly Li
Coly Li wrote: > Thanks for the feedback :-) > > Alex Tomas wrote: >> hmm. so you trade 265% degradation of creation for 40% improvement of >> unlink? >> > 265% degradation is only for creating 5 empty directories. This is not a > common case. > There ar

[PATCH] use VM_READ/WRITE/EXEC to set vm_page_prot

2007-09-02 Thread Coly Li
When setup vm_page_prot, some code use 0x7 instead of (VM_READ|VM_WRITE|VM_EXEC). It does works well, but it will be better if we use the VM_READ/WRITE/EXEC MACRO :-) This patch uses (VM_READ|VM_WRITE|VM_EXEC) to replace 0x7 in vm_page_prot setup. Signed-Off-By: Coly Li <[EMAIL PROTEC

[PATCH] obsolete fragment from ext4

2007-08-09 Thread Coly Li
linux-ext4 removing fragment supporting from e2fsprogs. I tested both patch. Signed-Off-By: Coly Li <[EMAIL PROTECTED]> diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 427f830..b8b538d 100644 - --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -576,11 +576,6 @@ got: /* dirsyn

Re: PROBLEM: oops, Linus tree: 2.6.23-g4fa4d23f, BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004

2007-10-20 Thread Coly Li
Guillaume Chazarain wrote: >>> BUG: unable to handle kernel NULL pointer dereference at virtual address >>> 0004 > > This should be fixed in recent git by > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b013e05e0289c190a53d78ca029e2f21c0e4485 > Maybe we encount

[PATCH] ext4: add bg_itable_unused_hi to group descriptor

2007-10-15 Thread Coly Li
This patch extends bg_itable_unused of ext4 group descriptor from 16bit into 32bit. In order to add bg_itable_unused_hi into struct ext4_group_desc, some extra fields which are already introduced into e2fsprogs are also added in for consistency. Signed-off-by: Coly Li <[EMAIL PROTECTED]&

[PATCH] setup vma->vm_page_prot by vm_get_page_prot()

2007-10-16 Thread Coly Li
ported to kerenl. Though inside vm_get_page_prot() the protection flags is AND with (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED), it does not hurt correct code. This patch can replace use-vm_read-write-exec-to-set-vm_page_prot.patch. Signed-off-by: Coly Li <[EMAIL PROTECTED]> Cc: Hugh Dickins <

Re: [PATCH v4] bcache: Don't reinvent the wheel but use existing llist API

2017-08-17 Thread Coly Li
it later. Thanks. Coly >> >> Signed-off-by: Byungchul Park >> Acked-by: Coly Li >> --- >> drivers/md/bcache/closure.c | 15 ++- >> 1 file changed, 2 insertions(+), 13 deletions(-) >> >> diff --git a/drivers/md/bcache/closure.c b/dri

Re: [PATCH] bcache: stop using the deprecated get_seconds()

2018-06-20 Thread Coly Li
the code comments in bcache.h looks good, if you want to send a single patch for the code comments for bcache.h, I would like to see it. Thanks. Coly Li > --- > drivers/md/bcache/super.c | 23 +-- > include/uapi/linux/bcache.h | 4 ++-- > 2 files changed,

Re: [PATCH] md/bcache: Remove NULL check.

2018-08-13 Thread Coly Li
ub/scm/linux/kernel/git/colyli/linux-bcache.git/?h=for-next The identical patch is, https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/commit/?h=for-next&id=26b39d0732955ecb839d0afe8d6211d70f213384 Thanks. Coly Li > --- > drivers/md/bcache/request.c | 3 +-- > 1

Re: [PATCH 2/2] bcache: add undef for macro in function

2018-08-14 Thread Coly Li
+#undef d_strtoul_nonzero > +#undef d_strtoi_h > return size; > } > > Hi Dongbo, Could you please to provide the motivation why you make this change ? Thanks. Coly Li

Re: [PATCH 2/2] bcache: add undef for macro in function

2018-08-14 Thread Coly Li
On 2018/8/14 10:59 PM, cdb...@163.com wrote: > Hi Coly, > The three macros is only locally used in func "__cached_dev",I think > they should be undefined before leaving the func. > Hi Dongbo, It is worthy to do this if there is a potential conflict. But they are defi

Re: [PATCH v1] lib: Remove 'default n' in Kconfig for tests

2018-07-19 Thread Coly Li
On 2018/7/19 4:51 PM, Andy Shevchenko wrote: > It seems contributors follow the style of Kconfig entries where explicit > 'default n' is present. The default 'default' is 'n' already, thus, drop > these lines from Kconfig to make it more clear. > >

Re: [PATCH v4 1/3] lib: add crc64 calculation routines

2018-07-24 Thread Coly Li
On 2018/7/24 12:26 PM, Eric Biggers wrote: > On Thu, Jul 19, 2018 at 12:55:43AM +0800, Coly Li wrote: >> This patch adds the re-write crc64 calculation routines for Linux kernel. >> The CRC64 polynomical arithmetic follows ECMA-182 specification, inspired > > "polynomic

Re: [PATCH v4 3/3] lib/test_crc: Add test cases for crc calculation

2018-07-24 Thread Coly Li
On 2018/7/25 1:39 AM, Eric Biggers wrote: > On Wed, Jul 25, 2018 at 12:28:15AM +0800, Coly Li wrote: >> On 2018/7/24 12:44 PM, Eric Biggers wrote: >>> On Thu, Jul 19, 2018 at 12:55:45AM +0800, Coly Li wrote: >>>> This patch adds a kernel module to test t

Re: [PATCH] bcache: io.c: Fix check against error_limit in case of io errors

2018-01-12 Thread Coly Li
my device failure patch set, its name is, bcache: set error_limit correctly The difference is, I remove the bit shift of error_limit. -- Coly Li

Re: [PATCH] bcache: btree.c: Fix GC thread exit in case of cache device failure and unregister

2018-01-12 Thread Coly Li
e stopped. In my device failure cache set, I add an io_disable (in v2 it is CACHE_SET_IO_DISABLE flag) to disable all cache set I/O, maybe it can be used to check the condition and break the while-loop. Thanks for the hint, I will also try to fix it in my patch set. If you don't mind, I am glad to have your "Reviewed-by:" after I post the v2 patch set. Thanks. -- Coly Li

Re: [PATCH] split if-condition code in bch_cache_set_alloc

2018-09-26 Thread Coly Li
On 9/26/18 5:00 PM, Dongbo Cao wrote: rebase my local code and commit it again. Signed-off-by: Dongbo Cao Hi Dongbo, The above commit log does not explain why you make this change (it might belong to changelog). Could you please to make it to be more informative ? Thanks. Coly Li

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Coly Li
Nice catch, this fix is quite important. I will try to submit to Jens ASAP. Thanks. Coly Li --- drivers/md/bcache/bcache.h | 1 + drivers/md/bcache/journal.c | 6 +++--- drivers/md/bcache/super.c | 8 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/md/bcach

Re: [PATCH] use STORE_LOCKED instead of STORE macro

2018-09-27 Thread Coly Li
On 9/27/18 1:31 PM, Dongbo Cao wrote: merge sysfs_writeback_running attr and sysfs_writeback_percent attr together with other attrs of cached_dev. Signed-off-by: Dongbo Cao Could you please to explain more what you want to do, and why you make this change? Thanks. Coly Li

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Coly Li
environment. Anyway, this is a patch I suggest to apply because it fix a real deadlock which is probably happens when system memory is exhausted. Thanks. Coly Li On 9/28/18 1:16 AM, Stefan Priebe - Profihost AG wrote: Hi Coly, is this the deadlock I reported some weeks ago? Greets, Stefan

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-09-27 Thread Coly Li
On 9/27/18 11:53 PM, Eddie Chapman wrote: On 27/09/18 16:23, Coly Li wrote: On 9/27/18 9:45 PM, guoju wrote: After write SSD completed, bcache schedule journal_write work to system_wq, that is a public workqueue in system, without WQ_MEM_RECLAIM flag. system_wq is also a bound wq, and there

Re: [PATCH 1/3] bcache: do not assign in if condition register_bcache()

2018-06-18 Thread Coly Li
On 2018/6/18 6:09 PM, Florian Schmaus wrote: > Fixes an error condition reported by checkpatch.pl which is caused by > assigning a variable in an if condition. > > Signed-off-by: Florian Schmaus Signed-off-by: Coly Li Added into for-next patch set. Thanks. Coly Li > --

Re: [PATCH 2/3] bcache: do not assign in if condition in bcache_init()

2018-06-18 Thread Coly Li
On 2018/6/18 6:09 PM, Florian Schmaus wrote: > Fixes an error condition reported by checkpatch.pl which is caused by > assigning a variable in an if condition. > > Signed-off-by: Florian Schmaus Signed-off-by: Coly Li Added into for-next patch set. Thanks. Coly Li > --

Re: [PATCH 3/3] bcache: do not assign in if condition in bcache_device_init()

2018-06-18 Thread Coly Li
ida_simple_remove(&bcache_device_idx, idx); > - return -ENOMEM; > - } > + BIOSET_NEED_BVECS|BIOSET_NEED_RESCUER)) Signed-off-by: Coly Li I fix the above indent and added the patch into for-next patch set. Thanks. Coly Li > +

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Coly Li
st() by __sysfs_match_string()". That means this patch will conflict with existing changes. Thanks. Coly Li > --- > drivers/md/bcache/util.c | 9 ++--- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c &g

Re: [PATCH v2 19/21] bcache: use match_string() helper

2018-05-31 Thread Coly Li
On 2018/6/1 12:32 PM, Yisheng Xie wrote: > Hi Coly, > > On 2018/6/1 11:45, Coly Li wrote: >> On 2018/5/31 7:11 PM, Yisheng Xie wrote: >>> match_string() returns the index of an array for a matching string, >>> which can be used instead of open coded variant. &g

Re: [PATCH] bcache: fix indentation issue, remove tabs on a hunk of code

2018-12-22 Thread Coly Li
On 12/22/18 7:18 上午, Colin King wrote: > From: Colin Ian King > > There is a hunk of code that is indented one level too deep, fix this > by removing the extra tabs. > > Signed-off-by: Colin Ian King Hi Colin, Nice catch, thank you! I will add it into my for-next d

Re: [PATCH v5 1/2] lib: add crc64 calculation routines

2018-12-28 Thread Coly Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 12/29/18 10:58 上午, NeilBrown wrote: > On Thu, Jul 26 2018, Andrew Morton wrote: > >> On Thu, 26 Jul 2018 13:33:51 +0800 Coly Li >> wrote: >> >>> This patch adds the re-write crc64 calculation routines for >&

Re: [PATCH] bcache: add separate workqueue for journal_write to avoid deadlock

2018-10-15 Thread Coly Li
On 2018/10/4 下午10:07, Eddie Chapman wrote: > On 28/09/18 03:32, Coly Li wrote: >> >> On 9/27/18 11:53 PM, Eddie Chapman wrote: >>> On 27/09/18 16:23, Coly Li wrote: >>>> >>>> On 9/27/18 9:45 PM, guoju wrote: >>>>> After write SSD c

Re: [PATCH 2/4] lib: add crc64 calculation routines

2018-07-16 Thread Coly Li
On 2018/7/17 11:34 AM, Eric Biggers wrote: > Hi Coly, > > On Tue, Jul 17, 2018 at 12:55:05AM +0800, Coly Li wrote: >> This patch adds the re-write crc64 calculation routines for Linux kernel. >> The CRC64 polynomical arithmetic follows ECMA-182 specification, inspired >&g

Re: hci_sock.c build failure

2007-09-12 Thread Coly Li
David Miller 写道: > From: Greg KH <[EMAIL PROTECTED]> > Date: Wed, 12 Sep 2007 05:02:53 -0700 > >> It's not even a randconfig issue, my build dies too (this is Linus's >> current tree.) >> >> Time to poke through the 10 bluetooth patches that were just added... > > I'll push the following fix to L

Re: hci_sock.c build failure

2007-09-12 Thread Coly Li
Coly Li 写道: > David Miller 写道: >> From: Greg KH <[EMAIL PROTECTED]> >> Date: Wed, 12 Sep 2007 05:02:53 -0700 >> >>> It's not even a randconfig issue, my build dies too (this is Linus's >>> current tree.) >>> >>> Time to poke

Re: how to send a text format emai?

2007-08-18 Thread Coly Li
The email you sent seems to be pure text, from my email client. Xu Yang wrote: > how to send a email of text format? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-inf

Re: [PATCH] bcache: avoid clang -Wunintialized warning

2019-04-25 Thread Coly Li
bucket; >> >> -fifo_pop(&ca->free_inc, bucket); >> +if (!fifo_pop(&ca->free_inc, bucket)) >> +break; >> >> if (ca->discard) { >> mutex_unlock(&ca->set->bucket_lock); >> -- >> 2.20.0 >> > > Hi all, > > Could someone please review/pick this up? This is one of two remaining > -Wsometimes-uninitialized warnings among arm, arm64, and x86_64 > all{yes,mod}config and I'd like to get it turned on as soon as possible > to catch more bugs. Hi Nathan, It is in Jens' block tree for-next branch already, for Linux v5.2 merge window. Thanks. -- Coly Li

Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-06 Thread Coly Li
944,6 +941,7 @@ void bch_cached_dev_run(struct cached_dev *dc) > kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env); > kfree(env[1]); > kfree(env[2]); Same problem might happen here for env[2]. > + kfree(buf); > > if (sysfs_create_link(&d->kobj, &disk_to_dev(d->disk)->kobj, "dev") || > sysfs_create_link(&disk_to_dev(d->disk)->kobj, &d->kobj, "bcache")) > -- Coly Li

Re: bcache on XFS: metadata I/O (dirent I/O?) not getting cached at all?

2019-02-06 Thread Coly Li
REQ_PRIO is used for block layer to handle metadata IO. I discussed with Christoph Hellwig about this topic quite long time ago, and got the above conclusion. If different file system handles metadata flags in unified ways, it is OK to me to change the code to: !(bio->bi_opf & (REQ_META |REQ_PRIO)). Thanks in advance. -- Coly Li

Re: bcache on XFS: metadata I/O (dirent I/O?) not getting cached at all?

2019-02-06 Thread Coly Li
st of time REQ_META and REQ_PRIO are tagged together for bio, but XFS seems not use REQ_PRIO. Is there any basic principle for when should these tags to be used or not ? e.g. If REQ_META is enough for meta data I/O, why REQ_PRIO is used too. And if REQ_PRIO is necessary, why it is not used in fs/xfs/ code ? > > So, yeah, that needs to be reverted if you want bcache to function > properly for metadata caching. Sure, I will fix this, once I make it clear to me. Thanks for the hint. -- Coly Li

Re: bcache on XFS: metadata I/O (dirent I/O?) not getting cached at all?

2019-02-07 Thread Coly Li
ender bcache more or less useless with XFS, > since bcache's primary raison d'etre is precisely to cache seeky stuff > like metadata. :( > Hi Nix, Could you please to try whether the attached patch makes things better ? Thanks in advance for your help. -- Coly Li From 7c27e

Re: bcache on XFS: metadata I/O (dirent I/O?) not getting cached at all?

2019-02-07 Thread Coly Li
On 2019/2/7 11:10 上午, Dave Chinner wrote: > On Thu, Feb 07, 2019 at 10:38:58AM +0800, Coly Li wrote: >> On 2019/2/7 10:26 上午, Dave Chinner wrote: >>> On Thu, Feb 07, 2019 at 01:24:25AM +0100, Andre Noll wrote: >>>> On Thu, Feb 07, 10:43, Dave Chinner wrote >>

Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-26 Thread Coly Li
On 2019/2/26 6:01 下午, Geliang Tang wrote: > On Wed, Feb 06, 2019 at 04:37:36PM +0800, Coly Li wrote: >> On 2019/1/30 5:29 下午, Geliang Tang wrote: >>> This patch uses kmemdup_nul to create a NUL-terminated string from >>> dc->sb.label. This is better than open coding

Re: [PATCH][next] bcache: Use 64-bit arithmetic instead of 32-bit

2021-02-12 Thread Coly Li
gh * > (c->gc_stats.in_use - > BCH_WRITEBACK_FRAGMENT_THRESHOLD_HIGH); > } > fps = div_s64(dirty, dirty_buckets) * fp_term; > Hmm, should such thing be handled by compiler ? Otherwise this kind of potential overflow issue will be endless time to time. I am not a compiler expert, should we have to do such explicit type cast all the time ? Coly Li

Re: [PATCH][next] bcache: Use 64-bit arithmetic instead of 32-bit

2021-02-12 Thread Coly Li
fp_term is 64bit and upgrade the product to 64bit. The above is just my guess, because I feel compiling should have the clue for the product upgrade to avoid overflow. But I almost know nothing about compiler internal > > I hope BCH_WRITEBACK_FRAGMENT_THRESHOLD_LOW is zero :-) Why BCH_WRITEBACK_FRAGMENT_THRESHOLD_LOW being zero can be helpful to avoid the overflow ? Could you please to provide more detailed information. I am not challenging you, I just want to extend my knowledge by learning from you. Thanks in advance. Coly Li

Re: [PATCH][next] bcache: Use 64-bit arithmetic instead of 32-bit

2021-02-13 Thread Coly Li
On 2/13/21 12:42 AM, David Laight wrote: > From: Coly Li >> Sent: 12 February 2021 16:02 >> >> On 2/12/21 11:31 PM, David Laight wrote: >>>>> if (c->gc_stats.in_use <= BCH_WRITEBACK_FRAGMENT_THRESHOLD_MID) >>>>> { >>

Re: [PATCH 13/29] bcache: Avoid comma separated statements

2021-01-31 Thread Coly Li
On 1/31/21 2:59 AM, Joe Perches wrote: > On Mon, 2020-08-24 at 21:56 -0700, Joe Perches wrote: >> Use semicolons and braces. > > ping? It is in my for-next now, thanks for reminding. Coly Li > >> Signed-off-by: Joe Perches >> --- >>  drivers/md/bcache/b

Re: [PATCH 1/1] block: move the PAGE_SECTORS definition into

2020-08-20 Thread Coly Li
4KB: currently in bcache code the sector size is assumed to be 512 sectors, if kernel page > 4KB, it is possible that PAGE_SECTORS in bcache will be a number > 8 ? Thanks. Coly Li > --- > drivers/block/brd.c | 1 - > drivers/block/null_blk_main.c | 1 - > drivers/md/

Re: [PATCH v3] block: check queue's limits.discard_granularity in __blkdev_issue_discard()

2020-08-05 Thread Coly Li
On 2020/8/5 17:22, Jinpu Wang wrote: > Hi Coly, > > one question below: > Coly Li 于2020年8月5日周三 上午8:36写道: >> >> If create a loop device with a backing NVMe SSD, current loop device >> driver doesn't correctly set its queue's limits.discard_granularity and

Re: [PATCH v3] block: check queue's limits.discard_granularity in __blkdev_issue_discard()

2020-08-05 Thread Coly Li
On 2020/8/5 23:48, Darrick J. Wong wrote: > On Wed, Aug 05, 2020 at 02:31:50PM +0800, Coly Li wrote: >> If create a loop device with a backing NVMe SSD, current loop device >> driver doesn't correctly set its queue's limits.discard_granularity and >> leaves it as 0

[PATCH v4] block: check queue's limits.discard_granularity in __blkdev_issue_discard()

2020-08-05 Thread Coly Li
Fixes: c52abf563049 ("loop: Better discard support for block devices") Reported-and-suggested-by: Ming Lei Signed-off-by: Coly Li Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: Enzo M

[PATCH] docs: update trusted-encrypted.rst

2020-08-07 Thread Coly Li
The parameters in tmp2 commands are outdated, people are not able to create trusted key by the example commands. This patch updates the paramerters of tpm2 commands, they are verified by tpm2-tools-4.1 with Linux v5.8 kernel. Signed-off-by: Coly Li Cc: Stefan Berger Cc: Dan Williams Cc: Mimi

Re: [PATCH v5 1/3] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Coly Li
On 2020/8/18 16:08, Eric Dumazet wrote: > > > On 8/16/20 12:08 AM, Coly Li wrote: >> The original problem was from nvme-over-tcp code, who mistakenly uses >> kernel_sendpage() to send pages allocated by __get_free_pages() without >> __GFP_COMP flag. Such pages don

[PATCH v6 4/6] drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage()

2020-08-18 Thread Coly Li
at macro sendpage_ok() does, which is introduced into include/linux/net.h to solve a similar send page issue in nvme-tcp code. This patch uses macro sendpage_ok() to replace the open coded checks to page type and refcount in _drbd_send_page(), as a code cleanup. Signed-off-by: Coly Li Cc: Philipp Rei

[PATCH v6 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Coly Li
want to send page to remote end by kernel_sendpage() may use this helper to check whether the page is OK. If the helper does not return true, the driver should try other non sendpage method (e.g. sock_no_sendpage()) to handle the page. Signed-off-by: Coly Li Cc: Chaitanya Kulkarni Cc: Chri

[PATCH v6 0/6] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-08-18 Thread Coly Li
ce existing open coded checks with the inline sendpage_ok() routine. Coly Li Cc: Chaitanya Kulkarni Cc: Chris Leech Cc: Christoph Hellwig Cc: Cong Wang Cc: David S. Miller Cc: Hannes Reinecke Cc: Ilya Dryomov Cc: Jan Kara Cc: Jeff Layton Cc: Jens Axboe Cc: Lee Duncan Cc: Mike Christie

[PATCH v6 2/6] nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage()

2020-08-18 Thread Coly Li
e use sock_no_sendpage to handle this page. Signed-off-by: Coly Li Cc: Chaitanya Kulkarni Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Jan Kara Cc: Jens Axboe Cc: Mikhail Skorzhinskii Cc: Philipp Reisner Cc: Sagi Grimberg Cc: Vlastimil Babka Cc: sta...@vger.kernel.org --- drivers/nvme

[PATCH v6 6/6] libceph: use sendpage_ok() in ceph_tcp_sendpage()

2020-08-18 Thread Coly Li
e_ok() as a code cleanup. Signed-off-by: Coly Li Cc: Ilya Dryomov Cc: Jeff Layton --- net/ceph/messenger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 27d6ab11f9ee..6a349da7f013 100644 --- a/net/ceph/messenger.c +++ b/net/

[PATCH v6 5/6] scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map()

2020-08-18 Thread Coly Li
" part is to make sure the page can be sent to network layer's zero copy path. This part is exactly what sendpage_ok() does. This patch uses use sendpage_ok() in iscsi_tcp_segment_map() to replace the original open coded checks. Signed-off-by: Coly Li Cc: Vasily Averin Cc: Cong Wang

[PATCH v6 3/6] tcp: use sendpage_ok() to detect misused .sendpage

2020-08-18 Thread Coly Li
Slab objects") Suggested-by: Eric Dumazet Signed-off-by: Coly Li Cc: Vasily Averin Cc: David S. Miller Cc: sta...@vger.kernel.org --- net/ipv4/tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 31f3b858db81..d96c7549895a 100

[PATCH v7 0/6] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-08-18 Thread Coly Li
ce existing open coded checks with the inline sendpage_ok() routine. Coly Li Cc: Chaitanya Kulkarni Cc: Chris Leech Cc: Christoph Hellwig Cc: Cong Wang Cc: David S. Miller Cc: Eric Dumazet Cc: Hannes Reinecke Cc: Ilya Dryomov Cc: Jan Kara Cc: Jeff Layton Cc: Jens Axboe Cc: Lee Dunca

[PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Coly Li
want to send page to remote end by kernel_sendpage() may use this helper to check whether the page is OK. If the helper does not return true, the driver should try other non sendpage method (e.g. sock_no_sendpage()) to handle the page. Signed-off-by: Coly Li Cc: Chaitanya Kulkarni Cc: Chri

[PATCH v7 3/6] tcp: use sendpage_ok() to detect misused .sendpage

2020-08-18 Thread Coly Li
Slab objects") Suggested-by: Eric Dumazet Signed-off-by: Coly Li Cc: Vasily Averin Cc: David S. Miller Cc: sta...@vger.kernel.org --- net/ipv4/tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 31f3b858db81..2135ee7c806d 100

[PATCH v7 6/6] libceph: use sendpage_ok() in ceph_tcp_sendpage()

2020-08-18 Thread Coly Li
e_ok() as a code cleanup. Signed-off-by: Coly Li Cc: Ilya Dryomov Cc: Jeff Layton --- net/ceph/messenger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 27d6ab11f9ee..6a349da7f013 100644 --- a/net/ceph/messenger.c +++ b/net/

[PATCH v7 4/6] drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage()

2020-08-18 Thread Coly Li
at macro sendpage_ok() does, which is introduced into include/linux/net.h to solve a similar send page issue in nvme-tcp code. This patch uses macro sendpage_ok() to replace the open coded checks to page type and refcount in _drbd_send_page(), as a code cleanup. Signed-off-by: Coly Li Cc: Philipp Rei

[PATCH v7 5/6] scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map()

2020-08-18 Thread Coly Li
" part is to make sure the page can be sent to network layer's zero copy path. This part is exactly what sendpage_ok() does. This patch uses use sendpage_ok() in iscsi_tcp_segment_map() to replace the original open coded checks. Signed-off-by: Coly Li Cc: Vasily Averin Cc: Cong Wang

[PATCH v7 2/6] nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage()

2020-08-18 Thread Coly Li
e use sock_no_sendpage to handle this page. Signed-off-by: Coly Li Cc: Chaitanya Kulkarni Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Jan Kara Cc: Jens Axboe Cc: Mikhail Skorzhinskii Cc: Philipp Reisner Cc: Sagi Grimberg Cc: Vlastimil Babka Cc: sta...@vger.kernel.org --- drivers/nvme

Re: [PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Coly Li
And maybe the fix in nvme-tcp driver and do_tcp_sendpages() are still necessary. I am not network expert, this is my opinion for reference. Coly Li > --- > From 4867e158ee86ebd801b4c267e8f8a4a762a71343 Mon Sep 17 00:00:00 2001 > From: Christoph Hellwig > Date: Tue, 18 Aug 2020 18:19:23

[PATCH v3] docs: trusted-encrypted.rst: update parameters for command examples

2020-08-18 Thread Coly Li
Linux kernel v5.8 and tpm2-tools-4.1, people can create a trusted key by following the examples in this document. Signed-off-by: Coly Li Cc: Dan Williams Cc: James Bottomley Cc: Jarkko Sakkinen Cc: Mimi Zohar Cc: Stefan Berger --- Changelog: v3: update commit log with review comments from

Re: [PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Coly Li
On 2020/8/19 03:49, Christoph Hellwig wrote: > On Wed, Aug 19, 2020 at 12:33:37AM +0800, Coly Li wrote: >> On 2020/8/19 00:24, Christoph Hellwig wrote: >>> I think we should go for something simple like this instead: >> >> This idea is fine to me. Should a warning

Re: [PATCH] bcache: consider the fragmentation when update the writeback rate

2020-12-21 Thread Coly Li
On 12/21/20 12:06 PM, Dongdong Tao wrote: > Hi Coly, > > Thank you so much for your prompt reply! > > So, I've performed the same fio testing based on 1TB NVME and 10 TB HDD > disk as the backing device. > I've run them both for about 4 hours, since it's 1TB

Re: [PATCH -next] md: bcache: use DEFINE_MUTEX (and mutex_init() had been too late)

2020-12-23 Thread Coly Li
On 12/23/20 10:12 PM, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun NACK. The commit log is necessary to explain why it is too late, IMHO I don't find the implicit reason from the patch. Coly Li > --- > drivers/md/bcache/super.c | 3 +-- > 1 file changed, 1 insertio

Re: [PATCH] bcache: consider the fragmentation when update the writeback rate

2021-01-19 Thread Coly Li
23,9 @@ void bch_cached_dev_writeback_init(struct cached_dev *dc) > > dc->writeback_rate_update_seconds = WRITEBACK_RATE_UPDATE_SECS_DEFAULT; > dc->writeback_rate_p_term_inverse = 40; > + dc->writeback_rate_fp_term_low = 1; > + dc->writeback_rate_fp_term_mid = 10; > + dc->writeback_rate_fp_term_high = 1000; Could you please to explain a bit how the above 3 numbers are decided ? > dc->writeback_rate_i_term_inverse = 1; > > WARN_ON(test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)); > diff --git a/drivers/md/bcache/writeback.h b/drivers/md/bcache/writeback.h > index 3f1230e22de0..02b2f9df73f6 100644 > --- a/drivers/md/bcache/writeback.h > +++ b/drivers/md/bcache/writeback.h > @@ -16,6 +16,10 @@ > > #define BCH_AUTO_GC_DIRTY_THRESHOLD 50 > > +#define BCH_WRITEBACK_FRAGMENT_THRESHOLD_LOW 50 > +#define BCH_WRITEBACK_FRAGMENT_THRESHOLD_MID 57 > +#define BCH_WRITEBACK_FRAGMENT_THRESHOLD_HIGH 64 > + > #define BCH_DIRTY_INIT_THRD_MAX 64 > /* > * 14 (16384ths) is chosen here as something that each backing device > Thanks in advance. Coly Li

Re: [PATCH] bcache: consider the fragmentation when update the writeback rate

2021-01-07 Thread Coly Li
On 1/7/21 10:55 PM, Dongdong Tao wrote: > Hi Coly, > > > Thanks for the reminder, I understand that the rate is only a hint of > the throughput, it’s a value to calculate the sleep time between each > round of keys writeback, the higher the rate, the shorter the sleep > t

Re: [PATCH] bcache: consider the fragmentation when update the writeback rate

2021-01-08 Thread Coly Li
On 1/8/21 4:30 PM, Dongdong Tao wrote: > Hi Coly, > > They are captured with the same time length, the meaning of the > timestamp and the time unit on the x-axis are different. > (Sorry, I should have clarified this right after the chart) > > For the latency chart: &

Re: [PATCH] bcache: consider the fragmentation when update the writeback rate

2021-01-14 Thread Coly Li
On 1/14/21 12:45 PM, Dongdong Tao wrote: > Hi Coly, > > I've got the testing data for multiple threads with larger IO depth. > Hi Dongdong, Thanks for the testing number. > *Here is the testing steps: > *1. make-bcache -B <> -C <> --writeback > > 2. O

Re: [PATCH] bcache: consider the fragmentation when update the writeback rate

2021-01-14 Thread Coly Li
On 1/14/21 8:22 PM, Dongdong Tao wrote: > Hi Coly, > > Why you limit the iodeph to 8 and iops to 150 on cache device? > For cache device the limitation is small. Iosp 150 with 4KB block size, > it means every hour writing (150*4*60*60=216KB=) 2GB data. For 35 > hou

Re: [PATCH] bcache: set pdev_set_uuid before scond loop iteration

2020-12-23 Thread Coly Li
On 12/24/20 9:53 AM, Yi Li wrote: > There is no need to reassign pdev_set_uuid in the second loop iteration, > so move it to the place before second loop. > > Signed-off-by: Yi Li Added into my for-next directory. Thanks. Coly Li > --- > drivers/md/bcache/super.c | 2 +- &g

Re: [PATCH v2 -next] md: bcache: use DEFINE_MUTEX() for mutex lock

2020-12-24 Thread Coly Li
this change makes bcache.ko bigger and I don't see any benefit. Coly Li > --- > drivers/md/bcache/super.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c > index 46a00134a36a..963d62a15f

Re: [PATCH] md: bcache: fix error return code of cached_dev_cache_miss()

2021-03-04 Thread Coly Li
want the lookup to try more times (because GFP_NOIO is set), which is much better then returning -EIO immediately to caller. Therefore NOT setting ret to -ENOMEM in the patching location should be an on-purpose coding, IMHO. Thanks. Coly Li

Re: [RFC PATCH v1 1/6] badblocks: add more helper structure and routines in badblocks.h

2021-03-03 Thread Coly Li
On 3/3/21 4:20 PM, Hannes Reinecke wrote: > On 3/2/21 5:02 AM, Coly Li wrote: >> This patch adds the following helper structure and routines into >> badblocks.h, >> - struct bad_context >> This structure is used in improved badblocks code for bad table >>

Re: [PATCH -next v2] bcache: use DEFINE_MUTEX() for mutex lock

2021-04-07 Thread Coly Li
nced, it is fair to take this patch in. Could you please post a v3 version which removes the .bss information ? Coly Li > here is the statistics: > Sections: (arm64 platform) > Idx name size > -.init.text 0240 > +.init.text 0228 > > -.ro

Re: [PATCH][next] bcache: Set error return err to -ENOMEM on allocation failure

2021-04-19 Thread Coly Li
> } > > + err = -ENOMEM; > ns = kzalloc(sizeof(struct bch_nvm_namespace), GFP_KERNEL); > if (!ns) > goto bdput; > Copied, added into my queue for rc1. Thanks. Coly Li

Re: linux-next: Tree for Apr 19 (bcache)

2021-04-19 Thread Coly Li
IMM" and "select DAX" to "depends on LIBNVDIMM" and "depends on DAX" in bcache Kconfig - Or change "depends on BLK_DEV" to "select BLK_DEV" in nvdimm Kconfig. I want to ask for a proper way to handle such dependence, and I will follow the guide for now and in future. Thanks in advance for the advice. Coly Li

Re: linux-next: Tree for Apr 19 (bcache)

2021-04-19 Thread Coly Li
On 4/20/21 1:50 AM, Jens Axboe wrote: > On 4/19/21 10:26 AM, Coly Li wrote: >> On 4/19/21 11:40 PM, Randy Dunlap wrote: >>> On 4/19/21 3:23 AM, Stephen Rothwell wrote: >>>> Hi all, >>>> >>>> Changes since 20210416: >>>&g

Re: [PATCH] md: bcache: Trivial typo fixes in the file journal.c

2021-03-16 Thread Coly Li
On 3/17/21 12:30 PM, Bhaskar Chowdhury wrote: > > s/condidate/candidate/ > s/folowing/following/ > > Signed-off-by: Bhaskar Chowdhury I will add it in my for-next queue. Thanks. Coly Li > --- > drivers/md/bcache/journal.c | 4 ++-- > 1 file changed, 2 in

Re: [RFC PATCH] badblocks: Improvement badblocks_set() for handling multiple ranges

2020-12-20 Thread Coly Li
On 12/20/20 4:02 AM, antlists wrote: > On 03/12/2020 17:15, Coly Li wrote: >> This patch is an initial effort to improve badblocks_set() for setting >> bad blocks range when it covers multiple already set bad ranges in the >> bad blocks table, and to do it as fast as possib

Re: [RFC PATCH] badblocks: Improvement badblocks_set() for handling multiple ranges

2020-12-20 Thread Coly Li
On 12/18/20 11:25 AM, Dan Williams wrote: > [ add Neil, original gooodguy who wrote badblocks ] > > > On Thu, Dec 3, 2020 at 9:16 AM Coly Li wrote: >> >> Recently I received a bug report that current badblocks code does not >> properly handl

Re: [PATCH] bcache: Trivial fix to bdput

2020-12-20 Thread Coly Li
On 12/21/20 11:17 AM, Yi Li wrote: > Trivial fix to bdput. > > Signed-off-by: Yi Li e Hi Yi, Indeed these two fixes are not that trivial. I suggest to describe more detail about why your fixes are necessary and what problems are fixed by your patches. Thanks. Coly Li > --- &

Re: [PATCH] bcache: fix panic due to cache_set is null

2020-12-01 Thread Coly Li
sy to response. Thanks. Coly LI > IP: [] update_writeback_rate+0x59/0x3a0 [bcache] > PGD 879620067 PUD 8755d3067 PMD 0 > Oops: [#1] SMP > CPU: 8 PID: 1005702 Comm: kworker/8:0 Tainted: G 4.4.0+10 #1 > Hardware name: Intel BIOS SE5C610.86B.01.01.0021.032120170601 03/

  1   2   3   >