From: kernel test robot <lkp@intel.com>
To: Yajun Deng <yajun.deng@linux.dev>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Yajun Deng <yajun.deng@linux.dev>
Subject: Re: [PATCH net-next] sock: make SKB_FRAG_PAGE_ORDER equal to PAGE_ALLOC_COSTLY_ORDER
Date: Sat, 21 Dec 2024 08:05:56 +0800 [thread overview]
Message-ID: <202412210700.fAOJ9ocm-lkp@intel.com> (raw)
In-Reply-To: <20241217105659.2215649-1-yajun.deng@linux.dev>
Hi Yajun,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Yajun-Deng/sock-make-SKB_FRAG_PAGE_ORDER-equal-to-PAGE_ALLOC_COSTLY_ORDER/20241217-185748
base: net-next/main
patch link: https://lore.kernel.org/r/20241217105659.2215649-1-yajun.deng%40linux.dev
patch subject: [PATCH net-next] sock: make SKB_FRAG_PAGE_ORDER equal to PAGE_ALLOC_COSTLY_ORDER
config: openrisc-randconfig-r122-20241220 (https://download.01.org/0day-ci/archive/20241221/202412210700.fAOJ9ocm-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241221/202412210700.fAOJ9ocm-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412210700.fAOJ9ocm-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/core/sock.c:2496:9: sparse: sparse: context imbalance in 'sk_clone_lock' - wrong count at exit
net/core/sock.c:2500:6: sparse: sparse: context imbalance in 'sk_free_unlock_clone' - unexpected unlock
>> net/core/sock.c:3044:49: sparse: sparse: cast truncates bits from constant value (10000 becomes 0)
vim +3044 net/core/sock.c
5640f7685831e08 Eric Dumazet 2012-09-23 3013
400dfd3ae899849 Eric Dumazet 2013-10-17 3014 /**
400dfd3ae899849 Eric Dumazet 2013-10-17 3015 * skb_page_frag_refill - check that a page_frag contains enough room
400dfd3ae899849 Eric Dumazet 2013-10-17 3016 * @sz: minimum size of the fragment we want to get
400dfd3ae899849 Eric Dumazet 2013-10-17 3017 * @pfrag: pointer to page_frag
82d5e2b8b466d5b Eric Dumazet 2014-09-08 3018 * @gfp: priority for memory allocation
400dfd3ae899849 Eric Dumazet 2013-10-17 3019 *
400dfd3ae899849 Eric Dumazet 2013-10-17 3020 * Note: While this allocator tries to use high order pages, there is
400dfd3ae899849 Eric Dumazet 2013-10-17 3021 * no guarantee that allocations succeed. Therefore, @sz MUST be
400dfd3ae899849 Eric Dumazet 2013-10-17 3022 * less or equal than PAGE_SIZE.
400dfd3ae899849 Eric Dumazet 2013-10-17 3023 */
d9b2938aabf757d Eric Dumazet 2014-08-27 3024 bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t gfp)
5640f7685831e08 Eric Dumazet 2012-09-23 3025 {
5640f7685831e08 Eric Dumazet 2012-09-23 3026 if (pfrag->page) {
fe896d1878949ea Joonsoo Kim 2016-03-17 3027 if (page_ref_count(pfrag->page) == 1) {
5640f7685831e08 Eric Dumazet 2012-09-23 3028 pfrag->offset = 0;
5640f7685831e08 Eric Dumazet 2012-09-23 3029 return true;
5640f7685831e08 Eric Dumazet 2012-09-23 3030 }
400dfd3ae899849 Eric Dumazet 2013-10-17 3031 if (pfrag->offset + sz <= pfrag->size)
5640f7685831e08 Eric Dumazet 2012-09-23 3032 return true;
5640f7685831e08 Eric Dumazet 2012-09-23 3033 put_page(pfrag->page);
5640f7685831e08 Eric Dumazet 2012-09-23 3034 }
5640f7685831e08 Eric Dumazet 2012-09-23 3035
5640f7685831e08 Eric Dumazet 2012-09-23 3036 pfrag->offset = 0;
af87ed7a96a9372 Yajun Deng 2024-12-17 3037 if (!static_branch_unlikely(&net_high_order_alloc_disable_key)) {
d0164adc89f6bb3 Mel Gorman 2015-11-06 3038 /* Avoid direct reclaim but allow kswapd to wake */
d0164adc89f6bb3 Mel Gorman 2015-11-06 3039 pfrag->page = alloc_pages((gfp & ~__GFP_DIRECT_RECLAIM) |
d0164adc89f6bb3 Mel Gorman 2015-11-06 3040 __GFP_COMP | __GFP_NOWARN |
d0164adc89f6bb3 Mel Gorman 2015-11-06 3041 __GFP_NORETRY,
d9b2938aabf757d Eric Dumazet 2014-08-27 3042 SKB_FRAG_PAGE_ORDER);
d9b2938aabf757d Eric Dumazet 2014-08-27 3043 if (likely(pfrag->page)) {
d9b2938aabf757d Eric Dumazet 2014-08-27 @3044 pfrag->size = PAGE_SIZE << SKB_FRAG_PAGE_ORDER;
d9b2938aabf757d Eric Dumazet 2014-08-27 3045 return true;
d9b2938aabf757d Eric Dumazet 2014-08-27 3046 }
d9b2938aabf757d Eric Dumazet 2014-08-27 3047 }
d9b2938aabf757d Eric Dumazet 2014-08-27 3048 pfrag->page = alloc_page(gfp);
d9b2938aabf757d Eric Dumazet 2014-08-27 3049 if (likely(pfrag->page)) {
d9b2938aabf757d Eric Dumazet 2014-08-27 3050 pfrag->size = PAGE_SIZE;
5640f7685831e08 Eric Dumazet 2012-09-23 3051 return true;
5640f7685831e08 Eric Dumazet 2012-09-23 3052 }
400dfd3ae899849 Eric Dumazet 2013-10-17 3053 return false;
400dfd3ae899849 Eric Dumazet 2013-10-17 3054 }
400dfd3ae899849 Eric Dumazet 2013-10-17 3055 EXPORT_SYMBOL(skb_page_frag_refill);
400dfd3ae899849 Eric Dumazet 2013-10-17 3056
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2024-12-21 0:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 10:56 [PATCH net-next] sock: make SKB_FRAG_PAGE_ORDER equal to PAGE_ALLOC_COSTLY_ORDER Yajun Deng
2024-12-17 11:09 ` Eric Dumazet
2024-12-20 13:42 ` kernel test robot
2024-12-21 0:05 ` kernel test robot [this message]
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=202412210700.fAOJ9ocm-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=yajun.deng@linux.dev \
/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