On 2020/10/12 13:28, Ira Weiny wrote:
> On Sat, Oct 10, 2020 at 10:20:34AM +0800, Coly Li wrote:
>> On 2020/10/10 03:50, ira.we...@intel.com wrote:
>>> From: Ira Weiny
>>>
>>> These kmap() calls are localized to a single thread. To avoid the over
>>
d like to be
supportive to option 2) introduce a flag to kmap(), then we won't forget
the new thread-localized kmap method, and people won't ask why a
_thread() function is called but no kthread created.
Thanks.
Coly Li
> Cc: Coly Li (maintainer:BCACHE (BLOCK LAYER CACHE))
> Cc:
On 2020/10/3 06:28, David Miller wrote:
> From: Coly Li
> Date: Fri, 2 Oct 2020 16:27:27 +0800
>
>> As Sagi Grimberg suggested, the original fix is refind to a more common
>> inline routine:
>> static inline bool sendpage_ok(struct page *page)
>> {
&
On 2020/10/3 06:28, David Miller wrote:
> From: Coly Li
> Date: Fri, 2 Oct 2020 16:27:27 +0800
>
>> As Sagi Grimberg suggested, the original fix is refind to a more common
>> inline routine:
>> static inline bool sendpage_ok(struct page *page)
>> {
&
ure all patches are the
latest version.
Sorry for the inconvenience and thank you in advance for taking this set.
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
" 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
Reviewed-by: Lee Duncan
Acked-
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
e_ok() as a code cleanup.
Signed-off-by: Coly Li
Acked-by: Jeff Layton
Cc: Ilya Dryomov
---
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 bdfd66ba3843..d4d7a0e52491 100644
--- a/net/ceph/messenger.
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
ge().
- The 3rd patch fixes the page checking issue in nvme-over-tcp driver.
- The 4th patch adds page_count check by using sendpage_ok() in
do_tcp_sendpages() as Eric Dumazet suggested.
- The 5th and 6th patches just replace existing open coded checks with
the inline sendpage_ok() routine.
hange existing kernel_sendpage() behavior for the
improper page zero-copy send, it just provides hint warning message for
following potential panic due the kernel memory heap corruption.
Signed-off-by: Coly Li
Cc: Cong Wang
Cc: Christoph Hellwig
Cc: David S. Miller
Cc: Sridhar Samudrala
---
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
e_ok() as a code cleanup.
Signed-off-by: Coly Li
Acked-by: Jeff Layton
Cc: Ilya Dryomov
---
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 bdfd66ba3843..d4d7a0e52491 100644
--- a/net/ceph/messenger.
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
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
" 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
Acked-by: Martin K. Peterse
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
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
hange existing kernel_sendpage() behavior for the
improper page zero-copy send, it just provides hint warning message for
following potential panic due the kernel memory heap corruption.
Signed-off-by: Coly Li
Cc: Cong Wang
Cc: Christoph Hellwig
Cc: David S. Miller
Cc: Sridhar Samudrala
---
-tcp driver.
- The 4th patch adds page_count check by using sendpage_ok() in
do_tcp_sendpages() as Eric Dumazet suggested.
- The 5th and 6th patches just replace existing open coded checks with
the inline sendpage_ok() routine.
Coly Li
Cc: Chaitanya Kulkarni
Cc: Chris Leech
Cc: Christoph Hellwi
On 2020/9/25 23:18, Greg KH wrote:
> On Fri, Sep 25, 2020 at 11:01:13PM +0800, 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 page
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
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 bdfd66ba3843..d4d7a0e52491 100644
--- a/net/ceph/messenger.c
+++ b/net/
hange existing kernel_sendpage() behavior for the
improper page zero-copy send, it just provides hint warning message for
following potential panic due the kernel memory heap corruption.
Signed-off-by: Coly Li
Cc: Cong Wang
Cc: Christoph Hellwig
Cc: David S. Miller
Cc: Sridhar Samudrala
---
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
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
" 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
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 adds page_count check by using sendpage_ok() in
do_tcp_sendpages() as Eric Dumazet suggested.
- The 5th and 6th patches just replace 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: Davi
On 2020/9/23 16:43, Christoph Hellwig wrote:
> On Wed, Aug 19, 2020 at 12:22:05PM +0800, Coly Li wrote:
>> 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:
and Christoph,
It has been quiet for a while, what should we go next for the
kernel_sendpage() related issue ?
Will Christoph's or my series be considered as proper fix, or maybe I
should wait for some other better idea to show up? Any is OK for me,
once the problem is fixed.
Thanks in advance.
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
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
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
" 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
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
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
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/
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
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
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
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
" 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
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/
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
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
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
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
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
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
---
Changelog:
v4, c
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
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
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
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
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
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
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
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
59 matches
Mail list logo