Re: KASAN: use-after-free Read in ceph_mdsc_destroy

2020-07-23 Thread Xiubo Li
On 2020/7/23 14:27, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:f932d58a Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=152c6a8090 kernel config:

Re: netfilter: does the API break or something else ?

2020-05-14 Thread Xiubo Li
On 2020/5/14 18:54, Phil Sutter wrote: Hi, On Wed, May 13, 2020 at 11:20:35PM +0800, Xiubo Li wrote: Recently I hit one netfilter issue, it seems the API breaks or something else. Just for the record, this was caused by a misconfigured kernel. Yeah, thanks Phil for your help. BRs Xiubo

netfilter: does the API break or something else ?

2020-05-13 Thread Xiubo Li
Hi Experts, Recently I hit one netfilter issue, it seems the API breaks or something else. On CentOS8.1 with the recent upstream kernel built from source, such as 5.6.0-rc6/5.7.0-rc4. When running the following command: $ sudo bash -c 'iptables -A FORWARD -o enp3s0f1 -i ceph-brx -j ACCEPT'

Re: [PATCH RESEND] nbd: avoid losing pointer to reallocated config->socks in nbd_add_socket

2019-09-21 Thread Xiubo Li
On 2019/9/21 0:06, Eugene Syromiatnikov wrote: In the (very unlikely) case of config->socks reallocation success and nsock allocation failure config->nsock will not get updated with the new pointer to socks array. Fix it by updating config->socks right after reallocation successfulness check.

Re: [RFC PATCH] memalloc_noio: update the comment to make it cleaner

2019-09-18 Thread Xiubo Li
On 2019/9/18 16:14, Michal Hocko wrote: On Wed 18-09-19 16:02:52, Xiubo Li wrote: On 2019/9/18 15:25, Michal Hocko wrote: On Wed 18-09-19 04:58:20, xiu...@redhat.com wrote: From: Xiubo Li The GFP_NOIO means all further allocations will implicitly drop both __GFP_IO and __GFP_FS flags and so

Re: [RFC PATCH] memalloc_noio: update the comment to make it cleaner

2019-09-18 Thread Xiubo Li
On 2019/9/18 15:25, Michal Hocko wrote: On Wed 18-09-19 04:58:20, xiu...@redhat.com wrote: From: Xiubo Li The GFP_NOIO means all further allocations will implicitly drop both __GFP_IO and __GFP_FS flags and so they are safe for both the IO critical section and the the critical section from

Re: [PATCH v3] driver: uio: fix possible memory leak in uio_open

2019-01-02 Thread Xiubo Li
On 2019/1/3 22:28, liujian wrote: Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered") Signed-off-by: liujian --- v1->v2: rename the "err_infoopen" to "err_idev_info" v2->3: put the extra info after the "--" Looks good to me. Thanks. BRs drivers/uio/uio.c | 7 ---

Re: [PATCH] driver: uio: fix possible memory leak in uio_open

2019-01-01 Thread Xiubo Li
On 2019/1/3 0:26, liujian wrote: Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered") Signed-off-by: liujian --- drivers/uio/uio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5c10fc7..bde7d7a 100644 ---

Re: Problems with uio_pci_generic in v4.18-rc8

2018-08-12 Thread Xiubo Li
On 2018/8/12 19:03, gre...@linuxfoundation.org wrote: On Sun, Aug 12, 2018 at 06:55:58PM +0800, Xiubo Li wrote: Hi Harris, Since the lock protection in uio irq handler is useless currently as discussed in the mail list, so I will revert this commit with small changes and now the testing based

Re: Problems with uio_pci_generic in v4.18-rc8

2018-08-12 Thread Xiubo Li
On 2018/8/12 19:03, gre...@linuxfoundation.org wrote: On Sun, Aug 12, 2018 at 06:55:58PM +0800, Xiubo Li wrote: Hi Harris, Since the lock protection in uio irq handler is useless currently as discussed in the mail list, so I will revert this commit with small changes and now the testing based

