From: kbuild test robot <lkp@intel.com>
To: NeilBrown <neilb@suse.com>
Cc: kbuild-all@01.org, Thomas Graf <tgraf@suug.ch>,
Herbert Xu <herbert@gondor.apana.org.au>,
Tom Herbert <tom@quantonium.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] rhashtable: further improve stability of rhashtable_walk
Date: Fri, 6 Jul 2018 17:25:11 +0800 [thread overview]
Message-ID: <201807061605.e9YkCPhj%fengguang.wu@intel.com> (raw)
In-Reply-To: <153086109256.2825.15329014177598382684.stgit@noble>
[-- Attachment #1: Type: text/plain, Size: 4475 bytes --]
Hi NeilBrown,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on next-20180706]
[cannot apply to linus/master linux-sof-driver/master v4.18-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/NeilBrown/rhashtable-replace-rhashtable_walk_peek-implementation/20180706-153705
config: i386-randconfig-a0-07060846 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from net/core/xdp.c:10:0:
include/linux/rhashtable.h: In function '__rhashtable_insert_fast':
>> include/linux/rhashtable.h:624:6: error: 'headp' undeclared (first use in this function)
headp = &head->next;
^
include/linux/rhashtable.h:624:6: note: each undeclared identifier is reported only once for each function it appears in
vim +/headp +624 include/linux/rhashtable.h
570
571 /* Internal function, please use rhashtable_insert_fast() instead. This
572 * function returns the existing element already in hashes in there is a clash,
573 * otherwise it returns an error via ERR_PTR().
574 */
575 static inline void *__rhashtable_insert_fast(
576 struct rhashtable *ht, const void *key, struct rhash_head *obj,
577 const struct rhashtable_params params, bool rhlist)
578 {
579 struct rhashtable_compare_arg arg = {
580 .ht = ht,
581 .key = key,
582 };
583 struct rhash_head __rcu **pprev;
584 struct bucket_table *tbl;
585 struct rhash_head *head;
586 spinlock_t *lock;
587 unsigned int hash;
588 int elasticity;
589 void *data;
590
591 rcu_read_lock();
592
593 tbl = rht_dereference_rcu(ht->tbl, ht);
594 hash = rht_head_hashfn(ht, tbl, obj, params);
595 lock = rht_bucket_lock(tbl, hash);
596 spin_lock_bh(lock);
597
598 if (unlikely(rcu_access_pointer(tbl->future_tbl))) {
599 slow_path:
600 spin_unlock_bh(lock);
601 rcu_read_unlock();
602 return rhashtable_insert_slow(ht, key, obj);
603 }
604
605 elasticity = RHT_ELASTICITY;
606 pprev = rht_bucket_insert(ht, tbl, hash);
607 data = ERR_PTR(-ENOMEM);
608 if (!pprev)
609 goto out;
610
611 rht_for_each_continue(head, *pprev, tbl, hash) {
612 struct rhlist_head *plist;
613 struct rhlist_head *list;
614
615 elasticity--;
616 if (!key ||
617 (params.obj_cmpfn ?
618 params.obj_cmpfn(&arg, rht_obj(ht, head)) :
619 rhashtable_compare(&arg, rht_obj(ht, head)))) {
620 if (rhlist) {
621 pprev = &head->next;
622 } else {
623 if (head < obj)
> 624 headp = &head->next;
625 }
626 continue;
627 }
628
629 data = rht_obj(ht, head);
630
631 if (!rhlist)
632 goto out;
633
634
635 list = container_of(obj, struct rhlist_head, rhead);
636 plist = container_of(head, struct rhlist_head, rhead);
637
638 RCU_INIT_POINTER(list->next, plist);
639 head = rht_dereference_bucket(head->next, tbl, hash);
640 RCU_INIT_POINTER(list->rhead.next, head);
641 rcu_assign_pointer(*pprev, obj);
642
643 goto good;
644 }
645
646 if (elasticity <= 0)
647 goto slow_path;
648
649 data = ERR_PTR(-E2BIG);
650 if (unlikely(rht_grow_above_max(ht, tbl)))
651 goto out;
652
653 if (unlikely(rht_grow_above_100(ht, tbl)))
654 goto slow_path;
655
656 head = rht_dereference_bucket(*pprev, tbl, hash);
657
658 RCU_INIT_POINTER(obj->next, head);
659 if (rhlist) {
660 struct rhlist_head *list;
661
662 list = container_of(obj, struct rhlist_head, rhead);
663 RCU_INIT_POINTER(list->next, NULL);
664 }
665
666 rcu_assign_pointer(*pprev, obj);
667
668 atomic_inc(&ht->nelems);
669 if (rht_grow_above_75(ht, tbl))
670 schedule_work(&ht->run_work);
671
672 good:
673 data = NULL;
674
675 out:
676 spin_unlock_bh(lock);
677 rcu_read_unlock();
678
679 return data;
680 }
681
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27167 bytes --]
next prev parent reply other threads:[~2018-07-06 9:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 7:11 [PATCH 0/3] rhashtable: replace rhashtable_walk_peek implementation NeilBrown
2018-07-06 7:11 ` [PATCH 3/3] rhashtable: implement rhashtable_walk_peek() using rhashtable_walk_last_seen() NeilBrown
2018-07-06 7:11 ` [PATCH 1/3] rhashtable: further improve stability of rhashtable_walk NeilBrown
2018-07-06 8:24 ` kbuild test robot
2018-07-06 9:50 ` NeilBrown
2018-07-06 8:59 ` Paolo Abeni
2018-07-06 9:55 ` NeilBrown
2018-07-06 10:12 ` Paolo Abeni
2018-07-06 9:25 ` kbuild test robot [this message]
2018-12-05 3:51 ` [PATCH net-next] " NeilBrown
2018-12-07 5:39 ` Herbert Xu
2018-12-09 22:50 ` NeilBrown
2018-12-11 5:17 ` Herbert Xu
2018-12-12 0:02 ` NeilBrown
2018-12-12 5:46 ` Herbert Xu
2018-12-12 6:41 ` NeilBrown
2018-12-12 8:00 ` Herbert Xu
2018-12-12 8:49 ` NeilBrown
2018-12-13 1:43 ` Herbert Xu
2018-12-13 3:48 ` NeilBrown
2018-12-13 8:47 ` Herbert Xu
2018-07-06 7:11 ` [PATCH 2/3] rhashtable: add rhashtable_walk_last_seen() NeilBrown
2018-07-10 23:55 ` David Miller
2018-07-15 23:58 ` NeilBrown
2018-07-10 23:55 ` [PATCH 0/3] rhashtable: replace rhashtable_walk_peek implementation David Miller
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=201807061605.e9YkCPhj%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=tom@quantonium.net \
/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).