Re: [vdpa_sim_net] 79991caf52: net/ipv4/ipmr.c:#RCU-list_traversed_in_non-reader_section

2021-02-07 Thread Dongli Zhang
+0x22/0x30 Thank you very much! Dongli Zhang On 2/6/21 7:03 PM, kernel test robot wrote: > > Greeting, > > FYI, we noticed the following commit (built with gcc-9): > > commit: 79991caf5202c7989928be534727805f8f68bb8d ("vdpa_sim_net: Add support > for user s

Re: [PATCH v2 1/1] vhost scsi: alloc vhost_scsi with kvzalloc() to avoid delay

2021-01-23 Thread Dongli Zhang
According to my "git send-email" history, I have CCed jasow...@redhat.com. Not sure why Jason is not on the list. CCed Jason. Thank you very much! Dongli Zhang On 1/23/21 12:08 AM, Dongli Zhang wrote: > The size of 'struct vhost_scsi' is order-10 (~2.3MB). It may ta

[PATCH v2 1/1] vhost scsi: alloc vhost_scsi with kvzalloc() to avoid delay

2021-01-23 Thread Dongli Zhang
mplicitly set if the size to allocate is more than PAGE_SZIE and when __GFP_RETRY_MAYFAIL is not explicitly set. Cc: Aruna Ramakrishna Cc: Joe Jin Signed-off-by: Dongli Zhang --- Changed since v1: - To combine kzalloc() and vzalloc() as kvzalloc() (suggested by Jason Wang) driv

Re: [PATCH 1/1] vhost scsi: allocate vhost_scsi with GFP_NOWAIT to avoid delay

2021-01-23 Thread Dongli Zhang
On 1/21/21 1:00 AM, Jason Wang wrote: > > On 2021/1/21 13:03, Dongli Zhang wrote: >> The size of 'struct vhost_scsi' is order-10 (~2.3MB). It may take long time >> delay by kzalloc() to compact memory pages when there is a lack of >> high-order pages. As a re

[PATCH 1/1] vhost scsi: allocate vhost_scsi with GFP_NOWAIT to avoid delay

2021-01-20 Thread Dongli Zhang
5cb754983d ("vhost/scsi: use vmalloc for order-10 allocation") prefers to fallback only when really needed, while this patch changes allocation to GFP_NOWAIT in order to avoid the delay caused by memory page compact. Cc: Aruna Ramakrishna Cc: Joe Jin Signed-off-by: Dongli Zhang --- Another

[PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-15 Thread Dongli Zhang
RINIVAS Cc: sta...@vger.kernel.org Fixes: 79930f5892e ("net: do not deplete pfmemalloc reserve") Signed-off-by: Dongli Zhang Acked-by: Vlastimil Babka --- Changed since v1: - change author from Matthew to Dongli - Add references to all prior discussions - Add more details to comm

Re: [PATCH v2 1/1] page_frag: Recover from memory pressure

2020-11-15 Thread Dongli Zhang
On 11/15/20 4:18 AM, Matthew Wilcox wrote: > On Sat, Nov 14, 2020 at 10:51:06PM -0800, Dongli Zhang wrote: >> +if (nc->pfmemalloc) { > > You missed the unlikely() change that Eric recommended. > Thank you very much. I missed that email. I will send v3. Dongli Zhang

[PATCH v2 1/1] page_frag: Recover from memory pressure

2020-11-14 Thread Dongli Zhang
RINIVAS Cc: sta...@vger.kernel.org Fixes: 79930f5892e ("net: do not deplete pfmemalloc reserve") Signed-off-by: Dongli Zhang Acked-by: Vlastimil Babka --- Changed since v1: - change author from Matthew to Dongli - Add references to all prior discussions - Add more details to commit m

Re: [PATCH] page_frag: Recover from memory pressure

2020-11-14 Thread Dongli Zhang
hank you very much! Dongli Zhang On 11/9/20 6:37 AM, Eric Dumazet wrote: > > > On 11/9/20 3:32 PM, Matthew Wilcox wrote: >> On Thu, Nov 05, 2020 at 02:02:24PM +, Matthew Wilcox wrote: >>> On Thu, Nov 05, 2020 at 02:21:25PM +0100, Eric Dumazet wrote: >>>>

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-04 Thread Dongli Zhang
till under memory pressure, and if not, we can clear the >> pfmemalloc bit on the frag, as in my second patch. The 'least change' >> way of doing that is to try to allocate a page, but the VM could export >> a symbol that says "we're not under memory pressure any more". >> >> Did you want to move checking that into the networking layer, or do you >> want to keep it in the pagefrag allocator? > > I think your proposal is fine, thanks ! Hi Matthew, are you going to send out the patch to avoid pfmemalloc recycle? Thank you very much! Dongli Zhang

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
On 11/3/20 1:15 PM, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 12:57:33PM -0800, Dongli Zhang wrote: >> On 11/3/20 12:35 PM, Matthew Wilcox wrote: >>> On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: >>>> However, once kernel is not under memor

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
Hi Matthew, On 11/3/20 12:35 PM, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: >> The ethernet driver may allocates skb (and skb->data) via napi_alloc_skb(). >> This ends up to page_frag_alloc() to allocate skb->data from &

[PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
na Ramakrishna Cc: Bert Barbe Cc: Rama Nichanamatlu Cc: Venkat Venkatsubra Cc: Manjunath Patil Cc: Joe Jin Cc: SRINIVAS Signed-off-by: Dongli Zhang --- mm/page_alloc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 23f5066bd4a5..291df2

Re: [Xen-devel] Question on xen-netfront code to fix a potential ring buffer corruption

2019-08-26 Thread Dongli Zhang
Hi Juergen, On 8/27/19 2:13 PM, Juergen Gross wrote: > On 18.08.19 10:31, Dongli Zhang wrote: >> Hi, >> >> Would you please help confirm why the condition at line 908 is ">="? >> >> In my opinion, we would only hit "skb_shinfo(skb)->nr_frag

Question on xen-netfront code to fix a potential ring buffer corruption

2019-08-18 Thread Dongli Zhang
r_frags >= MAX_SKB_FRAGS)), but not just "==". Perhaps __pskb_pull_tail() may fail although pull_to is less than skb_headlen(skb). Thank you very much! Dongli Zhang

Re: [Xen-devel] [PATCH v2 1/1] xen-netback: process malformed sk_buff correctly to avoid BUG_ON()

2018-03-28 Thread Dongli Zhang
Hi Eric, On 03/29/2018 12:03 PM, Eric Dumazet wrote: > > > On 03/28/2018 08:51 PM, Dongli Zhang wrote: >> The "BUG_ON(!frag_iter)" in function xenvif_rx_next_chunk() is triggered if >> the received sk_buff is malformed, that is, when the sk_buff has pattern >&

[PATCH v2 1/1] xen-netback: process malformed sk_buff correctly to avoid BUG_ON()

2018-03-28 Thread Dongli Zhang
n = 352; skb->tail = 98; skb->end = 384; skb_shinfo(skb)->nr_frags = 0; dev->netdev_ops->ndo_start_xmit(skb, dev); This patch stops processing sk_buff immediately if it is detected as malformed, that is, pkt->frag_iter is NULL but there is still remaining pkt->remaining_le

Re: [Xen-devel] [PATCH 1/1] xen-netback: process malformed sk_buff correctly to avoid BUG_ON()

2018-03-27 Thread Dongli Zhang
dev->netdev_ops->ndo_start_xmit(skb, dev); return 0; } static void __exit test_skb_exit(void) { } MODULE_LICENSE("GPL"); module_init(test_skb_init); module_exit(test_skb_exit); Dongli Zhang On 03/28/2018 07:42 AM, Dongli Zhang wrote: > The "BUG_ON(!

[PATCH 1/1] xen-netback: process malformed sk_buff correctly to avoid BUG_ON()

2018-03-27 Thread Dongli Zhang
n = 352; skb->tail = 98; skb->end = 384; dev->netdev_ops->ndo_start_xmit(skb, dev); This patch stops processing sk_buff immediately if it is detected as malformed, that is, pkt->frag_iter is NULL but there is still remaining pkt->remaining_len. Signed-off-by: Dongli Zhang --- driver

[PATCH 1/1] xen-netfront: cast grant table reference first to type int

2016-11-01 Thread Dongli Zhang
IS_ERR_VALUE() in commit 87557efc27f6a50140fb20df06a917f368ce3c66 ("xen-netfront: do not cast grant table reference to signed short") would not return true for error code unless we cast ref first to type int. Signed-off-by: Dongli Zhang --- drivers/net/xen-netfront.c | 4 ++-- 1 file

Re: [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short

2016-10-31 Thread Dongli Zhang
end a new patch or an incremental based on previous one at https://git.kernel.org/cgit/linux/kernel/git/davem/net.git? Thank you very much! Dongli Zhang - Original Message - From: da...@davemloft.net To: dongli.zh...@oracle.com Cc: linux-ker...@vger.kernel.org, xen

Re: [Xen-devel] [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short

2016-10-31 Thread Dongli Zhang
ef won't get > stored, preventing its later use from causing further damage). The reason I use warning instead BUG_ON is that Linus suggested use WARN_ON_ONCE() in a previous email: http://lkml.iu.edu/hypermail/linux/kernel/1610.0/00878.html I would change to BUG_ON() if it is OK to you. Th

[PATCH 1/1] xen-netfront: do not cast grant table reference to signed short

2016-10-30 Thread Dongli Zhang
While grant reference is of type uint32_t, xen-netfront erroneously casts it to signed short in BUG_ON(). This would lead to the xen domU panic during boot-up or migration when it is attached with lots of paravirtual devices. Signed-off-by: Dongli Zhang --- drivers/net/xen-netfront.c | 4