Re: Problems with uio_pci_generic in v4.18-rc8

2018-08-12 Thread Xiubo Li
Hi Harris, Since the lock protection in uio irq handler is useless currently as discussed in the mail list, so I will revert this commit with small changes and now the testing based LIO/TCMU has been finished. Thanks, BRs On 2018/8/11 5:12, Harris, James R wrote: Hi, Using Linux kernel

Re: Problems with uio_pci_generic in v4.18-rc8

2018-08-12 Thread Xiubo Li
Hi Harris, Since the lock protection in uio irq handler is useless currently as discussed in the mail list, so I will revert this commit with small changes and now the testing based LIO/TCMU has been finished. Thanks, BRs On 2018/8/11 5:12, Harris, James R wrote: Hi, Using Linux kernel

Re: [PATCH] uio: fix wrong return value from uio_mmap()

2018-07-19 Thread Xiubo Li
after the device is unregistered") CC: Xiubo Li Signed-off-by: Hailong Liu Signed-off-by: Jiang Biao --- drivers/uio/uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5d421d7..0ddfda2 100644 --- a/drivers/uio/uio.c +++ b/d

Re: [PATCH] uio: fix wrong return value from uio_mmap()

2018-07-19 Thread Xiubo Li
after the device is unregistered") CC: Xiubo Li Signed-off-by: Hailong Liu Signed-off-by: Jiang Biao --- drivers/uio/uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5d421d7..0ddfda2 100644 --- a/drivers/uio/uio.c +++ b/d

Re: [PATCH v4 0/3] uio: fix potential crash bug

2018-07-15 Thread Xiubo Li
series of yours has caused no regression in our scenario. This was tested on PPC 64 bit system (NXP T2081). Hi Hamish, Cool and thanks very much for your testing about this. BRs Xiubo Thanks for resolving that. Regards, Hamish M. On 07/07/2018 02:05 PM, xiu...@redhat.com wrote: From: Xiubo Li

Re: [PATCH v4 0/3] uio: fix potential crash bug

