From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
eric.dumazet@gmail.com, Alexander Duyck <alexanderduyck@fb.com>,
Soheil Hassas Yeganeh <soheil@google.com>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 4/4] net: add dedicated kmem_cache for typical/small skb->head
Date: Sat, 4 Feb 2023 03:37:10 +0800 [thread overview]
Message-ID: <202302040329.E10xZHbY-lkp@intel.com> (raw)
In-Reply-To: <20230202185801.4179599-5-edumazet@google.com>
Hi Eric,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-add-SKB_HEAD_ALIGN-helper/20230203-031126
patch link: https://lore.kernel.org/r/20230202185801.4179599-5-edumazet%40google.com
patch subject: [PATCH net-next 4/4] net: add dedicated kmem_cache for typical/small skb->head
config: arc-randconfig-r014-20230204 (https://download.01.org/0day-ci/archive/20230204/202302040329.E10xZHbY-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/002bb9238e98f3fbeb0402c97f711420c3321b93
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Eric-Dumazet/net-add-SKB_HEAD_ALIGN-helper/20230203-031126
git checkout 002bb9238e98f3fbeb0402c97f711420c3321b93
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash net/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
net/core/skbuff.c: In function 'kmalloc_reserve':
>> net/core/skbuff.c:503:23: error: 'KMALLOC_NOT_NORMAL_BITS' undeclared (first use in this function)
503 | !(flags & KMALLOC_NOT_NORMAL_BITS)) {
| ^~~~~~~~~~~~~~~~~~~~~~~
net/core/skbuff.c:503:23: note: each undeclared identifier is reported only once for each function it appears in
vim +/KMALLOC_NOT_NORMAL_BITS +503 net/core/skbuff.c
486
487 /*
488 * kmalloc_reserve is a wrapper around kmalloc_node_track_caller that tells
489 * the caller if emergency pfmemalloc reserves are being used. If it is and
490 * the socket is later found to be SOCK_MEMALLOC then PFMEMALLOC reserves
491 * may be used. Otherwise, the packet data may be discarded until enough
492 * memory is free
493 */
494 static void *kmalloc_reserve(unsigned int *size, gfp_t flags, int node,
495 bool *pfmemalloc)
496 {
497 bool ret_pfmemalloc = false;
498 unsigned int obj_size;
499 void *obj;
500
501 obj_size = SKB_HEAD_ALIGN(*size);
502 if (obj_size <= SKB_SMALL_HEAD_CACHE_SIZE &&
> 503 !(flags & KMALLOC_NOT_NORMAL_BITS)) {
504
505 /* skb_small_head_cache has non power of two size,
506 * likely forcing SLUB to use order-3 pages.
507 * We deliberately attempt a NOMEMALLOC allocation only.
508 */
509 obj = kmem_cache_alloc_node(skb_small_head_cache,
510 flags | __GFP_NOMEMALLOC | __GFP_NOWARN,
511 node);
512 if (obj) {
513 *size = SKB_SMALL_HEAD_CACHE_SIZE;
514 goto out;
515 }
516 }
517 *size = obj_size = kmalloc_size_roundup(obj_size);
518 /*
519 * Try a regular allocation, when that fails and we're not entitled
520 * to the reserves, fail.
521 */
522 obj = kmalloc_node_track_caller(obj_size,
523 flags | __GFP_NOMEMALLOC | __GFP_NOWARN,
524 node);
525 if (obj || !(gfp_pfmemalloc_allowed(flags)))
526 goto out;
527
528 /* Try again but now we are using pfmemalloc reserves */
529 ret_pfmemalloc = true;
530 obj = kmalloc_node_track_caller(obj_size, flags, node);
531
532 out:
533 if (pfmemalloc)
534 *pfmemalloc = ret_pfmemalloc;
535
536 return obj;
537 }
538
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-02-03 19:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 18:57 [PATCH net-next 0/4] net: core: use a dedicated kmem_cache for skb head allocs Eric Dumazet
2023-02-02 18:57 ` [PATCH net-next 1/4] net: add SKB_HEAD_ALIGN() helper Eric Dumazet
2023-02-02 20:06 ` Soheil Hassas Yeganeh
2023-02-02 18:57 ` [PATCH net-next 2/4] net: remove osize variable in __alloc_skb() Eric Dumazet
2023-02-02 20:07 ` Soheil Hassas Yeganeh
2023-02-02 18:58 ` [PATCH net-next 3/4] net: factorize code in kmalloc_reserve() Eric Dumazet
2023-02-02 20:09 ` Soheil Hassas Yeganeh
2023-02-02 18:58 ` [PATCH net-next 4/4] net: add dedicated kmem_cache for typical/small skb->head Eric Dumazet
2023-02-02 20:14 ` Soheil Hassas Yeganeh
2023-02-03 5:11 ` Jakub Kicinski
2023-02-03 7:00 ` Eric Dumazet
2023-02-03 7:59 ` Paolo Abeni
2023-02-03 8:17 ` Eric Dumazet
2023-02-03 19:47 ` Jakub Kicinski
2023-02-03 19:37 ` kernel test robot [this message]
2023-02-03 19:42 ` Jakub Kicinski
2023-02-06 18:16 ` [PATCH net-next 0/4] net: core: use a dedicated kmem_cache for skb head allocs Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202302040329.E10xZHbY-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexanderduyck@fb.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=soheil@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).