tree:
https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git mm-bulk-rebase-v5r2
head: 5ce1d4eb5aa31146052f4499ca77642afb31165b
commit: fa305fb67e08257558495fdfce8b5863f48c0115 [12/13] SUNRPC: Refresh rq_pages using a
bulk page allocator
config: i386-randconfig-a001-20210313 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git/commit/?id=...
git remote add mel
https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git
git fetch --no-tags mel mm-bulk-rebase-v5r2
git checkout fa305fb67e08257558495fdfce8b5863f48c0115
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/sunrpc/svc_xprt.c: In function 'svc_alloc_arg':
> net/sunrpc/svc_xprt.c:666:45: warning: passing argument 3 of
'alloc_pages_bulk' makes pointer from integer without a cast [-Wint-conversion]
666 | needed -= alloc_pages_bulk(GFP_KERNEL, 0, needed, &list);
| ^~~~~~
| |
| long unsigned int
In file included from include/linux/slab.h:15,
from net/sunrpc/svc_xprt.c:12:
include/linux/gfp.h:527:71: note: expected 'struct list_head *' but argument is
of type 'long unsigned int'
527 | alloc_pages_bulk(gfp_t gfp, unsigned long nr_pages, struct list_head *list)
| ~~~~~~~~~~~~~~~~~~^~~~
net/sunrpc/svc_xprt.c:666:13: error: too many arguments to function
'alloc_pages_bulk'
666 | needed -= alloc_pages_bulk(GFP_KERNEL, 0, needed, &list);
| ^~~~~~~~~~~~~~~~
In file included from include/linux/slab.h:15,
from net/sunrpc/svc_xprt.c:12:
include/linux/gfp.h:527:1: note: declared here
527 | alloc_pages_bulk(gfp_t gfp, unsigned long nr_pages, struct list_head *list)
| ^~~~~~~~~~~~~~~~
vim +/alloc_pages_bulk +666 net/sunrpc/svc_xprt.c
641
642 static int svc_alloc_arg(struct svc_rqst *rqstp)
643 {
644 struct svc_serv *serv = rqstp->rq_server;
645 unsigned long needed;
646 struct xdr_buf *arg;
647 struct page *page;
648 LIST_HEAD(list);
649 int pages;
650 int i;
651
652 pages = (serv->sv_max_mesg + 2 * PAGE_SIZE) >> PAGE_SHIFT;
653 if (pages > RPCSVC_MAXPAGES) {
654 pr_warn_once("svc: warning: pages=%u > RPCSVC_MAXPAGES=%lu\n",
655 pages, RPCSVC_MAXPAGES);
656 /* use as many pages as possible */
657 pages = RPCSVC_MAXPAGES;
658 }
659
660 for (needed = 0, i = 0; i < pages ; i++) {
661 if (!rqstp->rq_pages[i])
662 needed++;
663 }
664 i = 0;
665 while (needed) {
666 needed -= alloc_pages_bulk(GFP_KERNEL, 0, needed, &list);
667 for (; i < pages; i++) {
668 if (rqstp->rq_pages[i])
669 continue;
670 page = list_first_entry_or_null(&list, struct page, lru);
671 if (likely(page)) {
672 list_del(&page->lru);
673 rqstp->rq_pages[i] = page;
674 continue;
675 }
676 set_current_state(TASK_INTERRUPTIBLE);
677 if (signalled() || kthread_should_stop()) {
678 set_current_state(TASK_RUNNING);
679 return -EINTR;
680 }
681 schedule_timeout(msecs_to_jiffies(500));
682 break;
683 }
684 }
685 rqstp->rq_page_end = &rqstp->rq_pages[pages];
686 rqstp->rq_pages[pages] = NULL; /* this might be seen in nfsd_splice_actor() */
687
688 /* Make arg->head point to first page and arg->pages point to rest */
689 arg = &rqstp->rq_arg;
690 arg->head[0].iov_base = page_address(rqstp->rq_pages[0]);
691 arg->head[0].iov_len = PAGE_SIZE;
692 arg->pages = rqstp->rq_pages + 1;
693 arg->page_base = 0;
694 /* save at least one page for response */
695 arg->page_len = (pages-2)*PAGE_SIZE;
696 arg->len = (pages-1)*PAGE_SIZE;
697 arg->tail[0].iov_len = 0;
698 return 0;
699 }
700
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org