2018-07-15 Thread Xiubo Li
series of yours has caused no regression in our scenario. This was tested on PPC 64 bit system (NXP T2081). Hi Hamish, Cool and thanks very much for your testing about this. BRs Xiubo Thanks for resolving that. Regards, Hamish M. On 07/07/2018 02:05 PM, xiu...@redhat.com wrote: From: Xiubo Li

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-09 Thread Xiubo Li
On 2018/7/10 1:06, Mike Christie wrote: On 07/06/2018 08:28 PM, Xiubo Li wrote: On 2018/7/7 2:23, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: static irqreturn_t uio_interrupt(int irq, void *dev_id) { struct uio_device *idev = (struct uio_device *)dev_id

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-09 Thread Xiubo Li
On 2018/7/10 1:06, Mike Christie wrote: On 07/06/2018 08:28 PM, Xiubo Li wrote: On 2018/7/7 2:23, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: static irqreturn_t uio_interrupt(int irq, void *dev_id) { struct uio_device *idev = (struct uio_device *)dev_id

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-09 Thread Xiubo Li
On 2018/7/10 0:40, Mike Christie wrote: On 07/06/2018 08:47 PM, Xiubo Li wrote: On 2018/7/7 2:58, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: void uio_event_notify(struct uio_info *info) { -struct uio_device *idev = info->uio_dev; +struct uio_dev

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-09 Thread Xiubo Li
On 2018/7/10 0:40, Mike Christie wrote: On 07/06/2018 08:47 PM, Xiubo Li wrote: On 2018/7/7 2:58, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: void uio_event_notify(struct uio_info *info) { -struct uio_device *idev = info->uio_dev; +struct uio_dev

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-06 Thread Xiubo Li
On 2018/7/7 2:58, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: void uio_event_notify(struct uio_info *info) { - struct uio_device *idev = info->uio_dev; + struct uio_device *idev; + + if (!info) + return; + + idev =

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-06 Thread Xiubo Li
On 2018/7/7 2:58, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: void uio_event_notify(struct uio_info *info) { - struct uio_device *idev = info->uio_dev; + struct uio_device *idev; + + if (!info) + return; + + idev =

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-06 Thread Xiubo Li
On 2018/7/7 2:23, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: static irqreturn_t uio_interrupt(int irq, void *dev_id) { struct uio_device *idev = (struct uio_device *)dev_id; - irqreturn_t ret = idev->info->handler(irq, idev->info); +

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-06 Thread Xiubo Li
On 2018/7/7 2:23, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: static irqreturn_t uio_interrupt(int irq, void *dev_id) { struct uio_device *idev = (struct uio_device *)dev_id; - irqreturn_t ret = idev->info->handler(irq, idev->info); +

Re: [PATCH v3 0/3] uio: fix potential crash bug

2018-07-06 Thread Xiubo Li
intend to report back to you by July 13th. Hi Hamish, Thanks vey much for your quickly review and reply about this. Take your time :-) BRs Xiubo Thanks, Hamish M On 07/06/2018 02:57 PM, xiu...@redhat.com wrote: From: Xiubo Li The V2 patch set maybe not post successfully, so post

Re: [PATCH v3 0/3] uio: fix potential crash bug

2018-07-06 Thread Xiubo Li
intend to report back to you by July 13th. Hi Hamish, Thanks vey much for your quickly review and reply about this. Take your time :-) BRs Xiubo Thanks, Hamish M On 07/06/2018 02:57 PM, xiu...@redhat.com wrote: From: Xiubo Li The V2 patch set maybe not post successfully, so post

Re: [PATCH 2/2] uio: fix crash after the device is unregistered

2018-07-05 Thread Xiubo Li
On 2018/7/6 4:56, Jann Horn wrote: On Thu, Jul 5, 2018 at 10:53 PM wrote: From: Xiubo Li For the target_core_user use case, after the device is unregistered it maybe still opened in user space, then the kernel will crash, like: [...] Signed-off-by: Xiubo Li --- drivers/uio/uio.c | 101

Re: [PATCH 2/2] uio: fix crash after the device is unregistered

2018-07-05 Thread Xiubo Li
On 2018/7/6 4:56, Jann Horn wrote: On Thu, Jul 5, 2018 at 10:53 PM wrote: From: Xiubo Li For the target_core_user use case, after the device is unregistered it maybe still opened in user space, then the kernel will crash, like: [...] Signed-off-by: Xiubo Li --- drivers/uio/uio.c | 101

Re: [PATCH 1/2] uio: change to use the mutex lock instead of the spin lock

2018-07-05 Thread Xiubo Li
On 2018/7/6 0:33, Greg KH wrote: On Thu, Jul 05, 2018 at 12:27:27PM -0400, xiu...@redhat.com wrote: From: Xiubo Li We are hitting a regression with the following commit: commit a93e7b331568227500186a465fee3c2cb5dffd1f Author: Hamish Martin Date: Mon May 14 13:32:23 2018 +1200 uio

Re: [PATCH 1/2] uio: change to use the mutex lock instead of the spin lock

2018-07-05 Thread Xiubo Li
On 2018/7/6 0:33, Greg KH wrote: On Thu, Jul 05, 2018 at 12:27:27PM -0400, xiu...@redhat.com wrote: From: Xiubo Li We are hitting a regression with the following commit: commit a93e7b331568227500186a465fee3c2cb5dffd1f Author: Hamish Martin Date: Mon May 14 13:32:23 2018 +1200 uio

Re: [PATCH] tcmu: Add fifo type waiter list support to avoidstarvation

2017-06-19 Thread Xiubo Li
Hi Nic & Mike I will update this just after the issue reported by Bryant on his environment been fixed later. Thanks, BRs Xiubo On 2017年06月04日 12:11, Mike Christie wrote: On 05/04/2017 09:51 PM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li <lixi...@cmss.chinamobile.com>

Re: [PATCH] tcmu: Add fifo type waiter list support to avoidstarvation

2017-06-19 Thread Xiubo Li
Hi Nic & Mike I will update this just after the issue reported by Bryant on his environment been fixed later. Thanks, BRs Xiubo On 2017年06月04日 12:11, Mike Christie wrote: On 05/04/2017 09:51 PM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li The fifo type waiter list will

Re: [PATCH v6 2/2] tcmu: Add global data block pool support

2017-04-30 Thread Xiubo Li
[...] + +static bool tcmu_get_empty_blocks(struct tcmu_dev *udev, + struct tcmu_cmd *tcmu_cmd, + uint32_t blocks_needed) Can drop blocks_needed. Will fix it. [...] -static void *tcmu_get_block_addr(struct tcmu_dev *udev,

Re: [PATCH v6 2/2] tcmu: Add global data block pool support

2017-04-30 Thread Xiubo Li
[...] + +static bool tcmu_get_empty_blocks(struct tcmu_dev *udev, + struct tcmu_cmd *tcmu_cmd, + uint32_t blocks_needed) Can drop blocks_needed. Will fix it. [...] -static void *tcmu_get_block_addr(struct tcmu_dev *udev,

Re: [PATCH v6 1/2] tcmu: Add dynamic growing data area featuresupport

2017-04-30 Thread Xiubo Li
de and the kunmap is at the end of aasda(). This as the initial patch, the memory is from slab cache now. But since the second patch followed will covert to use memory page from the buddy directly. Thanks, BRs Xiubo Li

Re: [PATCH v6 1/2] tcmu: Add dynamic growing data area featuresupport

2017-04-30 Thread Xiubo Li
de and the kunmap is at the end of aasda(). This as the initial patch, the memory is from slab cache now. But since the second patch followed will covert to use memory page from the buddy directly. Thanks, BRs Xiubo Li

Re: how to unmap pages in an anonymous mmap?

2017-03-09 Thread Xiubo Li
On 2017年02月28日 03:32, Andy Grover wrote: On 02/26/2017 09:59 PM, Xiubo Li wrote: But, We likely don't want to release memory from the data area anyways while active, in any case. How about if we set a timer when active commands go to zero, and then reduce data area to some minimum if no new

Re: how to unmap pages in an anonymous mmap?

2017-03-09 Thread Xiubo Li
On 2017年02月28日 03:32, Andy Grover wrote: On 02/26/2017 09:59 PM, Xiubo Li wrote: But, We likely don't want to release memory from the data area anyways while active, in any case. How about if we set a timer when active commands go to zero, and then reduce data area to some minimum if no new

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-03-01 Thread Xiubo Li
For now we will increase the data area size to 1G, and the cmd area size to 128M. The tcmu-runner should mmap() about (128M + 1G) when running and the TCMU will dynamically grows the data area from 0 to max 1G size. Cool. This is a good approach for an initial patch but this raises concerns

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-03-01 Thread Xiubo Li
For now we will increase the data area size to 1G, and the cmd area size to 128M. The tcmu-runner should mmap() about (128M + 1G) when running and the TCMU will dynamically grows the data area from 0 to max 1G size. Cool. This is a good approach for an initial patch but this raises concerns

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-28 Thread Xiubo Li
Write throughput is pretty low at around 150 MB/s. What's the original write throughput without this patch? Is it also around 80 MB/s ? It is around 20-30 MB/s. Same fio args except using --rw=write. Got it. Thanks. BRs Xiubo

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-28 Thread Xiubo Li
Write throughput is pretty low at around 150 MB/s. What's the original write throughput without this patch? Is it also around 80 MB/s ? It is around 20-30 MB/s. Same fio args except using --rw=write. Got it. Thanks. BRs Xiubo

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-28 Thread Xiubo Li
On 02/17/2017 01:24 AM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li <lixi...@cmss.chinamobile.com> Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. Hi Xiubo, thanks for your work. daynmic -> dyna

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-28 Thread Xiubo Li
On 02/17/2017 01:24 AM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. Hi Xiubo, thanks for your work. daynmic -> dynamic Have you benchmarked this pa

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-26 Thread Xiubo Li
Cool. This is a good approach for an initial patch but this raises concerns about efficiently managing kernel memory usage -- the data area grows but never shrinks, and total possible usage increases per backstore. (What if there are 1000?) Any ideas how we could also improve these aspects of

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-26 Thread Xiubo Li
Cool. This is a good approach for an initial patch but this raises concerns about efficiently managing kernel memory usage -- the data area grows but never shrinks, and total possible usage increases per backstore. (What if there are 1000?) Any ideas how we could also improve these aspects of

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-23 Thread Xiubo Li
When N is bigger, the ratio will be smaller. If N >= 1, the ratio will be [15/1024, 4/1024), for this the ratio 15 : 1024 will be enough. But maybe some iscsi cmds has no datas, N == 0. So the ratio should be bigger. For now we will increase the data area size to 1G, and the cmd area size to

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-23 Thread Xiubo Li
When N is bigger, the ratio will be smaller. If N >= 1, the ratio will be [15/1024, 4/1024), for this the ratio 15 : 1024 will be enough. But maybe some iscsi cmds has no datas, N == 0. So the ratio should be bigger. For now we will increase the data area size to 1G, and the cmd area size to

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the fixed small ring buffer area(about 64M ~ 128M) + dynamically "growing"

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the fixed small ring buffer area(about 64M ~ 128M) + dynamically "growing"

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
For example, the TCMU will use the map area as ISCSI commands & data ring buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
For example, the TCMU will use the map area as ISCSI commands & data ring buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index fba021f..6ca0ae0 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -708,6 +708,8 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma) case UIO_MEM_LOGICAL: case UIO_MEM_VIRTUAL:

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index fba021f..6ca0ae0 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -708,6 +708,8 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma) case UIO_MEM_LOGICAL: case UIO_MEM_VIRTUAL:

Re: [PATCH] target/user: Fix use-after-free cmd->se_cmd if the cmd isexpired

2017-01-04 Thread Xiubo Li
best resolution is to move tcmu_handle_completion() between spin_lock(>commands_lock) and spin_unlock(>commands_lock)? Thanks. BRs Xiubo Li

Re: [PATCH] target/user: Fix use-after-free cmd->se_cmd if the cmd isexpired

2017-01-04 Thread Xiubo Li
best resolution is to move tcmu_handle_completion() between spin_lock(>commands_lock) and spin_unlock(>commands_lock)? Thanks. BRs Xiubo Li

[PATCH] blk-mq: remove the double hctx->numa_node init code.

2016-10-27 Thread Xiubo Li
Since the commit f14bbe77a96bb ("blk-mq: pass in suggested NUMA node to ->alloc_hctx()") has already computed and set the suggested NUMA node for hctx, so this code here is reduntant. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- block/blk-mq.c | 19 ++--

[PATCH] blk-mq: remove the double hctx->numa_node init code.

2016-10-27 Thread Xiubo Li
Since the commit f14bbe77a96bb ("blk-mq: pass in suggested NUMA node to ->alloc_hctx()") has already computed and set the suggested NUMA node for hctx, so this code here is reduntant. Signed-off-by: Xiubo Li --- block/blk-mq.c | 19 ++- 1 file changed, 2 inse

[PATCH v2] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
The 't' in "function" was missing, this patch fixes this typo: s/funcion/function/g Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- Changes for V2: - Add changelog text. drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
The 't' in "function" was missing, this patch fixes this typo: s/funcion/function/g Signed-off-by: Xiubo Li --- Changes for V2: - Add changelog text. drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/attribute_cont

Re: [PATCH] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
On 31/05/2016 23:26, Greg KH wrote: On Tue, May 31, 2016 at 04:17:15PM +0800, Xiubo Li wrote: Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> I can't take patches without any changelog text, sorry. My mistake, I will send the v2 one. Thanks.

Re: [PATCH] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
On 31/05/2016 23:26, Greg KH wrote: On Tue, May 31, 2016 at 04:17:15PM +0800, Xiubo Li wrote: Signed-off-by: Xiubo Li I can't take patches without any changelog text, sorry. My mistake, I will send the v2 one. Thanks.

[PATCH] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 2ba4cac..95e3ef8 100644 --- a/driver

[PATCH] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
Signed-off-by: Xiubo Li --- drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 2ba4cac..95e3ef8 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base

[PATCHv2 2/3] regcache: Introduce the index parsing API by stride order

2016-01-04 Thread Xiubo Li
Here introduces regcache_get_index_by_order() for regmap cache, which uses the register stride order and bit rotation, to improve the performance. Signed-off-by: Xiubo Li --- drivers/base/regmap/internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/base/regmap/internal.h

[PATCHv2 3/3] regcache: flat: Introduce register strider order

2016-01-04 Thread Xiubo Li
I/O accessing. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache-flat.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c index 686c9e0..3ee7255 100644 --- a/drivers/base

[PATCHv2 0/3] regmap: Introduce regsiter stride order

2016-01-04 Thread Xiubo Li
Please ignore the V1 series. Changed in V2: - Introduce regsiter stride order by continue supporting non power of two strides. Xiubo Li (3): regmap: core: Introduce regsiter stride order regcache: Introduce the index parsing API by stride order regcache: flat: Introduce register strider

[PATCHv2 1/3] regmap: core: Introduce regsiter stride order

2016-01-04 Thread Xiubo Li
Since the register stride should always equal to 2^N, and bit rotation is much faster than multiplication and division. So introducing the stride order and using bit rotation to get the offset of the register from the index to improve the performance. Signed-off-by: Xiubo Li --- drivers/base

[PATCHv2 1/3] regmap: core: Introduce regsiter stride order

2016-01-04 Thread Xiubo Li
Since the register stride should always equal to 2^N, and bit rotation is much faster than multiplication and division. So introducing the stride order and using bit rotation to get the offset of the register from the index to improve the performance. Signed-off-by: Xiubo Li <l

[PATCHv2 2/3] regcache: Introduce the index parsing API by stride order

2016-01-04 Thread Xiubo Li
Here introduces regcache_get_index_by_order() for regmap cache, which uses the register stride order and bit rotation, to improve the performance. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/internal.h | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCHv2 0/3] regmap: Introduce regsiter stride order

2016-01-04 Thread Xiubo Li
Please ignore the V1 series. Changed in V2: - Introduce regsiter stride order by continue supporting non power of two strides. Xiubo Li (3): regmap: core: Introduce regsiter stride order regcache: Introduce the index parsing API by stride order regcache: flat: Introduce register strider

[PATCHv2 3/3] regcache: flat: Introduce register strider order

2016-01-04 Thread Xiubo Li
I/O accessing. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/regcache-flat.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c index 686c9e0..3

Re: [PATCH] regmap: flat: introduce register striding to savesomememories

2015-12-30 Thread Xiubo Li
like three bytes. Yes, if so, for this case the non power of two strides should be still supported. Thanks for your promotion, and I will think over of this carefully. BRs Xiubo Li -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [PATCH] regmap: flat: introduce register striding to savesomememories

2015-12-30 Thread Xiubo Li
like three bytes. Yes, if so, for this case the non power of two strides should be still supported. Thanks for your promotion, and I will think over of this carefully. BRs Xiubo Li -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

[PATCH 3/3] regcache: flat: Introduce regcache_get_index()

2015-12-17 Thread Xiubo Li
accessing. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache-flat.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c index 686c9e0..218cf39 100644 --- a/drivers/base/regmap/regcache

[PATCH 1/3] regmap: core: Introduce register stride order

2015-12-17 Thread Xiubo Li
Since the register stride should always equal to 2^N, and bit rotation is much faster than multiplication and division. So introducing the stride order and using bit rotation to get the offset of the register from the index to improve the performance. Signed-off-by: Xiubo Li --- drivers/base

[PATCH 0/3] Introduce reg stride order

2015-12-17 Thread Xiubo Li
Xiubo Li (3): regmap: core: Introduce register stride order regcache: Introduce the index parsing API regcache: flat: Introduce regcache_get_index() drivers/base/regmap/internal.h | 13 + drivers/base/regmap/regcache-flat.c | 11 ++- drivers/base/regmap/regmap.c

[PATCH 2/3] regcache: Introduce the index parsing API

2015-12-17 Thread Xiubo Li
Here introduces regcache_get_index() for regmap cache, which uses the register stride order and bit rotation. Signed-off-by: Xiubo Li --- drivers/base/regmap/internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h

[PATCH 2/3] regcache: Introduce the index parsing API

2015-12-17 Thread Xiubo Li
Here introduces regcache_get_index() for regmap cache, which uses the register stride order and bit rotation. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/base/regmap/intern

[PATCH 3/3] regcache: flat: Introduce regcache_get_index()

2015-12-17 Thread Xiubo Li
accessing. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/regcache-flat.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c index 686c9e0..218cf39

[PATCH 1/3] regmap: core: Introduce register stride order

2015-12-17 Thread Xiubo Li
Since the register stride should always equal to 2^N, and bit rotation is much faster than multiplication and division. So introducing the stride order and using bit rotation to get the offset of the register from the index to improve the performance. Signed-off-by: Xiubo Li <l

[PATCH 0/3] Introduce reg stride order

2015-12-17 Thread Xiubo Li
Xiubo Li (3): regmap: core: Introduce register stride order regcache: Introduce the index parsing API regcache: flat: Introduce regcache_get_index() drivers/base/regmap/internal.h | 13 + drivers/base/regmap/regcache-flat.c | 11 ++- drivers/base/regmap/regmap.c

[PATCH] regmap: use IS_ALIGNED instead of % to improve the performance

2015-12-16 Thread Xiubo Li
The stride value should always equal to 2^n, so we can use bit rotation instead of % to improve the performance. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers

[PATCH] regmap: use IS_ALIGNED instead of % to improve the performance

2015-12-16 Thread Xiubo Li
The stride value should always equal to 2^n, so we can use bit rotation instead of % to improve the performance. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/regmap.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/d

[PATCH] regmap: flat: introduce register striding to save some memories

2015-12-13 Thread Xiubo Li
ore memory space wasted. After introducing the register striding here can save some memeories for the system. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache-flat.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c

[PATCH] regmap: flat: introduce register striding to save some memories

2015-12-13 Thread Xiubo Li
ore memory space wasted. After introducing the register striding here can save some memeories for the system. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/regcache-flat.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dri

[PATCHv2 1/2] regmap: cache: Add warning info for the cache check

2015-12-10 Thread Xiubo Li
If there is no cache used for the drivers, the register defaults or the register defaults raw are not need any more. This patch will check this and print a warning. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 12 1 file changed, 8 insertions(+), 4 deletions

[PATCHv2 0/2] regmap: cache: Add invalid cache check warnings

2015-12-10 Thread Xiubo Li
Changed in V2: - Correct some words in the commit commnet and logs. - Add register defaults raw check. - Add [PATCHv2 2/2] Xiubo Li (2): regmap: cache: Add warning info for the cache check regmap: cache: Move the num_reg_defaults check as early as possible drivers/base/regmap/regcache.c

[PATCHv2 2/2] regmap: cache: Move the num_reg_defaults check as early as possible

2015-12-10 Thread Xiubo Li
If the register defaults are provided by the driver without the number by mistake, it should just return an error with one promotion. This should be as early as possible, then there is no need to verify the register defaults' stride and the other code followed. Signed-off-by: Xiubo Li

Re: [PATCH] regmap: cache: Add warning info for the cache check

2015-12-10 Thread Xiubo Li
On 10/12/2015 20:45, Charles Keepax wrote: On Thu, Dec 10, 2015 at 10:40:53AM +0800, Xiubo Li wrote: If there is no cache used for the drivers, the register drfaults s/drfaults/defaults/ Yes,Thanks. are not need any more. This patch will check this and print a warning. Signed-off

Re: [PATCH] regmap: cache: Add warning info for the cache check

2015-12-10 Thread Xiubo Li
On 10/12/2015 20:45, Charles Keepax wrote: On Thu, Dec 10, 2015 at 10:40:53AM +0800, Xiubo Li wrote: If there is no cache used for the drivers, the register drfaults s/drfaults/defaults/ Yes,Thanks. are not need any more. This patch will check this and print a warning. Signed-off

[PATCHv2 2/2] regmap: cache: Move the num_reg_defaults check as early as possible

2015-12-10 Thread Xiubo Li
If the register defaults are provided by the driver without the number by mistake, it should just return an error with one promotion. This should be as early as possible, then there is no need to verify the register defaults' stride and the other code followed. Signed-off-by: Xiubo Li <l

[PATCHv2 0/2] regmap: cache: Add invalid cache check warnings

2015-12-10 Thread Xiubo Li
Changed in V2: - Correct some words in the commit commnet and logs. - Add register defaults raw check. - Add [PATCHv2 2/2] Xiubo Li (2): regmap: cache: Add warning info for the cache check regmap: cache: Move the num_reg_defaults check as early as possible drivers/base/regmap/regcache.c

[PATCHv2 1/2] regmap: cache: Add warning info for the cache check

2015-12-10 Thread Xiubo Li
If there is no cache used for the drivers, the register defaults or the register defaults raw are not need any more. This patch will check this and print a warning. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/regcache.c | 12 1 file chan

[PATCH] regmap: cache: Add warning info for the cache check

2015-12-09 Thread Xiubo Li
If there is no cache used for the drivers, the register drfaults are not need any more. This patch will check this and print a warning. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/base/regmap

Re: [PATCH] regmap: speed up the regcache_init()

2015-12-09 Thread Xiubo Li
On 09/12/2015 23:05, Mark Brown wrote: On Wed, Dec 09, 2015 at 11:17:22AM +0800, Xiubo Li wrote: Yes, usually when the register cache is not used, the number of the defaults should be zero, but for some drivers like drv2267.c/led_lp8860.c will add the defaults register values though

[PATCH] regmap: fix the warning about unused variable

2015-12-09 Thread Xiubo Li
The variable 'u64 *u64' should be only visible on 64-BIT platform. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 1791180..a0d30a0 100644 --- a/drivers/base/regmap

Re: [PATCH 2/3] regmap: add 64-bit mode support

2015-12-09 Thread Xiubo Li
On 09/12/2015 16:45, Arnd Bergmann wrote: On Thursday 03 December 2015 17:31:52 Xiubo Li wrote: @@ -2488,11 +2581,17 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, * we assume that the values are native

Re: [PATCH 2/3] regmap: add 64-bit mode support

2015-12-09 Thread Xiubo Li
On 09/12/2015 16:45, Arnd Bergmann wrote: On Thursday 03 December 2015 17:31:52 Xiubo Li wrote: @@ -2488,11 +2581,17 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, * we assume that the values are native

[PATCH] regmap: fix the warning about unused variable

2015-12-09 Thread Xiubo Li
The variable 'u64 *u64' should be only visible on 64-BIT platform. Signed-off-by: Xiubo Li <lixi...@cmss.chinamobile.com> --- drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 1791180..a

  1   2   3   4   5   6   7   8   9   10   >