From andreas.dilger at intel.com Mon Apr 2 19:34:33 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Mon, 2 Apr 2018 19:34:33 +0000 Subject: [lustre-devel] [PATCH 11/17] staging: lustre: libcfs: discard cfs_time_shift(). In-Reply-To: References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760863.27689.4681198496926109808.stgit@noble> Message-ID: <0B6A147C-7E98-4B00-AF32-AF8843484CF9@intel.com> > On Mar 30, 2018, at 13:02, James Simmons wrote: > > >> This function simply multiplies by HZ and adds jiffies. >> This is simple enough to be opencoded, and doing so >> makes the code easier to read. >> >> Same for cfs_time_shift_64() > > Reviewed-by: James Simmons Hmm, I thought we were trying to get rid of direct HZ usage in modules, because of tickless systems, and move to e.g. msecs_to_jiffies() or similar? Cheers, Andreas > >> Signed-off-by: NeilBrown >> --- >> .../lustre/include/linux/libcfs/libcfs_time.h | 5 ---- >> .../lustre/include/linux/libcfs/linux/linux-time.h | 5 ---- >> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 12 +++++---- >> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 4 ++- >> .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 ++- >> .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 12 +++++---- >> drivers/staging/lustre/lnet/lnet/net_fault.c | 26 ++++++++++---------- >> drivers/staging/lustre/lnet/lnet/router.c | 2 +- >> drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- >> drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- >> drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ++- >> drivers/staging/lustre/lustre/llite/lproc_llite.c | 12 +++++---- >> drivers/staging/lustre/lustre/llite/statahead.c | 2 +- >> drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- >> drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- >> drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- >> .../lustre/lustre/obdclass/lprocfs_status.c | 12 +++++---- >> .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- >> drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- >> drivers/staging/lustre/lustre/ptlrpc/pinger.c | 6 ++--- >> drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- >> 21 files changed, 56 insertions(+), 66 deletions(-) >> >> diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h >> index 7b41a129f041..0ebbde4ec8e8 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h >> @@ -50,11 +50,6 @@ static inline int cfs_time_aftereq(unsigned long t1, unsigned long t2) >> return time_before_eq(t2, t1); >> } >> >> -static inline unsigned long cfs_time_shift(int seconds) >> -{ >> - return jiffies + seconds * HZ; >> -} >> - >> /* >> * return valid time-out based on user supplied one. Currently we only check >> * that time-out is not shorted than allowed. >> diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> index b3a80531bd71..ff3aae2f1231 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> @@ -65,11 +65,6 @@ static inline long cfs_duration_sec(long d) >> return d / msecs_to_jiffies(MSEC_PER_SEC); >> } >> >> -static inline u64 cfs_time_shift_64(int seconds) >> -{ >> - return get_jiffies_64() + (u64)seconds * HZ; >> -} >> - >> static inline int cfs_time_before_64(u64 t1, u64 t2) >> { >> return (__s64)t2 - (__s64)t1 > 0; >> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> index 7df07f39b849..276bf486f64b 100644 >> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> @@ -1446,7 +1446,7 @@ static int kiblnd_create_fmr_pool(struct kib_fmr_poolset *fps, >> if (rc) >> goto out_fpo; >> >> - fpo->fpo_deadline = cfs_time_shift(IBLND_POOL_DEADLINE); >> + fpo->fpo_deadline = jiffies + IBLND_POOL_DEADLINE * HZ; >> fpo->fpo_owner = fps; >> *pp_fpo = fpo; >> >> @@ -1619,7 +1619,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx, >> spin_lock(&fps->fps_lock); >> version = fps->fps_version; >> list_for_each_entry(fpo, &fps->fps_pool_list, fpo_list) { >> - fpo->fpo_deadline = cfs_time_shift(IBLND_POOL_DEADLINE); >> + fpo->fpo_deadline = jiffies + IBLND_POOL_DEADLINE * HZ; >> fpo->fpo_map_count++; >> >> if (fpo->fpo_is_fmr) { >> @@ -1743,7 +1743,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx, >> fps->fps_version++; >> list_add_tail(&fpo->fpo_list, &fps->fps_pool_list); >> } else { >> - fps->fps_next_retry = cfs_time_shift(IBLND_POOL_RETRY); >> + fps->fps_next_retry = jiffies + IBLND_POOL_RETRY * HZ; >> } >> spin_unlock(&fps->fps_lock); >> >> @@ -1764,7 +1764,7 @@ static void kiblnd_init_pool(struct kib_poolset *ps, struct kib_pool *pool, int >> >> memset(pool, 0, sizeof(*pool)); >> INIT_LIST_HEAD(&pool->po_free_list); >> - pool->po_deadline = cfs_time_shift(IBLND_POOL_DEADLINE); >> + pool->po_deadline = jiffies + IBLND_POOL_DEADLINE * HZ; >> pool->po_owner = ps; >> pool->po_size = size; >> } >> @@ -1899,7 +1899,7 @@ struct list_head *kiblnd_pool_alloc_node(struct kib_poolset *ps) >> continue; >> >> pool->po_allocated++; >> - pool->po_deadline = cfs_time_shift(IBLND_POOL_DEADLINE); >> + pool->po_deadline = jiffies + IBLND_POOL_DEADLINE * HZ; >> node = pool->po_free_list.next; >> list_del(node); >> >> @@ -1947,7 +1947,7 @@ struct list_head *kiblnd_pool_alloc_node(struct kib_poolset *ps) >> if (!rc) { >> list_add_tail(&pool->po_list, &ps->ps_pool_list); >> } else { >> - ps->ps_next_retry = cfs_time_shift(IBLND_POOL_RETRY); >> + ps->ps_next_retry = jiffies + IBLND_POOL_RETRY * HZ; >> CERROR("Can't allocate new %s pool because out of memory\n", >> ps->ps_name); >> } >> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c >> index c1c3277f4c1f..f9761d8f2e3e 100644 >> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c >> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c >> @@ -3700,13 +3700,13 @@ kiblnd_failover_thread(void *arg) >> LASSERT(dev->ibd_failover); >> dev->ibd_failover = 0; >> if (rc >= 0) { /* Device is OK or failover succeed */ >> - dev->ibd_next_failover = cfs_time_shift(3); >> + dev->ibd_next_failover = jiffies + 3 * HZ; >> continue; >> } >> >> /* failed to failover, retry later */ >> dev->ibd_next_failover = >> - cfs_time_shift(min(dev->ibd_failed_failover, 10)); >> + jiffies + min(dev->ibd_failed_failover, 10) * HZ; >> if (kiblnd_dev_can_failover(dev)) { >> list_add_tail(&dev->ibd_fail_list, >> &kiblnd_data.kib_failed_devs); >> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c >> index 4546618c1c12..16c1ab0b0bd9 100644 >> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c >> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c >> @@ -1287,7 +1287,7 @@ ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route, >> conn->ksnc_tx_last_post = jiffies; >> /* Set the deadline for the outgoing HELLO to drain */ >> conn->ksnc_tx_bufnob = sock->sk->sk_wmem_queued; >> - conn->ksnc_tx_deadline = cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + conn->ksnc_tx_deadline = jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> mb(); /* order with adding to peer's conn list */ >> >> list_add(&conn->ksnc_list, &peer->ksnp_conns); >> @@ -1852,7 +1852,7 @@ ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when) >> if (bufnob < conn->ksnc_tx_bufnob) { >> /* something got ACKed */ >> conn->ksnc_tx_deadline = >> - cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> peer->ksnp_last_alive = now; >> conn->ksnc_tx_bufnob = bufnob; >> } >> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c >> index 5b34c7c030ad..1ace54c9b133 100644 >> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c >> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c >> @@ -221,7 +221,7 @@ ksocknal_transmit(struct ksock_conn *conn, struct ksock_tx *tx) >> * something got ACKed >> */ >> conn->ksnc_tx_deadline = >> - cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> conn->ksnc_peer->ksnp_last_alive = jiffies; >> conn->ksnc_tx_bufnob = bufnob; >> mb(); >> @@ -269,7 +269,7 @@ ksocknal_recv_iter(struct ksock_conn *conn) >> >> conn->ksnc_peer->ksnp_last_alive = jiffies; >> conn->ksnc_rx_deadline = >> - cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> mb(); /* order with setting rx_started */ >> conn->ksnc_rx_started = 1; >> >> @@ -405,7 +405,7 @@ ksocknal_check_zc_req(struct ksock_tx *tx) >> >> /* ZC_REQ is going to be pinned to the peer */ >> tx->tx_deadline = >> - cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> >> LASSERT(!tx->tx_msg.ksm_zc_cookies[0]); >> >> @@ -677,7 +677,7 @@ ksocknal_queue_tx_locked(struct ksock_tx *tx, struct ksock_conn *conn) >> if (list_empty(&conn->ksnc_tx_queue) && !bufnob) { >> /* First packet starts the timeout */ >> conn->ksnc_tx_deadline = >> - cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> if (conn->ksnc_tx_bufnob > 0) /* something got ACKed */ >> conn->ksnc_peer->ksnp_last_alive = jiffies; >> conn->ksnc_tx_bufnob = 0; >> @@ -858,7 +858,7 @@ ksocknal_launch_packet(struct lnet_ni *ni, struct ksock_tx *tx, >> ksocknal_find_connecting_route_locked(peer)) { >> /* the message is going to be pinned to the peer */ >> tx->tx_deadline = >> - cfs_time_shift(*ksocknal_tunables.ksnd_timeout); >> + jiffies + *ksocknal_tunables.ksnd_timeout * HZ; >> >> /* Queue the message until a connection is established */ >> list_add_tail(&tx->tx_list, &peer->ksnp_tx_queue); >> @@ -2308,7 +2308,7 @@ ksocknal_send_keepalive_locked(struct ksock_peer *peer) >> * retry 10 secs later, so we wouldn't put pressure >> * on this peer if we failed to send keepalive this time >> */ >> - peer->ksnp_send_keepalive = cfs_time_shift(10); >> + peer->ksnp_send_keepalive = jiffies + 10 * HZ; >> >> conn = ksocknal_find_conn_locked(peer, NULL, 1); >> if (conn) { >> diff --git a/drivers/staging/lustre/lnet/lnet/net_fault.c b/drivers/staging/lustre/lnet/lnet/net_fault.c >> index 3928e9a74d6f..05d7b754815a 100644 >> --- a/drivers/staging/lustre/lnet/lnet/net_fault.c >> +++ b/drivers/staging/lustre/lnet/lnet/net_fault.c >> @@ -169,9 +169,9 @@ lnet_drop_rule_add(struct lnet_fault_attr *attr) >> >> rule->dr_attr = *attr; >> if (attr->u.drop.da_interval) { >> - rule->dr_time_base = cfs_time_shift(attr->u.drop.da_interval); >> - rule->dr_drop_time = cfs_time_shift( >> - prandom_u32_max(attr->u.drop.da_interval)); >> + rule->dr_time_base = jiffies + attr->u.drop.da_interval * HZ; >> + rule->dr_drop_time = jiffies + >> + prandom_u32_max(attr->u.drop.da_interval) * HZ; >> } else { >> rule->dr_drop_at = prandom_u32_max(attr->u.drop.da_rate); >> } >> @@ -279,9 +279,9 @@ lnet_drop_rule_reset(void) >> if (attr->u.drop.da_rate) { >> rule->dr_drop_at = prandom_u32_max(attr->u.drop.da_rate); >> } else { >> - rule->dr_drop_time = cfs_time_shift( >> - prandom_u32_max(attr->u.drop.da_interval)); >> - rule->dr_time_base = cfs_time_shift(attr->u.drop.da_interval); >> + rule->dr_drop_time = jiffies + >> + prandom_u32_max(attr->u.drop.da_interval) * HZ; >> + rule->dr_time_base = jiffies + attr->u.drop.da_interval * HZ; >> } >> spin_unlock(&rule->dr_lock); >> } >> @@ -513,7 +513,7 @@ delay_rule_match(struct lnet_delay_rule *rule, lnet_nid_t src, >> >> list_add_tail(&msg->msg_list, &rule->dl_msg_list); >> msg->msg_delay_send = round_timeout( >> - cfs_time_shift(attr->u.delay.la_latency)); >> + jiffies + attr->u.delay.la_latency * HZ); >> if (rule->dl_msg_send == -1) { >> rule->dl_msg_send = msg->msg_delay_send; >> mod_timer(&rule->dl_timer, rule->dl_msg_send); >> @@ -767,9 +767,9 @@ lnet_delay_rule_add(struct lnet_fault_attr *attr) >> >> rule->dl_attr = *attr; >> if (attr->u.delay.la_interval) { >> - rule->dl_time_base = cfs_time_shift(attr->u.delay.la_interval); >> - rule->dl_delay_time = cfs_time_shift( >> - prandom_u32_max(attr->u.delay.la_interval)); >> + rule->dl_time_base = jiffies + attr->u.delay.la_interval * HZ; >> + rule->dl_delay_time = jiffies + >> + prandom_u32_max(attr->u.delay.la_interval) * HZ; >> } else { >> rule->dl_delay_at = prandom_u32_max(attr->u.delay.la_rate); >> } >> @@ -920,9 +920,9 @@ lnet_delay_rule_reset(void) >> rule->dl_delay_at = prandom_u32_max(attr->u.delay.la_rate); >> } else { >> rule->dl_delay_time = >> - cfs_time_shift(prandom_u32_max( >> - attr->u.delay.la_interval)); >> - rule->dl_time_base = cfs_time_shift(attr->u.delay.la_interval); >> + jiffies + prandom_u32_max( >> + attr->u.delay.la_interval) * HZ; >> + rule->dl_time_base = jiffies + attr->u.delay.la_interval * HZ; >> } >> spin_unlock(&rule->dl_lock); >> } >> diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c >> index 4595a7ad4336..c72d4f4454ec 100644 >> --- a/drivers/staging/lustre/lnet/lnet/router.c >> +++ b/drivers/staging/lustre/lnet/lnet/router.c >> @@ -1026,7 +1026,7 @@ lnet_ping_router_locked(struct lnet_peer *rtr) >> >> if (!rtr->lp_ping_deadline) { >> rtr->lp_ping_deadline = >> - cfs_time_shift(router_ping_timeout); >> + jiffies + router_ping_timeout * HZ; >> } >> >> lnet_net_unlock(rtr->lp_cpt); >> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c >> index 6eb42f16040d..647e85b16c02 100644 >> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c >> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c >> @@ -118,7 +118,7 @@ static void ldlm_expired_completion_wait(struct ldlm_lock *lock, __u32 conn_cnt) >> lock->l_last_activity)); >> if (cfs_time_after(jiffies, next_dump)) { >> last_dump = next_dump; >> - next_dump = cfs_time_shift(300); >> + next_dump = jiffies + 300 * HZ; >> ldlm_namespace_dump(D_DLMTRACE, >> ldlm_lock_to_ns(lock)); >> if (last_dump == 0) >> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c >> index ccd0c082e39b..6c615b6e9bdc 100644 >> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c >> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c >> @@ -1323,7 +1323,7 @@ void ldlm_namespace_dump(int level, struct ldlm_namespace *ns) >> ldlm_res_hash_dump, >> (void *)(unsigned long)level, 0); >> spin_lock(&ns->ns_lock); >> - ns->ns_next_dump = cfs_time_shift(10); >> + ns->ns_next_dump = jiffies + 10 * HZ; >> spin_unlock(&ns->ns_lock); >> } >> >> diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c >> index e7500c53fafc..60dbe888e336 100644 >> --- a/drivers/staging/lustre/lustre/llite/llite_lib.c >> +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c >> @@ -257,7 +257,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt) >> * available >> */ >> err = obd_statfs(NULL, sbi->ll_md_exp, osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_FOR_MDT0); >> if (err) >> goto out_md_fid; >> @@ -1675,7 +1675,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs) >> >> /* Some amount of caching on the client is allowed */ >> rc = ll_statfs_internal(sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> 0); >> if (rc) >> return rc; >> diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c >> index 644bea2f9d37..164fe4d6b6b8 100644 >> --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c >> +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c >> @@ -53,7 +53,7 @@ static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr, >> int rc; >> >> rc = ll_statfs_internal(sbi->ll_sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) >> return sprintf(buf, "%u\n", osfs.os_bsize); >> @@ -71,7 +71,7 @@ static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr, >> int rc; >> >> rc = ll_statfs_internal(sbi->ll_sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) { >> __u32 blk_size = osfs.os_bsize >> 10; >> @@ -96,7 +96,7 @@ static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr, >> int rc; >> >> rc = ll_statfs_internal(sbi->ll_sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) { >> __u32 blk_size = osfs.os_bsize >> 10; >> @@ -121,7 +121,7 @@ static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr, >> int rc; >> >> rc = ll_statfs_internal(sbi->ll_sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) { >> __u32 blk_size = osfs.os_bsize >> 10; >> @@ -146,7 +146,7 @@ static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr, >> int rc; >> >> rc = ll_statfs_internal(sbi->ll_sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) >> return sprintf(buf, "%llu\n", osfs.os_files); >> @@ -164,7 +164,7 @@ static ssize_t filesfree_show(struct kobject *kobj, struct attribute *attr, >> int rc; >> >> rc = ll_statfs_internal(sbi->ll_sb, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) >> return sprintf(buf, "%llu\n", osfs.os_ffree); >> diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c >> index 6f996acf6aa8..b4a6ee6c83f3 100644 >> --- a/drivers/staging/lustre/lustre/llite/statahead.c >> +++ b/drivers/staging/lustre/lustre/llite/statahead.c >> @@ -523,7 +523,7 @@ static void ll_agl_trigger(struct inode *inode, struct ll_statahead_info *sai) >> * affect the performance. >> */ >> if (lli->lli_glimpse_time != 0 && >> - time_before(cfs_time_shift(-1), lli->lli_glimpse_time)) { >> + time_before(jiffies - 1 * HZ, lli->lli_glimpse_time)) { >> up_write(&lli->lli_glimpse_sem); >> lli->lli_agl_index = 0; >> iput(inode); >> diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c >> index e8a9b9902c37..7be931039e3c 100644 >> --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c >> +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c >> @@ -876,7 +876,7 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp, >> return -EFAULT; >> >> rc = obd_statfs(NULL, tgt->ltd_exp, &stat_buf, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> 0); >> if (rc) >> return rc; >> diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c >> index ec70c12e5b40..355e87ecc62d 100644 >> --- a/drivers/staging/lustre/lustre/lov/lov_obd.c >> +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c >> @@ -1063,7 +1063,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, >> >> /* got statfs data */ >> rc = obd_statfs(NULL, lov->lov_tgts[index]->ltd_exp, &stat_buf, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> flags); >> if (rc) >> return rc; >> diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c >> index 3b1c8e5a3053..266fa90cb03d 100644 >> --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c >> +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c >> @@ -2104,7 +2104,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len, >> } >> >> rc = mdc_statfs(NULL, obd->obd_self_export, &stat_buf, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> 0); >> if (rc != 0) >> goto out; >> diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c >> index 2ed350527398..eb6396add78d 100644 >> --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c >> +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c >> @@ -407,7 +407,7 @@ static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr, >> obd_kobj); >> struct obd_statfs osfs; >> int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) >> return sprintf(buf, "%u\n", osfs.os_bsize); >> @@ -423,7 +423,7 @@ static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr, >> obd_kobj); >> struct obd_statfs osfs; >> int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) { >> __u32 blk_size = osfs.os_bsize >> 10; >> @@ -446,7 +446,7 @@ static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr, >> obd_kobj); >> struct obd_statfs osfs; >> int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) { >> __u32 blk_size = osfs.os_bsize >> 10; >> @@ -469,7 +469,7 @@ static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr, >> obd_kobj); >> struct obd_statfs osfs; >> int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) { >> __u32 blk_size = osfs.os_bsize >> 10; >> @@ -492,7 +492,7 @@ static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr, >> obd_kobj); >> struct obd_statfs osfs; >> int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) >> return sprintf(buf, "%llu\n", osfs.os_files); >> @@ -508,7 +508,7 @@ static ssize_t filesfree_show(struct kobject *kobj, struct attribute *attr, >> obd_kobj); >> struct obd_statfs osfs; >> int rc = obd_statfs(NULL, obd->obd_self_export, &osfs, >> - cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), >> + get_jiffies_64() - OBD_STATFS_CACHE_SECONDS * HZ, >> OBD_STATFS_NODELAY); >> if (!rc) >> return sprintf(buf, "%llu\n", osfs.os_ffree); >> diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c >> index 277576b586db..eab03766236f 100644 >> --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c >> +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c >> @@ -269,7 +269,7 @@ static int class_attach(struct lustre_cfg *lcfg) >> /* obd->obd_osfs_age must be set to a value in the distant >> * past to guarantee a fresh statfs is fetched on mount. >> */ >> - obd->obd_osfs_age = cfs_time_shift_64(-1000); >> + obd->obd_osfs_age = get_jiffies_64() - 1000 * HZ; >> >> /* XXX belongs in setup not attach */ >> init_rwsem(&obd->obd_observer_link_sem); >> diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c >> index 9966fc7af789..04d801f11ace 100644 >> --- a/drivers/staging/lustre/lustre/osc/osc_request.c >> +++ b/drivers/staging/lustre/lustre/osc/osc_request.c >> @@ -617,7 +617,7 @@ static void osc_announce_cached(struct client_obd *cli, struct obdo *oa, >> void osc_update_next_shrink(struct client_obd *cli) >> { >> cli->cl_next_shrink_grant = >> - cfs_time_shift(cli->cl_grant_shrink_interval); >> + jiffies + cli->cl_grant_shrink_interval * HZ; >> CDEBUG(D_CACHE, "next time %ld to shrink grant\n", >> cli->cl_next_shrink_grant); >> } >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c >> index e836591c5936..7057b4447035 100644 >> --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c >> +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c >> @@ -108,7 +108,7 @@ static void ptlrpc_update_next_ping(struct obd_import *imp, int soon) >> at_get(&imp->imp_at.iat_net_latency)); >> time = min(time, dtime); >> } >> - imp->imp_next_ping = cfs_time_shift(time); >> + imp->imp_next_ping = jiffies + time * HZ; >> } >> >> static inline int imp_is_deactive(struct obd_import *imp) >> @@ -120,9 +120,9 @@ static inline int imp_is_deactive(struct obd_import *imp) >> static inline int ptlrpc_next_reconnect(struct obd_import *imp) >> { >> if (imp->imp_server_timeout) >> - return cfs_time_shift(obd_timeout / 2); >> + return jiffies + obd_timeout / 2 * HZ; >> else >> - return cfs_time_shift(obd_timeout); >> + return jiffies + obd_timeout * HZ; >> } >> >> static long pinger_check_timeout(unsigned long time) >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c >> index e71046db28e5..4265e8d00ca5 100644 >> --- a/drivers/staging/lustre/lustre/ptlrpc/service.c >> +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c >> @@ -922,7 +922,7 @@ static void ptlrpc_at_set_timer(struct ptlrpc_service_part *svcpt) >> if (next <= 0) { >> ptlrpc_at_timer(&svcpt->scp_at_timer); >> } else { >> - mod_timer(&svcpt->scp_at_timer, cfs_time_shift(next)); >> + mod_timer(&svcpt->scp_at_timer, jiffies + next * HZ); >> CDEBUG(D_INFO, "armed %s at %+ds\n", >> svcpt->scp_service->srv_name, next); >> } >> >> >> Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Mon Apr 2 19:38:57 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Mon, 2 Apr 2018 19:38:57 +0000 Subject: [lustre-devel] [PATCH 13/17] staging: lustre: libcfs: remove cfs_timeout_cap() In-Reply-To: <152229760874.27689.12453214678546053828.stgit@noble> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760874.27689.12453214678546053828.stgit@noble> Message-ID: <346B8E2C-5842-4771-86D8-CBB5CEF2DC35@intel.com> On Mar 28, 2018, at 22:26, NeilBrown wrote: > > This wrapper is only used once, so open-code it as max(). > > This allows us to remove the libcfs_time.h include file. > > Signed-off-by: NeilBrown > --- > .../staging/lustre/include/linux/libcfs/libcfs.h | 1 > .../lustre/include/linux/libcfs/libcfs_time.h | 50 -------------------- > .../lustre/include/linux/libcfs/linux/linux-time.h | 2 - > drivers/staging/lustre/lustre/ptlrpc/import.c | 4 +- > 4 files changed, 3 insertions(+), 54 deletions(-) > delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_time.h > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > index 3b751c436b3d..3d3fa52858e5 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > @@ -43,7 +43,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h > deleted file mode 100644 > index 172a8872e3f3..000000000000 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h > +++ /dev/null > @@ -1,50 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * You should have received a copy of the GNU General Public License > - * version 2 along with this program; If not, see > - * http://www.gnu.org/licenses/gpl-2.0.html > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. > - * Use is subject to license terms. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * libcfs/include/libcfs/libcfs_time.h > - * > - * Time functions. > - * > - */ > - > -#ifndef __LIBCFS_TIME_H__ > -#define __LIBCFS_TIME_H__ > -/* > - * return valid time-out based on user supplied one. Currently we only check > - * that time-out is not shorted than allowed. > - */ > -static inline long cfs_timeout_cap(long timeout) > -{ > - if (timeout < CFS_TICK) > - timeout = CFS_TICK; > - return timeout; > -} > - > -#endif > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h > index ff3aae2f1231..ecb2126a9e6f 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h > +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h > @@ -78,7 +78,7 @@ static inline int cfs_time_beforeq_64(u64 t1, u64 t2) > /* > * One jiffy > */ > -#define CFS_TICK (1) > +#define CFS_TICK (1UL) It seems like CFS_TICK is mostly useless as well and could just be dropped? > #define CFS_DURATION_T "%ld" > > diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c > index 4a9d1f189d01..dd4fd54128dd 100644 > --- a/drivers/staging/lustre/lustre/ptlrpc/import.c > +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c > @@ -1486,7 +1486,7 @@ int ptlrpc_disconnect_import(struct obd_import *imp, int noclose) > } > > if (ptlrpc_import_in_recovery(imp)) { > - long timeout; > + unsigned long timeout; > > if (AT_OFF) { > if (imp->imp_server_timeout) > @@ -1501,7 +1501,7 @@ int ptlrpc_disconnect_import(struct obd_import *imp, int noclose) > > if (wait_event_idle_timeout(imp->imp_recovery_waitq, > !ptlrpc_import_in_recovery(imp), > - cfs_timeout_cap(timeout)) == 0) > + max(timeout, CFS_TICK)) == 0) > l_wait_event_abortable( > imp->imp_recovery_waitq, > !ptlrpc_import_in_recovery(imp)); > > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Mon Apr 2 19:43:47 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Mon, 2 Apr 2018 19:43:47 +0000 Subject: [lustre-devel] lustre and loopback device In-Reply-To: References: <87d0zr668j.fsf@notabene.neil.brown.name> Message-ID: <0A9CF639-958A-4548-AAEA-475129AA4393@intel.com> On Mar 30, 2018, at 14:16, Jinshan Xiong wrote: > > + Andreas. > > A few problems: > 1. Linux loop device won't work upon Lustre with direct IO mode because Lustre direct IO has to be pagesize aligned, and there seems no way of changing sector size to pagesize for Linux loop device; > 2. 64KB is not an optimal RPC size for Lustre, so yes eventually we are going to see throughput issue if the RPC size is limited to 64KB; > 3. It's hard to do I/O optimization more with Linux loop device. With direct I/O by default, it has to wait for the current I/O to complete before it can send the next one. This is not good. I have revised llite_lloop driver so that it can do async direct I/O. The performance boosts significantly by doing so. Jinshan, if you have a patch to implement an improved llite_lloop driver, I think it would be useful to share it. Originally I'd hoped that the kernel loop driver would allow pluggable backends so that they could be replaced as needed, but that wasn't implemented. I'd think that this would be an approach that might be more acceptable upstream, rather than copying the loop driver from the kernel and only changing the IO interface. Cheers, Andreas > I tried to increase the sector size of Linux loop device and also max_{hw_}sectors_kb but it didn't work. Please let me know if there exists ways of doing that. > > Thanks, > Jinshan > > On Fri, Mar 30, 2018 at 12:12 PM, James Simmons wrote: > > > On Fri, Mar 23 2018, James Simmons wrote: > > > > > Hi Neil > > > > > > So once long ago lustre had its own loopback device due to the > > > upstream loopback device not supporting Direct I/O. Once it did we > > > dropped support for our custom driver. Recently their has been interest > > > in using the loopback driver and Jinshan discussed with me about reviving > > > our custom driver which I'm not thrilled about. He was seeing problems > > > with Direct I/O above 64K. Do you know the details why that limitation > > > exist. Perhaps it can be resolved or maybe we are missing something? > > > Thanks for your help. > > > > Hi James, and Jinshan, > > What sort of problems do you see with 64K DIO requests? > > Is it a throughput problem or are you seeing IO errors? > > Would it be easy to demonstrate the problem in a cluster > > comprising a few VMs, or is real hardware needed? If VMs are OK, > > can you tell me exactly how to duplicate the problem? > > > > If loop gets a multi-bio request, it will allocate a bvec array > > to hold all the bio_vecs. If there are more than 256 pages (1Meg) > > in a request, this could easily fail. 5 consecutive 64K requests on a > > machine without much free memory could hit problems here. > > If that is the problem, it should be easy to fix (request the number > > given to blk_queue_max_hw_sectors). > > Jinshan can you post a reproducer so we can see the problem. > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From jinshan.xiong at gmail.com Mon Apr 2 20:25:04 2018 From: jinshan.xiong at gmail.com (Jinshan Xiong) Date: Mon, 2 Apr 2018 13:25:04 -0700 Subject: [lustre-devel] lustre and loopback device In-Reply-To: <0A9CF639-958A-4548-AAEA-475129AA4393@intel.com> References: <87d0zr668j.fsf@notabene.neil.brown.name> <0A9CF639-958A-4548-AAEA-475129AA4393@intel.com> Message-ID: Hi Andreas, There are still some more work going on, like to apply the changes in LU-4198. The other improvement is to make 'lctl blockdev' attach a loop device to readonly by default, otherwise the virtual block device would be corrupted if there exist multiple writers. After that's done, I will be happy to push a patch for review. Thanks, Jinshan On Mon, Apr 2, 2018 at 12:43 PM, Dilger, Andreas wrote: > On Mar 30, 2018, at 14:16, Jinshan Xiong wrote: > > > > + Andreas. > > > > A few problems: > > 1. Linux loop device won't work upon Lustre with direct IO mode because > Lustre direct IO has to be pagesize aligned, and there seems no way of > changing sector size to pagesize for Linux loop device; > > 2. 64KB is not an optimal RPC size for Lustre, so yes eventually we are > going to see throughput issue if the RPC size is limited to 64KB; > > 3. It's hard to do I/O optimization more with Linux loop device. With > direct I/O by default, it has to wait for the current I/O to complete > before it can send the next one. This is not good. I have revised > llite_lloop driver so that it can do async direct I/O. The performance > boosts significantly by doing so. > > Jinshan, > if you have a patch to implement an improved llite_lloop driver, I think > it would be useful to share it. Originally I'd hoped that the kernel loop > driver would allow pluggable backends so that they could be replaced as > needed, but that wasn't implemented. I'd think that this would be an > approach that might be more acceptable upstream, rather than copying the > loop driver from the kernel and only changing the IO interface. > > Cheers, Andreas > > > I tried to increase the sector size of Linux loop device and also > max_{hw_}sectors_kb but it didn't work. Please let me know if there exists > ways of doing that. > > > > Thanks, > > Jinshan > > > > On Fri, Mar 30, 2018 at 12:12 PM, James Simmons > wrote: > > > > > On Fri, Mar 23 2018, James Simmons wrote: > > > > > > > Hi Neil > > > > > > > > So once long ago lustre had its own loopback device due to the > > > > upstream loopback device not supporting Direct I/O. Once it did we > > > > dropped support for our custom driver. Recently their has been > interest > > > > in using the loopback driver and Jinshan discussed with me about > reviving > > > > our custom driver which I'm not thrilled about. He was seeing > problems > > > > with Direct I/O above 64K. Do you know the details why that > limitation > > > > exist. Perhaps it can be resolved or maybe we are missing something? > > > > Thanks for your help. > > > > > > Hi James, and Jinshan, > > > What sort of problems do you see with 64K DIO requests? > > > Is it a throughput problem or are you seeing IO errors? > > > Would it be easy to demonstrate the problem in a cluster > > > comprising a few VMs, or is real hardware needed? If VMs are OK, > > > can you tell me exactly how to duplicate the problem? > > > > > > If loop gets a multi-bio request, it will allocate a bvec array > > > to hold all the bio_vecs. If there are more than 256 pages (1Meg) > > > in a request, this could easily fail. 5 consecutive 64K requests on a > > > machine without much free memory could hit problems here. > > > If that is the problem, it should be easy to fix (request the number > > > given to blk_queue_max_hw_sectors). > > > > Jinshan can you post a reproducer so we can see the problem. > > > > Cheers, Andreas > -- > Andreas Dilger > Lustre Principal Architect > Intel Corporation > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From neilb at suse.com Mon Apr 2 22:26:15 2018 From: neilb at suse.com (NeilBrown) Date: Tue, 03 Apr 2018 08:26:15 +1000 Subject: [lustre-devel] [PATCH 11/17] staging: lustre: libcfs: discard cfs_time_shift(). In-Reply-To: <0B6A147C-7E98-4B00-AF32-AF8843484CF9@intel.com> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760863.27689.4681198496926109808.stgit@noble> <0B6A147C-7E98-4B00-AF32-AF8843484CF9@intel.com> Message-ID: <87muyl1bzs.fsf@notabene.neil.brown.name> On Mon, Apr 02 2018, Dilger, Andreas wrote: >> On Mar 30, 2018, at 13:02, James Simmons wrote: >> >> >>> This function simply multiplies by HZ and adds jiffies. >>> This is simple enough to be opencoded, and doing so >>> makes the code easier to read. >>> >>> Same for cfs_time_shift_64() >> >> Reviewed-by: James Simmons > > Hmm, I thought we were trying to get rid of direct HZ usage in modules, > because of tickless systems, and move to e.g. msecs_to_jiffies() or similar? Are we? I hadn't heard but I could easily have missed it. Documentation/scheduler/completion.txt does say Timeouts are preferably calculated with msecs_to_jiffies() or usecs_to_jiffies(). but is isn't clear what they are preferred to. Do you remember where you heard? or have a reference? $ git grep ' \* *HZ' |wc 2244 15679 170016 $ git grep msecs_to_jiffies | wc 3301 13151 276725 so msecs_to_jiffies is slightly more popular than "* HZ" (even if you add in "HZ *"). But that could just be a preference for using milliseconds over using seconds. $ git grep msecs_to_jiffies | grep -c '[0-9]000' 587 so there are only 587 places that msecs_to_jiffies is clearly used in place of multiplying by HZ. If we were to pursue this, I would want to add secs_to_jiffies() to include/linux/jiffies.h and use that. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Mon Apr 2 22:34:00 2018 From: neilb at suse.com (NeilBrown) Date: Tue, 03 Apr 2018 08:34:00 +1000 Subject: [lustre-devel] [PATCH 13/17] staging: lustre: libcfs: remove cfs_timeout_cap() In-Reply-To: <346B8E2C-5842-4771-86D8-CBB5CEF2DC35@intel.com> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760874.27689.12453214678546053828.stgit@noble> <346B8E2C-5842-4771-86D8-CBB5CEF2DC35@intel.com> Message-ID: <87k1tp1bmv.fsf@notabene.neil.brown.name> On Mon, Apr 02 2018, Dilger, Andreas wrote: > On Mar 28, 2018, at 22:26, NeilBrown wrote: >> diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> index ff3aae2f1231..ecb2126a9e6f 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h >> @@ -78,7 +78,7 @@ static inline int cfs_time_beforeq_64(u64 t1, u64 t2) >> /* >> * One jiffy >> */ >> -#define CFS_TICK (1) >> +#define CFS_TICK (1UL) > > It seems like CFS_TICK is mostly useless as well and could just be dropped? Possibly, but I don't know what its purpose is so I didn't want to just drop it in the middle of a patch that is performing an idempotent transformation. Do you know why the one place that uses CFS_TICK wants to protect about a timeout of zero? Maybe because the old l_wait_event() treated a timeout of zero as meaning no timeout? In that case this really is irrelevant now and that wait_event_idle_timeout() should just use "timeout" directly. Thanks, NeilBrown > >> #define CFS_DURATION_T "%ld" >> >> diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c >> index 4a9d1f189d01..dd4fd54128dd 100644 >> --- a/drivers/staging/lustre/lustre/ptlrpc/import.c >> +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c >> @@ -1486,7 +1486,7 @@ int ptlrpc_disconnect_import(struct obd_import *imp, int noclose) >> } >> >> if (ptlrpc_import_in_recovery(imp)) { >> - long timeout; >> + unsigned long timeout; >> >> if (AT_OFF) { >> if (imp->imp_server_timeout) >> @@ -1501,7 +1501,7 @@ int ptlrpc_disconnect_import(struct obd_import *imp, int noclose) >> >> if (wait_event_idle_timeout(imp->imp_recovery_waitq, >> !ptlrpc_import_in_recovery(imp), >> - cfs_timeout_cap(timeout)) == 0) >> + max(timeout, CFS_TICK)) == 0) >> l_wait_event_abortable( >> imp->imp_recovery_waitq, >> !ptlrpc_import_in_recovery(imp)); >> >> > > Cheers, Andreas > -- > Andreas Dilger > Lustre Principal Architect > Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Mon Apr 2 22:37:59 2018 From: neilb at suse.com (NeilBrown) Date: Tue, 03 Apr 2018 08:37:59 +1000 Subject: [lustre-devel] lustre and loopback device In-Reply-To: References: <87d0zr668j.fsf@notabene.neil.brown.name> <0A9CF639-958A-4548-AAEA-475129AA4393@intel.com> Message-ID: <87h8ot1bg8.fsf@notabene.neil.brown.name> On Mon, Apr 02 2018, Jinshan Xiong wrote: > Hi Andreas, > > There are still some more work going on, like to apply the changes in > LU-4198. > The other improvement is to make 'lctl blockdev' attach a loop device to > readonly by default, otherwise the virtual block device would be corrupted > if there exist multiple writers. > > After that's done, I will be happy to push a patch for review. If you just posted it now - even though it isn't perfect yet - I could read it, understand what the problem is that it is trying to fix, and start looking at how to improve drivers/block/loop.c so that your patch isn't necessary. NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From jinshan.xiong at gmail.com Tue Apr 3 00:03:53 2018 From: jinshan.xiong at gmail.com (Jinshan Xiong) Date: Mon, 2 Apr 2018 17:03:53 -0700 Subject: [lustre-devel] lustre and loopback device In-Reply-To: <87h8ot1bg8.fsf@notabene.neil.brown.name> References: <87d0zr668j.fsf@notabene.neil.brown.name> <0A9CF639-958A-4548-AAEA-475129AA4393@intel.com> <87h8ot1bg8.fsf@notabene.neil.brown.name> Message-ID: Hi Neil, Sure. Patches are attached for your reference. The first patch is to bring llite_lloop driver back; the 2nd fixes some bugs and the 3rd one adds async I/O. The patches are based on 2.7.21, but I don't think it would be difficult to port them to master. Anyway, it's just for your reference. This is a piece of work in progress, please don't use it for production. Thanks, Jinshan On Mon, Apr 2, 2018 at 3:37 PM, NeilBrown wrote: > On Mon, Apr 02 2018, Jinshan Xiong wrote: > > > Hi Andreas, > > > > There are still some more work going on, like to apply the changes in > > LU-4198. > > The other improvement is to make 'lctl blockdev' attach a loop device to > > readonly by default, otherwise the virtual block device would be > corrupted > > if there exist multiple writers. > > > > After that's done, I will be happy to push a patch for review. > > If you just posted it now - even though it isn't perfect yet - I could > read it, understand what the problem is that it is trying to fix, and start > looking at how to improve drivers/block/loop.c so that your patch isn't > necessary. > > NeilBrown > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Revert-LU-8844-llite-delete-lloop.patch Type: application/octet-stream Size: 43945 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-cleanup-and-bugfix.patch Type: application/octet-stream Size: 21050 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-async-IO.patch Type: application/octet-stream Size: 14128 bytes Desc: not available URL: From peter.a.jones at intel.com Tue Apr 3 20:42:51 2018 From: peter.a.jones at intel.com (Jones, Peter A) Date: Tue, 3 Apr 2018 20:42:51 +0000 Subject: [lustre-devel] Lustre 2.11.0 released Message-ID: <0DC149CC-7BA3-4441-BA64-6918876EE119@intel.com> We are pleased to announce that the Lustre 2.11.0 Release has been declared GA and is available for download . You can also grab the source from git This major release includes new features: Data on MDT The Lustre Data on MDT (DoM) feature improves small file IO by placing small files directly on the MDT. It also improves large file IO by avoiding the OST being affected by small random IO that can cause device seeking and hurt the streaming IO performance (LU-3285) File Level Redundancy –Delayed Resync Provides a mechanism whereby files can be replicated on multiple OSTs in the same namespace, thus strengthening and improving reliability, availability, and aggregate parallel read performance of the data (LU-9771) Lock Ahead Enables userspace to request LDLM locks asynchronously thus improving performance for certain workloads (LU-6179) Fuller details can be found in the 2.11 wiki page (including the change log and test matrix) Please log any issues found in the issue tracking system Thanks to all those who have contributed to the creation of this release. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.dilger at intel.com Wed Apr 4 08:10:44 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Wed, 4 Apr 2018 08:10:44 +0000 Subject: [lustre-devel] [PATCH 11/17] staging: lustre: libcfs: discard cfs_time_shift(). In-Reply-To: <87muyl1bzs.fsf@notabene.neil.brown.name> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760863.27689.4681198496926109808.stgit@noble> <0B6A147C-7E98-4B00-AF32-AF8843484CF9@intel.com> <87muyl1bzs.fsf@notabene.neil.brown.name> Message-ID: On Apr 2, 2018, at 16:26, NeilBrown wrote: > On Mon, Apr 02 2018, Dilger, Andreas wrote: >> On Mar 30, 2018, at 13:02, James Simmons wrote: >>>> This function simply multiplies by HZ and adds jiffies. >>>> This is simple enough to be opencoded, and doing so >>>> makes the code easier to read. >>>> >>>> Same for cfs_time_shift_64() >>> >>> Reviewed-by: James Simmons >> >> Hmm, I thought we were trying to get rid of direct HZ usage in modules, >> because of tickless systems, and move to e.g. msecs_to_jiffies() or similar? > > Are we? I hadn't heard but I could easily have missed it. > Documentation/scheduler/completion.txt does say > > Timeouts are preferably calculated with > msecs_to_jiffies() or usecs_to_jiffies(). > > but is isn't clear what they are preferred to. Do you remember where > you heard? or have a reference? I thought the goal was to avoid hard-coding the HZ value so that kernels could have variable clock rates in the future. Cheers, Andreas > $ git grep ' \* *HZ' |wc > 2244 15679 170016 > $ git grep msecs_to_jiffies | wc > 3301 13151 276725 > > so msecs_to_jiffies is slightly more popular than "* HZ" (even if you add > in "HZ *"). But that could just be a preference for using milliseconds > over using seconds. > > $ git grep msecs_to_jiffies | grep -c '[0-9]000' > 587 > > so there are only 587 places that msecs_to_jiffies is clearly used in > place of multiplying by HZ. > > If we were to pursue this, I would want to add secs_to_jiffies() to > include/linux/jiffies.h and use that. > > Thanks, > NeilBrown > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From neilb at suse.com Wed Apr 4 22:00:14 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 05 Apr 2018 08:00:14 +1000 Subject: [lustre-devel] [PATCH 11/17] staging: lustre: libcfs: discard cfs_time_shift(). In-Reply-To: References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760863.27689.4681198496926109808.stgit@noble> <0B6A147C-7E98-4B00-AF32-AF8843484CF9@intel.com> <87muyl1bzs.fsf@notabene.neil.brown.name> Message-ID: <87tvsqy6mp.fsf@notabene.neil.brown.name> On Wed, Apr 04 2018, Dilger, Andreas wrote: > On Apr 2, 2018, at 16:26, NeilBrown wrote: >> On Mon, Apr 02 2018, Dilger, Andreas wrote: >>> On Mar 30, 2018, at 13:02, James Simmons wrote: >>>>> This function simply multiplies by HZ and adds jiffies. >>>>> This is simple enough to be opencoded, and doing so >>>>> makes the code easier to read. >>>>> >>>>> Same for cfs_time_shift_64() >>>> >>>> Reviewed-by: James Simmons >>> >>> Hmm, I thought we were trying to get rid of direct HZ usage in modules, >>> because of tickless systems, and move to e.g. msecs_to_jiffies() or similar? >> >> Are we? I hadn't heard but I could easily have missed it. >> Documentation/scheduler/completion.txt does say >> >> Timeouts are preferably calculated with >> msecs_to_jiffies() or usecs_to_jiffies(). >> >> but is isn't clear what they are preferred to. Do you remember where >> you heard? or have a reference? > > I thought the goal was to avoid hard-coding the HZ value so that kernels > could have variable clock rates in the future. It is hard to imagine it ever being possible to change, at runtime, the length of time represented by one jiffie. Durations, measured in jiffies, are stored it lots of different places, and they would all need to be changed to msecs - very error prone work. I think it would be much more likely to set HZ to some large value, and have the clock tick at varying multiples of that. The NOHZ work already does something a bit like that I think. Thanks, NeilBrown > > Cheers, Andreas > >> $ git grep ' \* *HZ' |wc >> 2244 15679 170016 >> $ git grep msecs_to_jiffies | wc >> 3301 13151 276725 >> >> so msecs_to_jiffies is slightly more popular than "* HZ" (even if you add >> in "HZ *"). But that could just be a preference for using milliseconds >> over using seconds. >> >> $ git grep msecs_to_jiffies | grep -c '[0-9]000' >> 587 >> >> so there are only 587 places that msecs_to_jiffies is clearly used in >> place of multiplying by HZ. >> >> If we were to pursue this, I would want to add secs_to_jiffies() to >> include/linux/jiffies.h and use that. >> >> Thanks, >> NeilBrown >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > > Cheers, Andreas > -- > Andreas Dilger > Lustre Principal Architect > Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From spitzcor at cray.com Tue Apr 10 01:37:22 2018 From: spitzcor at cray.com (Cory Spitz) Date: Tue, 10 Apr 2018 01:37:22 +0000 Subject: [lustre-devel] [PATCH 08/17] staging: lustre: add container_of_safe() In-Reply-To: References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760847.27689.4969508646445147289.stgit@noble> Message-ID: <279CCF71-2922-4872-9A4B-0478A4CD061E@cray.com> James, you misspelled Lustre! On 3/30/18, 2:00 PM, "lustre-devel on behalf of James Simmons" wrote: > Luster has a container_of0() function which is similar to -------------- next part -------------- An HTML attachment was scrubbed... URL: From spitzcor at cray.com Tue Apr 10 02:11:03 2018 From: spitzcor at cray.com (Cory Spitz) Date: Tue, 10 Apr 2018 02:11:03 +0000 Subject: [lustre-devel] New tag 2.10.55 In-Reply-To: References: Message-ID: <2C5CE580-0280-438B-AEAA-C945D2083700@cray.com> Oleg, I've noticed that you've stopped sending out tag notifications with a changelog. The last I saw was 2.10.55. Might you resume this practice? If it is too much work, I get that. Don't make me do anything that you don't want to do. I just found your notices useful, even if I didn't understand why some batches of landings from master-next would be tagged and others not. Thanks, -Cory -- On 11/10/17, 3:05 AM, "lustre-devel on behalf of Oleg Drokin" wrote: Hello! I tagged a new tag 2.10.55 in the Lustre master community development branch yesterday Here’s the changelog. Alex Zhuravlev (4): LU-9660 ptlrpc: do not wakeup every second LU-9578 llite: use security context if it's enabled in the kernel LU-10041 osd: osd-zfs to choose dnode size LU-7251 osp: do not assign commit callback to every thandle Alexander Boyko (4): LU-8344 test: fix sanity 256 LU-4134 obdclass: obd_device improvement LU-8475 target: use slab allocation LU-10015 o2iblnd: fix race at kiblnd_connect_peer Alexey Lyashkov (1): LU-9782 osd-ldiskfs: avoid extra search Amir Shehata (2): LU-9990 lnet: add backwards compatibility for YAML config LU-10089 o2iblnd: use IB_MR_TYPE_SG_GAPS Andreas Dilger (9): LU-9462 doc: update lfs setstripe man page and usage LU-4923 osd-ldiskfs: dirdata is not needed on MGS LU-7990 llite: increase whole-file readahead to RPC size LU-9452 ldlm: remove MSG_CONNECT_LIBCLIENT support LU-4705 mdc: improve mdc_enqueue() error message LU-10046 misc: replace LASSERT() with CLASSERT() LU-9611 lov: allow lov.*.stripe{size,count}=-1 param LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED LU-8174 mdt: remove use of typedef mds_reint_t Ben Evans (1): LU-7988 hsm: wake up cdt when requests are empty Bob Glossman (6): LU-10047 tests: stop skipping test_102 subtests LU-9469 ldiskfs: add additional attach_jinode call LU-9956 kernel: kernel upgrade [SLES12 SP3 4.4.82-6.3] LU-10023 kernel: kernel update [SLES12 SP3 4.4.82-6.9] LU-10142 kernel: kernel update RHEL7.4 [3.10.0-693.5.2.el7] LU-10164 kernel: kernel update [SLES12 SP3 4.4.92-6.18] Bruno Faccini (1): LU-9994 obdclass: fix llog_cat_id2handle() error handling Chris Horn (1): LU-10119 scripts: Correct shebang/hashpling format Elena Gryaznova (1): LU-8721 tests: add parallel-scale fio test Gu Zheng (1): LU-9951 lustre_compat: add wrapper function for posix_acl_update_mode Henri Doreau (2): LU-9416 hsm: add kkuc before sending registration RPCs LU-10141 llapi: integer overflow in llapi_changelog_start James Nunez (5): LU-9741 test: Correct check of stripe count for directories LU-9860 tests: Run command on MGS for conf-sanity 33a LU-9968 tests: correct stripe index sanity 300g LU-10101 tests: correct sanity-quota call to quota_error LU-10152 tests: reformat after conf-sanity test 99 James Simmons (4): LU-9019 ofd: migrate to 64 bit time LU-9897 utils: remove libcfsutils.a and libptlctl.a LU-8066 obd: migrate to ksets LU-9019 ldlm: migrate the rest of the code to 64 bit time Jan Kara (1): LU-9558 llite: port lustre to unified handling of bdi John L. Hammond (4): LU-9983 ko2iblnd: allow for discontiguous fragments LU-9405 utils: remove device path parsing from mount.lustre LU-10132 llite: handle xattr cache refill race LU-10086 libcfs: use dynamic minors for /dev/{lnet,obd} Nathaniel Clark (5): LU-10051 build: Build with ZFS 0.7.2 LU-9752 man: Reference zgenhostid instead of genhostid LU-10098 scripts: Fix mounted check in Lustre RA LU-10007 pacemaker: Use lctl and load lustre LU-10150 build: Build with ZFS 0.7.3 Oleg Drokin (1): New tag 2.10.55 Patrick Farrell (1): LU-10131 llite: Update i_nlink on unlink Qian Yingjin (1): LU-9140 nrs: measure the runtime of dd directly Sebastien Buisson (2): LU-9672 gss: fix expiration time of sunrpc cache LU-9946 nodemap: have fileset on default nodemap. Steve Guminski (3): LU-5170 lfs: Standardize error messages in lfs_setstripe() LU-6051 utils: allow lfs_migrate to handle hard links LU-10199 utils: disable sanity test 56xb Wang Shilong (1): LU-10029 osd-ldiskfs: make project inherit attr removeable Wei Liu (1): LU-9158 test: Use project ID for project quota for quota_scan Yang Sheng (2): LU-9908 tests: force umount client in test 70e, 41b, and 105 LU-9814 ldiskfs: restore simple_strtol in prealloc dilip krishnagiri (1): LU-9590 tests: remove replay-single tests from ALWAYS_EXCEPT _______________________________________________ lustre-devel mailing list lustre-devel at lists.lustre.org http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From oleg.drokin at intel.com Tue Apr 10 02:13:00 2018 From: oleg.drokin at intel.com (Oleg Drokin) Date: Mon, 9 Apr 2018 22:13:00 -0400 Subject: [lustre-devel] New tag 2.10.55 In-Reply-To: <2C5CE580-0280-438B-AEAA-C945D2083700@cray.com> References: <2C5CE580-0280-438B-AEAA-C945D2083700@cray.com> Message-ID: <71761888-DC8D-4B00-865E-C58C797137D0@intel.com> > On Apr 9, 2018, at 10:11 PM, Cory Spitz wrote: > > Oleg, > > I've noticed that you've stopped sending out tag notifications with a changelog. The last I saw was 2.10.55. Might you resume this practice? If it is too much work, I get that. Don't make me do anything that you don't want to do. I just found your notices useful, even if I didn't understand why some batches of landings from master-next would be tagged and others not. Hm, yes, it fell by wayside lately, but I will try to resume doing it. We aim to tag master every other week or so (or after really big landings). master-next merges on the other hand are much more frequent and it does not make sense to tag after every one of them. From neilb at suse.com Wed Apr 11 21:19:57 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:19:57 +1000 Subject: [lustre-devel] [PATCH 08/17] staging: lustre: add container_of_safe() In-Reply-To: <279CCF71-2922-4872-9A4B-0478A4CD061E@cray.com> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760847.27689.4969508646445147289.stgit@noble> <279CCF71-2922-4872-9A4B-0478A4CD061E@cray.com> Message-ID: <87o9iptp8i.fsf@notabene.neil.brown.name> On Tue, Apr 10 2018, Cory Spitz wrote: > James, you misspelled Lustre! That wasn't James, that was me - sorry :-) NeilBrown > > > > On 3/30/18, 2:00 PM, "lustre-devel on behalf of James Simmons" wrote: > > > > > Luster has a container_of0() function which is similar to > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 00/20] staging: lustre: convert to rhashtable Message-ID: <152348312863.12394.11915752362061083241.stgit@noble> libcfs in lustre has a resizeable hashtable. Linux already has a resizeable hashtable, rhashtable, which is better is most metrics. See https://lwn.net/Articles/751374/ in a few days for an introduction to rhashtable. This series converts lustre to use rhashtable. This affects several different tables, and each is different is various ways. There are two outstanding issues. One is that a bug in rhashtable means that we cannot enable auto-shrinking in one of the tables. That is documented as appropriate and should be fixed soon. The other is that rhashtable has an atomic_t which counts the elements in a hash table. At least one table in lustre went to some trouble to avoid any table-wide atomics, so that could lead to a regression. I'm hoping that rhashtable can be enhanced with the option of a per-cpu counter, or similar. I have enabled automatic shrinking on all tables where it makes sense and doesn't trigger the bug. I have also removed all hints concerning min/max size - I cannot see how these could be useful. The dump_pgcache debugfs file provided some interesting challenges. I think I have cleaned it up enough so that it all makes sense. An extra pair of eyes examining that code in particular would be appreciated. This series passes all the same tests that pass before the patches are applied. Thanks, NeilBrown --- NeilBrown (20): staging: lustre: ptlrpc: convert conn_hash to rhashtable staging: lustre: convert lov_pool to use rhashtable staging: lustre: convert obd uuid hash to rhashtable staging: lustre: convert osc_quota hash to rhashtable staging: lustre: separate buckets from ldlm hash table staging: lustre: ldlm: add a counter to the per-namespace data staging: lustre: ldlm: store name directly in namespace. staging: lustre: simplify ldlm_ns_hash_defs[] staging: lustre: convert ldlm_resource hash to rhashtable. staging: lustre: make struct lu_site_bkt_data private staging: lustre: lu_object: discard extra lru count. staging: lustre: lu_object: factor out extra per-bucket data staging: lustre: lu_object: move retry logic inside htable_lookup staging: lustre: fold lu_object_new() into lu_object_find_at() staging: lustre: llite: use more private data in dump_pgcache staging: lustre: llite: remove redundant lookup in dump_pgcache staging: lustre: use call_rcu() to free lu_object_headers staging: lustre: change how "dump_page_cache" walks a hash table staging: lustre: convert lu_object cache to rhashtable staging: lustre: remove cfs_hash resizeable hashtable implementation. .../staging/lustre/include/linux/libcfs/libcfs.h | 1 .../lustre/include/linux/libcfs/libcfs_hash.h | 866 -------- drivers/staging/lustre/lnet/libcfs/Makefile | 2 drivers/staging/lustre/lnet/libcfs/hash.c | 2064 -------------------- drivers/staging/lustre/lnet/libcfs/module.c | 12 drivers/staging/lustre/lustre/include/lu_object.h | 55 - drivers/staging/lustre/lustre/include/lustre_dlm.h | 19 .../staging/lustre/lustre/include/lustre_export.h | 2 drivers/staging/lustre/lustre/include/lustre_net.h | 4 drivers/staging/lustre/lustre/include/obd.h | 11 .../staging/lustre/lustre/include/obd_support.h | 9 drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 31 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 370 +--- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 8 drivers/staging/lustre/lustre/llite/vvp_dev.c | 332 +-- drivers/staging/lustre/lustre/llite/vvp_object.c | 9 drivers/staging/lustre/lustre/lov/lov_internal.h | 11 drivers/staging/lustre/lustre/lov/lov_obd.c | 12 drivers/staging/lustre/lustre/lov/lov_object.c | 8 drivers/staging/lustre/lustre/lov/lov_pool.c | 159 +- drivers/staging/lustre/lustre/lov/lovsub_object.c | 9 drivers/staging/lustre/lustre/obdclass/genops.c | 34 drivers/staging/lustre/lustre/obdclass/lu_object.c | 564 ++--- .../staging/lustre/lustre/obdclass/obd_config.c | 161 +- .../staging/lustre/lustre/obdecho/echo_client.c | 8 drivers/staging/lustre/lustre/osc/osc_internal.h | 5 drivers/staging/lustre/lustre/osc/osc_quota.c | 136 - drivers/staging/lustre/lustre/osc/osc_request.c | 12 drivers/staging/lustre/lustre/ptlrpc/connection.c | 164 +- 29 files changed, 870 insertions(+), 4208 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h delete mode 100644 drivers/staging/lustre/lnet/libcfs/hash.c -- Signature From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 01/20] staging: lustre: ptlrpc: convert conn_hash to rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368853.12394.3972511682718703007.stgit@noble> Linux has a resizeable hashtable implementation in lib, so we should use that instead of having one in libcfs. This patch converts the ptlrpc conn_hash to use rhashtable. In the process we gain lockless lookup. As connections are never deleted until the hash table is destroyed, there is no need to count the reference in the hash table. There is also no need to enable automatic_shrinking. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_net.h | 4 .../staging/lustre/lustre/include/obd_support.h | 3 drivers/staging/lustre/lustre/ptlrpc/connection.c | 164 +++++++------------- 3 files changed, 64 insertions(+), 107 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index d13db55b7242..35b43a77eb18 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -67,6 +67,8 @@ #include #include +#include + /* MD flags we _always_ use */ #define PTLRPC_MD_OPTIONS 0 @@ -286,7 +288,7 @@ struct ptlrpc_replay_async_args { */ struct ptlrpc_connection { /** linkage for connections hash table */ - struct hlist_node c_hash; + struct rhash_head c_hash; /** Our own lnet nid for this connection */ lnet_nid_t c_self; /** Remote side nid for this connection */ diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index eb2d6cb6b40b..aebcab191442 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -67,9 +67,6 @@ extern char obd_jobid_var[]; #define HASH_UUID_BKT_BITS 5 #define HASH_UUID_CUR_BITS 7 #define HASH_UUID_MAX_BITS 12 -#define HASH_CONN_BKT_BITS 5 -#define HASH_CONN_CUR_BITS 5 -#define HASH_CONN_MAX_BITS 15 /* Timeout definitions */ #define OBD_TIMEOUT_DEFAULT 100 /* Time to wait for all clients to reconnect during recovery (hard limit) */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/connection.c b/drivers/staging/lustre/lustre/ptlrpc/connection.c index dfdb4587d49d..fb35a89ca6c6 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/connection.c +++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c @@ -38,8 +38,41 @@ #include "ptlrpc_internal.h" -static struct cfs_hash *conn_hash; -static struct cfs_hash_ops conn_hash_ops; +static struct rhashtable conn_hash; + +/* + * struct lnet_process_id may contain unassigned bytes which might not + * be zero, so we cannot just hash and compare bytes. + */ + +static u32 lnet_process_id_hash(const void *data, u32 len, u32 seed) +{ + const struct lnet_process_id *lpi = data; + + seed = hash_32(seed ^ lpi->pid, 32); + seed ^= hash_64(lpi->nid, 32); + return seed; +} + +static int lnet_process_id_cmp(struct rhashtable_compare_arg *arg, + const void *obj) +{ + const struct lnet_process_id *lpi = arg->key; + const struct ptlrpc_connection *con = obj; + + if (lpi->nid == con->c_peer.nid && + lpi->pid == con->c_peer.pid) + return 0; + return -ESRCH; +} + +static const struct rhashtable_params conn_hash_params = { + .key_len = 1, /* actually variable-length */ + .key_offset = offsetof(struct ptlrpc_connection, c_peer), + .head_offset = offsetof(struct ptlrpc_connection, c_hash), + .hashfn = lnet_process_id_hash, + .obj_cmpfn = lnet_process_id_cmp, +}; struct ptlrpc_connection * ptlrpc_connection_get(struct lnet_process_id peer, lnet_nid_t self, @@ -47,9 +80,11 @@ ptlrpc_connection_get(struct lnet_process_id peer, lnet_nid_t self, { struct ptlrpc_connection *conn, *conn2; - conn = cfs_hash_lookup(conn_hash, &peer); - if (conn) + conn = rhashtable_lookup_fast(&conn_hash, &peer, conn_hash_params); + if (conn) { + ptlrpc_connection_addref(conn); goto out; + } conn = kzalloc(sizeof(*conn), GFP_NOFS); if (!conn) @@ -57,7 +92,6 @@ ptlrpc_connection_get(struct lnet_process_id peer, lnet_nid_t self, conn->c_peer = peer; conn->c_self = self; - INIT_HLIST_NODE(&conn->c_hash); atomic_set(&conn->c_refcount, 1); if (uuid) obd_str2uuid(&conn->c_remote_uuid, uuid->uuid); @@ -65,17 +99,18 @@ ptlrpc_connection_get(struct lnet_process_id peer, lnet_nid_t self, /* * Add the newly created conn to the hash, on key collision we * lost a racing addition and must destroy our newly allocated - * connection. The object which exists in the has will be - * returned and may be compared against out object. - */ - /* In the function below, .hs_keycmp resolves to - * conn_keycmp() + * connection. The object which exists in the hash will be + * returned, otherwise NULL is returned on success. */ - /* coverity[overrun-buffer-val] */ - conn2 = cfs_hash_findadd_unique(conn_hash, &peer, &conn->c_hash); - if (conn != conn2) { + conn2 = rhashtable_lookup_get_insert_fast(&conn_hash, &conn->c_hash, + conn_hash_params); + if (conn2 != NULL) { + /* insertion failed */ kfree(conn); + if (IS_ERR(conn2)) + return NULL; conn = conn2; + ptlrpc_connection_addref(conn); } out: CDEBUG(D_INFO, "conn=%p refcount %d to %s\n", @@ -91,7 +126,7 @@ int ptlrpc_connection_put(struct ptlrpc_connection *conn) if (!conn) return rc; - LASSERT(atomic_read(&conn->c_refcount) > 1); + LASSERT(atomic_read(&conn->c_refcount) > 0); /* * We do not remove connection from hashtable and @@ -109,7 +144,7 @@ int ptlrpc_connection_put(struct ptlrpc_connection *conn) * when ptlrpc_connection_fini()->lh_exit->conn_exit() * path is called. */ - if (atomic_dec_return(&conn->c_refcount) == 1) + if (atomic_dec_return(&conn->c_refcount) == 0) rc = 1; CDEBUG(D_INFO, "PUT conn=%p refcount %d to %s\n", @@ -130,88 +165,11 @@ ptlrpc_connection_addref(struct ptlrpc_connection *conn) return conn; } -int ptlrpc_connection_init(void) -{ - conn_hash = cfs_hash_create("CONN_HASH", - HASH_CONN_CUR_BITS, - HASH_CONN_MAX_BITS, - HASH_CONN_BKT_BITS, 0, - CFS_HASH_MIN_THETA, - CFS_HASH_MAX_THETA, - &conn_hash_ops, CFS_HASH_DEFAULT); - if (!conn_hash) - return -ENOMEM; - - return 0; -} - -void ptlrpc_connection_fini(void) -{ - cfs_hash_putref(conn_hash); -} - -/* - * Hash operations for net_peer<->connection - */ -static unsigned int -conn_hashfn(struct cfs_hash *hs, const void *key, unsigned int mask) -{ - return cfs_hash_djb2_hash(key, sizeof(struct lnet_process_id), mask); -} - -static int -conn_keycmp(const void *key, struct hlist_node *hnode) -{ - struct ptlrpc_connection *conn; - const struct lnet_process_id *conn_key; - - LASSERT(key); - conn_key = key; - conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); - - return conn_key->nid == conn->c_peer.nid && - conn_key->pid == conn->c_peer.pid; -} - -static void * -conn_key(struct hlist_node *hnode) -{ - struct ptlrpc_connection *conn; - - conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); - return &conn->c_peer; -} - -static void * -conn_object(struct hlist_node *hnode) -{ - return hlist_entry(hnode, struct ptlrpc_connection, c_hash); -} - static void -conn_get(struct cfs_hash *hs, struct hlist_node *hnode) +conn_exit(void *vconn, void *data) { - struct ptlrpc_connection *conn; + struct ptlrpc_connection *conn = vconn; - conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); - atomic_inc(&conn->c_refcount); -} - -static void -conn_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) -{ - struct ptlrpc_connection *conn; - - conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); - atomic_dec(&conn->c_refcount); -} - -static void -conn_exit(struct cfs_hash *hs, struct hlist_node *hnode) -{ - struct ptlrpc_connection *conn; - - conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); /* * Nothing should be left. Connection user put it and * connection also was deleted from table by this time @@ -223,12 +181,12 @@ conn_exit(struct cfs_hash *hs, struct hlist_node *hnode) kfree(conn); } -static struct cfs_hash_ops conn_hash_ops = { - .hs_hash = conn_hashfn, - .hs_keycmp = conn_keycmp, - .hs_key = conn_key, - .hs_object = conn_object, - .hs_get = conn_get, - .hs_put_locked = conn_put_locked, - .hs_exit = conn_exit, -}; +int ptlrpc_connection_init(void) +{ + return rhashtable_init(&conn_hash, &conn_hash_params); +} + +void ptlrpc_connection_fini(void) +{ + rhashtable_free_and_destroy(&conn_hash, conn_exit, NULL); +} From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 02/20] staging: lustre: convert lov_pool to use rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368857.12394.13530263723383915776.stgit@noble> The pools hashtable can be implemented using the rhashtable implementation in lib. This has the benefit that lookups are lock-free. We need to use kfree_rcu() to free a pool so that a lookup racing with a deletion will not access freed memory. rhashtable has no combined lookup-and-delete interface, but as the lookup is lockless and the chains are short, this brings little cost. Even if a lookup finds a pool, we must be prepared for the delete to fail to find it, as we might race with another thread doing a delete. We use atomic_inc_not_zero() after finding a pool in the hash table and if that fails, we must have raced with a deletion, so we treat the lookup as a failure. Use hashlen_string() rather than a hand-crafted hash function. Note that the pool_name, and the search key, are guaranteed to be nul terminated. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/obd.h | 4 - .../staging/lustre/lustre/include/obd_support.h | 3 drivers/staging/lustre/lustre/lov/lov_internal.h | 11 + drivers/staging/lustre/lustre/lov/lov_obd.c | 12 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 159 ++++++++------------ 5 files changed, 80 insertions(+), 109 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index f1233ca7d337..ad265db48b76 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -46,6 +46,8 @@ #include #include +#include + #define MAX_OBD_DEVICES 8192 struct osc_async_rc { @@ -383,7 +385,7 @@ struct lov_obd { __u32 lov_tgt_size; /* size of tgts array */ int lov_connects; int lov_pool_count; - struct cfs_hash *lov_pools_hash_body; /* used for key access */ + struct rhashtable lov_pools_hash_body; /* used for key access */ struct list_head lov_pool_list; /* used for sequential access */ struct dentry *lov_pool_debugfs_entry; enum lustre_sec_part lov_sp_me; diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index aebcab191442..730a6ee71565 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -61,9 +61,6 @@ extern atomic_long_t obd_dirty_transit_pages; extern char obd_jobid_var[]; /* Some hash init argument constants */ -#define HASH_POOLS_BKT_BITS 3 -#define HASH_POOLS_CUR_BITS 3 -#define HASH_POOLS_MAX_BITS 7 #define HASH_UUID_BKT_BITS 5 #define HASH_UUID_CUR_BITS 7 #define HASH_UUID_MAX_BITS 12 diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h index 27f60dd7ab9a..47042f27ca90 100644 --- a/drivers/staging/lustre/lustre/lov/lov_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_internal.h @@ -149,11 +149,16 @@ struct pool_desc { char pool_name[LOV_MAXPOOLNAME + 1]; struct ost_pool pool_obds; atomic_t pool_refcount; - struct hlist_node pool_hash; /* access by poolname */ - struct list_head pool_list; /* serial access */ + struct rhash_head pool_hash; /* access by poolname */ + union { + struct list_head pool_list; /* serial access */ + struct rcu_head rcu; /* delayed free */ + }; struct dentry *pool_debugfs_entry; /* file in debugfs */ struct obd_device *pool_lobd; /* owner */ }; +int lov_pool_hash_init(struct rhashtable *tbl); +void lov_pool_hash_destroy(struct rhashtable *tbl); struct lov_request { struct obd_info rq_oi; @@ -241,8 +246,6 @@ void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars); /* lov_cl.c */ extern struct lu_device_type lov_device_type; -/* pools */ -extern struct cfs_hash_ops pool_hash_operations; /* ost_pool methods */ int lov_ost_pool_init(struct ost_pool *op, unsigned int count); int lov_ost_pool_extend(struct ost_pool *op, unsigned int min_count); diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 355e87ecc62d..94da35e673f7 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -795,15 +795,11 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) init_rwsem(&lov->lov_notify_lock); - lov->lov_pools_hash_body = cfs_hash_create("POOLS", HASH_POOLS_CUR_BITS, - HASH_POOLS_MAX_BITS, - HASH_POOLS_BKT_BITS, 0, - CFS_HASH_MIN_THETA, - CFS_HASH_MAX_THETA, - &pool_hash_operations, - CFS_HASH_DEFAULT); INIT_LIST_HEAD(&lov->lov_pool_list); lov->lov_pool_count = 0; + rc = lov_pool_hash_init(&lov->lov_pools_hash_body); + if (rc) + goto out; rc = lov_ost_pool_init(&lov->lov_packed, 0); if (rc) goto out; @@ -839,7 +835,7 @@ static int lov_cleanup(struct obd_device *obd) /* coverity[overrun-buffer-val] */ lov_pool_del(obd, pool->pool_name); } - cfs_hash_putref(lov->lov_pools_hash_body); + lov_pool_hash_destroy(&lov->lov_pools_hash_body); lov_ost_pool_free(&lov->lov_packed); lprocfs_obd_cleanup(obd); diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c index ecd9329cd073..b673b4fd305b 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pool.c +++ b/drivers/staging/lustre/lustre/lov/lov_pool.c @@ -49,6 +49,28 @@ #define pool_tgt(_p, _i) \ _p->pool_lobd->u.lov.lov_tgts[_p->pool_obds.op_array[_i]] +static u32 pool_hashfh(const void *data, u32 len, u32 seed) +{ + const char *pool_name = data; + return hashlen_hash(hashlen_string((void*)(unsigned long)seed, pool_name)); +} + +static int pool_cmpfn(struct rhashtable_compare_arg *arg, const void *obj) +{ + const struct pool_desc *pool = obj; + const char *pool_name = arg->key; + return strcmp(pool_name, pool->pool_name); +} + +static const struct rhashtable_params pools_hash_params = { + .key_len = 1, /* actually variable */ + .key_offset = offsetof(struct pool_desc, pool_name), + .head_offset = offsetof(struct pool_desc, pool_hash), + .hashfn = pool_hashfh, + .obj_cmpfn = pool_cmpfn, + .automatic_shrinking = true, +}; + static void lov_pool_getref(struct pool_desc *pool) { CDEBUG(D_INFO, "pool %p\n", pool); @@ -59,96 +81,13 @@ void lov_pool_putref(struct pool_desc *pool) { CDEBUG(D_INFO, "pool %p\n", pool); if (atomic_dec_and_test(&pool->pool_refcount)) { - LASSERT(hlist_unhashed(&pool->pool_hash)); LASSERT(list_empty(&pool->pool_list)); LASSERT(!pool->pool_debugfs_entry); lov_ost_pool_free(&pool->pool_obds); - kfree(pool); - } -} - -static void lov_pool_putref_locked(struct pool_desc *pool) -{ - CDEBUG(D_INFO, "pool %p\n", pool); - LASSERT(atomic_read(&pool->pool_refcount) > 1); - - atomic_dec(&pool->pool_refcount); -} - -/* - * hash function using a Rotating Hash algorithm - * Knuth, D. The Art of Computer Programming, - * Volume 3: Sorting and Searching, - * Chapter 6.4. - * Addison Wesley, 1973 - */ -static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key, - unsigned int mask) -{ - int i; - __u32 result; - char *poolname; - - result = 0; - poolname = (char *)key; - for (i = 0; i < LOV_MAXPOOLNAME; i++) { - if (poolname[i] == '\0') - break; - result = (result << 4) ^ (result >> 28) ^ poolname[i]; + kfree_rcu(pool, rcu); } - return (result % mask); -} - -static void *pool_key(struct hlist_node *hnode) -{ - struct pool_desc *pool; - - pool = hlist_entry(hnode, struct pool_desc, pool_hash); - return pool->pool_name; -} - -static int pool_hashkey_keycmp(const void *key, struct hlist_node *compared_hnode) -{ - char *pool_name; - struct pool_desc *pool; - - pool_name = (char *)key; - pool = hlist_entry(compared_hnode, struct pool_desc, pool_hash); - return !strncmp(pool_name, pool->pool_name, LOV_MAXPOOLNAME); -} - -static void *pool_hashobject(struct hlist_node *hnode) -{ - return hlist_entry(hnode, struct pool_desc, pool_hash); -} - -static void pool_hashrefcount_get(struct cfs_hash *hs, struct hlist_node *hnode) -{ - struct pool_desc *pool; - - pool = hlist_entry(hnode, struct pool_desc, pool_hash); - lov_pool_getref(pool); -} - -static void pool_hashrefcount_put_locked(struct cfs_hash *hs, - struct hlist_node *hnode) -{ - struct pool_desc *pool; - - pool = hlist_entry(hnode, struct pool_desc, pool_hash); - lov_pool_putref_locked(pool); } -struct cfs_hash_ops pool_hash_operations = { - .hs_hash = pool_hashfn, - .hs_key = pool_key, - .hs_keycmp = pool_hashkey_keycmp, - .hs_object = pool_hashobject, - .hs_get = pool_hashrefcount_get, - .hs_put_locked = pool_hashrefcount_put_locked, - -}; - /* * pool debugfs seq_file methods */ @@ -396,6 +335,23 @@ int lov_ost_pool_free(struct ost_pool *op) return 0; } +static void +pools_hash_exit(void *vpool, void *data) +{ + struct pool_desc *pool = vpool; + lov_pool_putref(pool); +} + +int lov_pool_hash_init(struct rhashtable *tbl) +{ + return rhashtable_init(tbl, &pools_hash_params); +} + +void lov_pool_hash_destroy(struct rhashtable *tbl) +{ + rhashtable_free_and_destroy(tbl, pools_hash_exit, NULL); +} + int lov_pool_new(struct obd_device *obd, char *poolname) { struct lov_obd *lov; @@ -421,8 +377,6 @@ int lov_pool_new(struct obd_device *obd, char *poolname) if (rc) goto out_err; - INIT_HLIST_NODE(&new_pool->pool_hash); - /* get ref for debugfs file */ lov_pool_getref(new_pool); new_pool->pool_debugfs_entry = ldebugfs_add_simple( @@ -443,11 +397,16 @@ int lov_pool_new(struct obd_device *obd, char *poolname) lov->lov_pool_count++; spin_unlock(&obd->obd_dev_lock); - /* add to find only when it fully ready */ - rc = cfs_hash_add_unique(lov->lov_pools_hash_body, poolname, - &new_pool->pool_hash); + /* Add to hash table only when it is fully ready. */ + rc = rhashtable_lookup_insert_fast(&lov->lov_pools_hash_body, + &new_pool->pool_hash, pools_hash_params); if (rc) { - rc = -EEXIST; + if (rc != -EEXIST) + /* + * Hide -E2BIG and -EBUSY which + * are not helpful. + */ + rc = -ENOMEM; goto out_err; } @@ -476,7 +435,13 @@ int lov_pool_del(struct obd_device *obd, char *poolname) lov = &obd->u.lov; /* lookup and kill hash reference */ - pool = cfs_hash_del_key(lov->lov_pools_hash_body, poolname); + rcu_read_lock(); + pool = rhashtable_lookup(&lov->lov_pools_hash_body, poolname, pools_hash_params); + if (pool) + if (rhashtable_remove_fast(&lov->lov_pools_hash_body, + &pool->pool_hash, pools_hash_params) != 0) + pool = NULL; + rcu_read_unlock(); if (!pool) return -ENOENT; @@ -507,7 +472,11 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname) lov = &obd->u.lov; - pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname); + rcu_read_lock(); + pool = rhashtable_lookup(&lov->lov_pools_hash_body, poolname, pools_hash_params); + if (pool && !atomic_inc_not_zero(&pool->pool_refcount)) + pool = NULL; + rcu_read_unlock(); if (!pool) return -ENOENT; @@ -551,7 +520,11 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname) lov = &obd->u.lov; - pool = cfs_hash_lookup(lov->lov_pools_hash_body, poolname); + rcu_read_lock(); + pool = rhashtable_lookup(&lov->lov_pools_hash_body, poolname, pools_hash_params); + if (pool && !atomic_inc_not_zero(&pool->pool_refcount)) + pool = NULL; + rcu_read_unlock(); if (!pool) return -ENOENT; From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 03/20] staging: lustre: convert obd uuid hash to rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368861.12394.17231763587470085829.stgit@noble> The rhashtable data type is a perfect fit for the export uuid hash table, so use that instead of cfs_hash (which will eventually be removed). As rhashtable supports lookups and insertions in atomic context, there is no need to drop a spinlock while inserting a new entry, which simplifies code quite a bit. As there are no simple lookups on this hash table (only insertions which might fail and take a spinlock), there is no need to use rcu to free the exports. Signed-off-by: NeilBrown --- .../staging/lustre/lustre/include/lustre_export.h | 2 drivers/staging/lustre/lustre/include/obd.h | 5 - .../staging/lustre/lustre/include/obd_support.h | 3 drivers/staging/lustre/lustre/obdclass/genops.c | 34 +--- .../staging/lustre/lustre/obdclass/obd_config.c | 161 +++++++++----------- 5 files changed, 80 insertions(+), 125 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h index 19ce13bc8ee6..79ad5aae86b9 100644 --- a/drivers/staging/lustre/lustre/include/lustre_export.h +++ b/drivers/staging/lustre/lustre/include/lustre_export.h @@ -89,7 +89,7 @@ struct obd_export { struct list_head exp_obd_chain; /** work_struct for destruction of export */ struct work_struct exp_zombie_work; - struct hlist_node exp_uuid_hash; /** uuid-export hash*/ + struct rhash_head exp_uuid_hash; /** uuid-export hash*/ /** Obd device of this export */ struct obd_device *exp_obd; /** diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index ad265db48b76..1818fe6a7a2f 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -558,7 +558,7 @@ struct obd_device { */ unsigned long obd_recovery_expired:1; /* uuid-export hash body */ - struct cfs_hash *obd_uuid_hash; + struct rhashtable obd_uuid_hash; wait_queue_head_t obd_refcount_waitq; struct list_head obd_exports; struct list_head obd_unlinked_exports; @@ -622,6 +622,9 @@ struct obd_device { struct completion obd_kobj_unregister; }; +int obd_uuid_add(struct obd_device *obd, struct obd_export *export); +void obd_uuid_del(struct obd_device *obd, struct obd_export *export); + /* get/set_info keys */ #define KEY_ASYNC "async" #define KEY_CHANGELOG_CLEAR "changelog_clear" diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index 730a6ee71565..a4c7a2ee9738 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -61,9 +61,6 @@ extern atomic_long_t obd_dirty_transit_pages; extern char obd_jobid_var[]; /* Some hash init argument constants */ -#define HASH_UUID_BKT_BITS 5 -#define HASH_UUID_CUR_BITS 7 -#define HASH_UUID_MAX_BITS 12 /* Timeout definitions */ #define OBD_TIMEOUT_DEFAULT 100 /* Time to wait for all clients to reconnect during recovery (hard limit) */ diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index 86e22472719a..af233b868742 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c @@ -713,7 +713,6 @@ struct obd_export *class_new_export(struct obd_device *obd, struct obd_uuid *cluuid) { struct obd_export *export; - struct cfs_hash *hash = NULL; int rc = 0; export = kzalloc(sizeof(*export), GFP_NOFS); @@ -740,7 +739,6 @@ struct obd_export *class_new_export(struct obd_device *obd, class_handle_hash(&export->exp_handle, &export_handle_ops); spin_lock_init(&export->exp_lock); spin_lock_init(&export->exp_rpc_lock); - INIT_HLIST_NODE(&export->exp_uuid_hash); spin_lock_init(&export->exp_bl_list_lock); INIT_LIST_HEAD(&export->exp_bl_list); INIT_WORK(&export->exp_zombie_work, obd_zombie_exp_cull); @@ -757,44 +755,24 @@ struct obd_export *class_new_export(struct obd_device *obd, goto exit_unlock; } - hash = cfs_hash_getref(obd->obd_uuid_hash); - if (!hash) { - rc = -ENODEV; - goto exit_unlock; - } - spin_unlock(&obd->obd_dev_lock); - if (!obd_uuid_equals(cluuid, &obd->obd_uuid)) { - rc = cfs_hash_add_unique(hash, cluuid, &export->exp_uuid_hash); - if (rc != 0) { + rc = obd_uuid_add(obd, export); + if (rc) { LCONSOLE_WARN("%s: denying duplicate export for %s, %d\n", obd->obd_name, cluuid->uuid, rc); - rc = -EALREADY; - goto exit_err; + goto exit_unlock; } } - spin_lock(&obd->obd_dev_lock); - if (obd->obd_stopping) { - cfs_hash_del(hash, cluuid, &export->exp_uuid_hash); - rc = -ENODEV; - goto exit_unlock; - } - class_incref(obd, "export", export); list_add(&export->exp_obd_chain, &export->exp_obd->obd_exports); export->exp_obd->obd_num_exports++; spin_unlock(&obd->obd_dev_lock); - cfs_hash_putref(hash); return export; exit_unlock: spin_unlock(&obd->obd_dev_lock); -exit_err: - if (hash) - cfs_hash_putref(hash); class_handle_unhash(&export->exp_handle); - LASSERT(hlist_unhashed(&export->exp_uuid_hash)); obd_destroy_export(export); kfree(export); return ERR_PTR(rc); @@ -807,10 +785,8 @@ void class_unlink_export(struct obd_export *exp) spin_lock(&exp->exp_obd->obd_dev_lock); /* delete an uuid-export hashitem from hashtables */ - if (!hlist_unhashed(&exp->exp_uuid_hash)) - cfs_hash_del(exp->exp_obd->obd_uuid_hash, - &exp->exp_client_uuid, - &exp->exp_uuid_hash); + if (exp != exp->exp_obd->obd_self_export) + obd_uuid_del(exp->exp_obd, exp); list_move(&exp->exp_obd_chain, &exp->exp_obd->obd_unlinked_exports); exp->exp_obd->obd_num_exports--; diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index eab03766236f..ffc1814398a5 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -48,7 +48,69 @@ #include "llog_internal.h" -static struct cfs_hash_ops uuid_hash_ops; +/* + * uuid<->export lustre hash operations + */ +/* + * NOTE: It is impossible to find an export that is in failed + * state with this function + */ +static int +uuid_keycmp(struct rhashtable_compare_arg *arg, const void *obj) +{ + const struct obd_uuid *uuid = arg->key; + const struct obd_export *exp = obj; + + if (obd_uuid_equals(uuid, &exp->exp_client_uuid) && + !exp->exp_failed) + return 0; + return -ESRCH; +} + +static void +uuid_export_exit(void *vexport, void *data) +{ + struct obd_export *exp = vexport; + + class_export_put(exp); +} + +static const struct rhashtable_params uuid_hash_params = { + .key_len = sizeof(struct obd_uuid), + .key_offset = offsetof(struct obd_export, exp_client_uuid), + .head_offset = offsetof(struct obd_export, exp_uuid_hash), + .obj_cmpfn = uuid_keycmp, + .automatic_shrinking = true, +}; + +int obd_uuid_add(struct obd_device *obd, struct obd_export *export) +{ + int rc; + + rc = rhashtable_lookup_insert_fast(&obd->obd_uuid_hash, + &export->exp_uuid_hash, + uuid_hash_params); + if (rc == 0) + class_export_get(export); + else if (rc == -EEXIST) + rc = -EALREADY; + else + /* map obscure error codes to -ENOMEM */ + rc = -ENOMEM; + return rc; +} + +void obd_uuid_del(struct obd_device *obd, struct obd_export *export) +{ + int rc; + + rc = rhashtable_remove_fast(&obd->obd_uuid_hash, + &export->exp_uuid_hash, + uuid_hash_params); + + if (rc == 0) + class_export_put(export); +} /*********** string parsing utils *********/ @@ -347,26 +409,18 @@ static int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg) * other fns check that status, and we're not actually set up yet. */ obd->obd_starting = 1; - obd->obd_uuid_hash = NULL; spin_unlock(&obd->obd_dev_lock); /* create an uuid-export lustre hash */ - obd->obd_uuid_hash = cfs_hash_create("UUID_HASH", - HASH_UUID_CUR_BITS, - HASH_UUID_MAX_BITS, - HASH_UUID_BKT_BITS, 0, - CFS_HASH_MIN_THETA, - CFS_HASH_MAX_THETA, - &uuid_hash_ops, CFS_HASH_DEFAULT); - if (!obd->obd_uuid_hash) { - err = -ENOMEM; + err = rhashtable_init(&obd->obd_uuid_hash, &uuid_hash_params); + + if (err) goto err_hash; - } exp = class_new_export(obd, &obd->obd_uuid); if (IS_ERR(exp)) { err = PTR_ERR(exp); - goto err_hash; + goto err_new; } obd->obd_self_export = exp; @@ -392,11 +446,9 @@ static int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg) class_unlink_export(obd->obd_self_export); obd->obd_self_export = NULL; } +err_new: + rhashtable_destroy(&obd->obd_uuid_hash); err_hash: - if (obd->obd_uuid_hash) { - cfs_hash_putref(obd->obd_uuid_hash); - obd->obd_uuid_hash = NULL; - } obd->obd_starting = 0; CERROR("setup %s failed (%d)\n", obd->obd_name, err); return err; @@ -490,10 +542,7 @@ static int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg) obd->obd_name, err); /* destroy an uuid-export hash body */ - if (obd->obd_uuid_hash) { - cfs_hash_putref(obd->obd_uuid_hash); - obd->obd_uuid_hash = NULL; - } + rhashtable_free_and_destroy(&obd->obd_uuid_hash, uuid_export_exit, NULL); class_decref(obd, "setup", obd); obd->obd_set_up = 0; @@ -1487,73 +1536,3 @@ int class_manual_cleanup(struct obd_device *obd) return rc; } EXPORT_SYMBOL(class_manual_cleanup); - -/* - * uuid<->export lustre hash operations - */ - -static unsigned int -uuid_hash(struct cfs_hash *hs, const void *key, unsigned int mask) -{ - return cfs_hash_djb2_hash(((struct obd_uuid *)key)->uuid, - sizeof(((struct obd_uuid *)key)->uuid), mask); -} - -static void * -uuid_key(struct hlist_node *hnode) -{ - struct obd_export *exp; - - exp = hlist_entry(hnode, struct obd_export, exp_uuid_hash); - - return &exp->exp_client_uuid; -} - -/* - * NOTE: It is impossible to find an export that is in failed - * state with this function - */ -static int -uuid_keycmp(const void *key, struct hlist_node *hnode) -{ - struct obd_export *exp; - - LASSERT(key); - exp = hlist_entry(hnode, struct obd_export, exp_uuid_hash); - - return obd_uuid_equals(key, &exp->exp_client_uuid) && - !exp->exp_failed; -} - -static void * -uuid_export_object(struct hlist_node *hnode) -{ - return hlist_entry(hnode, struct obd_export, exp_uuid_hash); -} - -static void -uuid_export_get(struct cfs_hash *hs, struct hlist_node *hnode) -{ - struct obd_export *exp; - - exp = hlist_entry(hnode, struct obd_export, exp_uuid_hash); - class_export_get(exp); -} - -static void -uuid_export_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) -{ - struct obd_export *exp; - - exp = hlist_entry(hnode, struct obd_export, exp_uuid_hash); - class_export_put(exp); -} - -static struct cfs_hash_ops uuid_hash_ops = { - .hs_hash = uuid_hash, - .hs_key = uuid_key, - .hs_keycmp = uuid_keycmp, - .hs_object = uuid_export_object, - .hs_get = uuid_export_get, - .hs_put_locked = uuid_export_put_locked, -}; From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 04/20] staging: lustre: convert osc_quota hash to rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368865.12394.3783473894491587885.stgit@noble> As this is indexed by an integer, an extensible array or extensible bitmap would be better. If/when xarray lands, we should change to use that. For now, just a simple conversion to rhashtable. When removing an entry, we need to hold rcu_read_lock() across the lookup and remove in case we race with another thread performing a removal. This means we need to use call_rcu() to free the quota info so we need an rcu_head in there, which unfortunately doubles the size of the structure. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/obd.h | 2 drivers/staging/lustre/lustre/osc/osc_internal.h | 5 - drivers/staging/lustre/lustre/osc/osc_quota.c | 136 +++++++--------------- 3 files changed, 48 insertions(+), 95 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 1818fe6a7a2f..682902e744e2 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -333,7 +333,7 @@ struct client_obd { void *cl_writeback_work; void *cl_lru_work; /* hash tables for osc_quota_info */ - struct cfs_hash *cl_quota_hash[MAXQUOTAS]; + struct rhashtable cl_quota_hash[MAXQUOTAS]; }; #define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid) diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h index be8c7829b3de..fca020568c19 100644 --- a/drivers/staging/lustre/lustre/osc/osc_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h @@ -188,8 +188,9 @@ extern struct lu_kmem_descr osc_caches[]; extern struct kmem_cache *osc_quota_kmem; struct osc_quota_info { /** linkage for quota hash table */ - struct hlist_node oqi_hash; - u32 oqi_id; + struct rhash_head oqi_hash; + u32 oqi_id; + struct rcu_head rcu; }; int osc_quota_setup(struct obd_device *obd); diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c b/drivers/staging/lustre/lustre/osc/osc_quota.c index ce1731dc604f..723ec2fb18bf 100644 --- a/drivers/staging/lustre/lustre/osc/osc_quota.c +++ b/drivers/staging/lustre/lustre/osc/osc_quota.c @@ -27,6 +27,13 @@ #include #include "osc_internal.h" +static const struct rhashtable_params quota_hash_params = { + .key_len = sizeof(u32), + .key_offset = offsetof(struct osc_quota_info, oqi_id), + .head_offset = offsetof(struct osc_quota_info, oqi_hash), + .automatic_shrinking = true, +}; + static inline struct osc_quota_info *osc_oqi_alloc(u32 id) { struct osc_quota_info *oqi; @@ -45,9 +52,10 @@ int osc_quota_chkdq(struct client_obd *cli, const unsigned int qid[]) for (type = 0; type < MAXQUOTAS; type++) { struct osc_quota_info *oqi; - oqi = cfs_hash_lookup(cli->cl_quota_hash[type], &qid[type]); + oqi = rhashtable_lookup_fast(&cli->cl_quota_hash[type], &qid[type], + quota_hash_params); if (oqi) { - /* do not try to access oqi here, it could have been + /* Must not access oqi here, it could have been * freed by osc_quota_setdq() */ @@ -63,6 +71,14 @@ int osc_quota_chkdq(struct client_obd *cli, const unsigned int qid[]) return QUOTA_OK; } +static void osc_quota_free(struct rcu_head *head) +{ + struct osc_quota_info *oqi = container_of(head, struct osc_quota_info, rcu); + + kmem_cache_free(osc_quota_kmem, oqi); +} + + #define MD_QUOTA_FLAG(type) ((type == USRQUOTA) ? OBD_MD_FLUSRQUOTA \ : OBD_MD_FLGRPQUOTA) #define FL_QUOTA_FLAG(type) ((type == USRQUOTA) ? OBD_FL_NO_USRQUOTA \ @@ -84,11 +100,14 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], continue; /* lookup the ID in the per-type hash table */ - oqi = cfs_hash_lookup(cli->cl_quota_hash[type], &qid[type]); + rcu_read_lock(); + oqi = rhashtable_lookup_fast(&cli->cl_quota_hash[type], &qid[type], + quota_hash_params); if ((flags & FL_QUOTA_FLAG(type)) != 0) { /* This ID is getting close to its quota limit, let's * switch to sync I/O */ + rcu_read_unlock(); if (oqi) continue; @@ -98,12 +117,16 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], break; } - rc = cfs_hash_add_unique(cli->cl_quota_hash[type], - &qid[type], &oqi->oqi_hash); + rc = rhashtable_lookup_insert_fast(&cli->cl_quota_hash[type], + &oqi->oqi_hash, quota_hash_params); /* race with others? */ - if (rc == -EALREADY) { - rc = 0; + if (rc) { kmem_cache_free(osc_quota_kmem, oqi); + if (rc != -EEXIST) { + rc = -ENOMEM; + break; + } + rc = 0; } CDEBUG(D_QUOTA, "%s: setdq to insert for %s %d (%d)\n", @@ -114,14 +137,14 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], /* This ID is now off the hook, let's remove it from * the hash table */ - if (!oqi) + if (!oqi) { + rcu_read_unlock(); continue; - - oqi = cfs_hash_del_key(cli->cl_quota_hash[type], - &qid[type]); - if (oqi) - kmem_cache_free(osc_quota_kmem, oqi); - + } + if (rhashtable_remove_fast(&cli->cl_quota_hash[type], + &oqi->oqi_hash, quota_hash_params) == 0) + call_rcu(&oqi->rcu, osc_quota_free); + rcu_read_unlock(); CDEBUG(D_QUOTA, "%s: setdq to remove for %s %d (%p)\n", cli_name(cli), type == USRQUOTA ? "user" : "group", @@ -132,93 +155,21 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], return rc; } -/* - * Hash operations for uid/gid <-> osc_quota_info - */ -static unsigned int -oqi_hashfn(struct cfs_hash *hs, const void *key, unsigned int mask) -{ - return cfs_hash_u32_hash(*((__u32 *)key), mask); -} - -static int -oqi_keycmp(const void *key, struct hlist_node *hnode) -{ - struct osc_quota_info *oqi; - u32 uid; - - LASSERT(key); - uid = *((u32 *)key); - oqi = hlist_entry(hnode, struct osc_quota_info, oqi_hash); - - return uid == oqi->oqi_id; -} - -static void * -oqi_key(struct hlist_node *hnode) -{ - struct osc_quota_info *oqi; - - oqi = hlist_entry(hnode, struct osc_quota_info, oqi_hash); - return &oqi->oqi_id; -} - -static void * -oqi_object(struct hlist_node *hnode) -{ - return hlist_entry(hnode, struct osc_quota_info, oqi_hash); -} - -static void -oqi_get(struct cfs_hash *hs, struct hlist_node *hnode) -{ -} - -static void -oqi_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) -{ -} - static void -oqi_exit(struct cfs_hash *hs, struct hlist_node *hnode) +oqi_exit(void *vquota, void *data) { - struct osc_quota_info *oqi; - - oqi = hlist_entry(hnode, struct osc_quota_info, oqi_hash); + struct osc_quota_info *oqi = vquota; - kmem_cache_free(osc_quota_kmem, oqi); + osc_quota_free(&oqi->rcu); } -#define HASH_QUOTA_BKT_BITS 5 -#define HASH_QUOTA_CUR_BITS 5 -#define HASH_QUOTA_MAX_BITS 15 - -static struct cfs_hash_ops quota_hash_ops = { - .hs_hash = oqi_hashfn, - .hs_keycmp = oqi_keycmp, - .hs_key = oqi_key, - .hs_object = oqi_object, - .hs_get = oqi_get, - .hs_put_locked = oqi_put_locked, - .hs_exit = oqi_exit, -}; - int osc_quota_setup(struct obd_device *obd) { struct client_obd *cli = &obd->u.cli; int i, type; for (type = 0; type < MAXQUOTAS; type++) { - cli->cl_quota_hash[type] = cfs_hash_create("QUOTA_HASH", - HASH_QUOTA_CUR_BITS, - HASH_QUOTA_MAX_BITS, - HASH_QUOTA_BKT_BITS, - 0, - CFS_HASH_MIN_THETA, - CFS_HASH_MAX_THETA, - "a_hash_ops, - CFS_HASH_DEFAULT); - if (!cli->cl_quota_hash[type]) + if (rhashtable_init(&cli->cl_quota_hash[type], "a_hash_params) != 0) break; } @@ -226,7 +177,7 @@ int osc_quota_setup(struct obd_device *obd) return 0; for (i = 0; i < type; i++) - cfs_hash_putref(cli->cl_quota_hash[i]); + rhashtable_destroy(&cli->cl_quota_hash[i]); return -ENOMEM; } @@ -237,7 +188,8 @@ int osc_quota_cleanup(struct obd_device *obd) int type; for (type = 0; type < MAXQUOTAS; type++) - cfs_hash_putref(cli->cl_quota_hash[type]); + rhashtable_free_and_destroy(&cli->cl_quota_hash[type], + oqi_exit, NULL); return 0; } From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 05/20] staging: lustre: separate buckets from ldlm hash table In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368868.12394.16648347374686334362.stgit@noble> ldlm maintains a per-namespace hashtable of resources. With these hash tables it stores per-bucket 'struct adaptive_timeout' structures. Presumably having a single struct for the whole table results in too much contention while having one per resource results in very little adaption. A future patch will change ldlm to use rhashtable which does not support per-bucket data, so we need to manage the data separately. There is no need for the multiple adaptive_timeout to align with the hash chains, and trying to do this has resulted in a rather complex hash function. The purpose of ldlm_res_hop_fid_hash() appears to be to keep resources with the same fid in the same hash bucket, so they use the same adaptive timeout. However it fails at doing this because it puts the fid-specific bits in the wrong part of the hash. If that is not the purpose, then I can see no point to the complexitiy. This patch creates a completely separate array of adaptive timeouts (and other less interesting data) and uses a hash of the fid to index that, meaning that a simple hash can be used for the hash table. In the previous code, two namespace uses the same value for nsd_all_bits and nsd_bkt_bits. This results in zero bits being used to choose a bucket - so there is only one bucket. This looks odd and would confuse hash_32(), so I've adjusted the numbers so there is always at least 1 bit (2 buckets). Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 + drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 53 ++++++++------------ 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index d668d86423a4..395d50160dcc 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -364,6 +364,8 @@ struct ldlm_namespace { /** Resource hash table for namespace. */ struct cfs_hash *ns_rs_hash; + struct ldlm_ns_bucket *ns_rs_buckets; + unsigned int ns_bucket_bits; /** serialize */ spinlock_t ns_lock; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 6c615b6e9bdc..927544f01adc 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -476,10 +476,8 @@ static unsigned int ldlm_res_hop_hash(struct cfs_hash *hs, return val & mask; } -static unsigned int ldlm_res_hop_fid_hash(struct cfs_hash *hs, - const void *key, unsigned int mask) +static unsigned int ldlm_res_hop_fid_hash(const struct ldlm_res_id *id, unsigned int bits) { - const struct ldlm_res_id *id = key; struct lu_fid fid; __u32 hash; __u32 val; @@ -492,18 +490,11 @@ static unsigned int ldlm_res_hop_fid_hash(struct cfs_hash *hs, hash += (hash >> 4) + (hash << 12); /* mixing oid and seq */ if (id->name[LUSTRE_RES_ID_HSH_OFF] != 0) { val = id->name[LUSTRE_RES_ID_HSH_OFF]; - hash += (val >> 5) + (val << 11); } else { val = fid_oid(&fid); } - hash = hash_long(hash, hs->hs_bkt_bits); - /* give me another random factor */ - hash -= hash_long((unsigned long)hs, val % 11 + 3); - - hash <<= hs->hs_cur_bits - hs->hs_bkt_bits; - hash |= ldlm_res_hop_hash(hs, key, CFS_HASH_NBKT(hs) - 1); - - return hash & mask; + hash += (val >> 5) + (val << 11); + return hash_32(hash, bits); } static void *ldlm_res_hop_key(struct hlist_node *hnode) @@ -555,16 +546,6 @@ static struct cfs_hash_ops ldlm_ns_hash_ops = { .hs_put = ldlm_res_hop_put }; -static struct cfs_hash_ops ldlm_ns_fid_hash_ops = { - .hs_hash = ldlm_res_hop_fid_hash, - .hs_key = ldlm_res_hop_key, - .hs_keycmp = ldlm_res_hop_keycmp, - .hs_keycpy = NULL, - .hs_object = ldlm_res_hop_object, - .hs_get = ldlm_res_hop_get_locked, - .hs_put = ldlm_res_hop_put -}; - struct ldlm_ns_hash_def { enum ldlm_ns_type nsd_type; /** hash bucket bits */ @@ -580,13 +561,13 @@ static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = { .nsd_type = LDLM_NS_TYPE_MDC, .nsd_bkt_bits = 11, .nsd_all_bits = 16, - .nsd_hops = &ldlm_ns_fid_hash_ops, + .nsd_hops = &ldlm_ns_hash_ops, }, { .nsd_type = LDLM_NS_TYPE_MDT, .nsd_bkt_bits = 14, .nsd_all_bits = 21, - .nsd_hops = &ldlm_ns_fid_hash_ops, + .nsd_hops = &ldlm_ns_hash_ops, }, { .nsd_type = LDLM_NS_TYPE_OSC, @@ -602,13 +583,13 @@ static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = { }, { .nsd_type = LDLM_NS_TYPE_MGC, - .nsd_bkt_bits = 4, + .nsd_bkt_bits = 3, .nsd_all_bits = 4, .nsd_hops = &ldlm_ns_hash_ops, }, { .nsd_type = LDLM_NS_TYPE_MGT, - .nsd_bkt_bits = 4, + .nsd_bkt_bits = 3, .nsd_all_bits = 4, .nsd_hops = &ldlm_ns_hash_ops, }, @@ -637,9 +618,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, enum ldlm_ns_type ns_type) { struct ldlm_namespace *ns = NULL; - struct ldlm_ns_bucket *nsb; struct ldlm_ns_hash_def *nsd; - struct cfs_hash_bd bd; int idx; int rc; @@ -668,7 +647,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, ns->ns_rs_hash = cfs_hash_create(name, nsd->nsd_all_bits, nsd->nsd_all_bits, - nsd->nsd_bkt_bits, sizeof(*nsb), + nsd->nsd_bkt_bits, 0, CFS_HASH_MIN_THETA, CFS_HASH_MAX_THETA, nsd->nsd_hops, @@ -678,9 +657,15 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, CFS_HASH_NO_ITEMREF); if (!ns->ns_rs_hash) goto out_ns; + ns->ns_bucket_bits = nsd->nsd_all_bits - nsd->nsd_bkt_bits; + ns->ns_rs_buckets = kvmalloc_array(1 << ns->ns_bucket_bits, + sizeof(ns->ns_rs_buckets[0]), + GFP_KERNEL); + if (!ns->ns_rs_buckets) + goto out_hash; - cfs_hash_for_each_bucket(ns->ns_rs_hash, &bd, idx) { - nsb = cfs_hash_bd_extra_get(ns->ns_rs_hash, &bd); + for (idx = 0; idx < (1 << ns->ns_bucket_bits); idx++) { + struct ldlm_ns_bucket *nsb = &ns->ns_rs_buckets[idx]; at_init(&nsb->nsb_at_estimate, ldlm_enqueue_min, 0); nsb->nsb_namespace = ns; } @@ -730,6 +715,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, ldlm_namespace_sysfs_unregister(ns); ldlm_namespace_cleanup(ns, 0); out_hash: + kvfree(ns->ns_rs_buckets); cfs_hash_putref(ns->ns_rs_hash); out_ns: kfree(ns); @@ -993,6 +979,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns) ldlm_namespace_debugfs_unregister(ns); ldlm_namespace_sysfs_unregister(ns); cfs_hash_putref(ns->ns_rs_hash); + kvfree(ns->ns_rs_buckets); /* Namespace \a ns should be not on list at this time, otherwise * this will cause issues related to using freed \a ns in poold * thread. @@ -1098,6 +1085,7 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, __u64 version; int ns_refcount = 0; int rc; + int hash; LASSERT(!parent); LASSERT(ns->ns_rs_hash); @@ -1122,7 +1110,8 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, if (!res) return ERR_PTR(-ENOMEM); - res->lr_ns_bucket = cfs_hash_bd_extra_get(ns->ns_rs_hash, &bd); + hash = ldlm_res_hop_fid_hash(name, ns->ns_bucket_bits); + res->lr_ns_bucket = &ns->ns_rs_buckets[hash]; res->lr_name = *name; res->lr_type = type; From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 06/20] staging: lustre: ldlm: add a counter to the per-namespace data In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368872.12394.16831797606945626384.stgit@noble> When we change the resource hash to rhashtable we won't have a per-bucket counter. We could use the nelems global counter, but ldlm_resource goes to some trouble to avoid having any table-wide atomics, and hopefully rhashtable will grow the ability to disable the global counter in the near future. Having a counter we control makes it easier to manage the back-reference to the namespace when there is anything in the hash table. So add a counter to the ldlm_ns_bucket. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 ++ drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 395d50160dcc..ab90abe1c2d8 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -309,6 +309,8 @@ struct ldlm_ns_bucket { * fact the network or overall system load is at fault */ struct adaptive_timeout nsb_at_estimate; + /* counter of entries in this bucket */ + atomic_t nsb_count; }; enum { diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 927544f01adc..669556420bdf 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -181,12 +181,11 @@ static ssize_t resource_count_show(struct kobject *kobj, struct attribute *attr, struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, ns_kobj); __u64 res = 0; - struct cfs_hash_bd bd; int i; /* result is not strictly consistent */ - cfs_hash_for_each_bucket(ns->ns_rs_hash, &bd, i) - res += cfs_hash_bd_count_get(&bd); + for (i = 0; i < (1 << ns->ns_bucket_bits); i++) + res += atomic_read(&ns->ns_rs_buckets[i].nsb_count); return sprintf(buf, "%lld\n", res); } LUSTRE_RO_ATTR(resource_count); @@ -668,6 +667,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, struct ldlm_ns_bucket *nsb = &ns->ns_rs_buckets[idx]; at_init(&nsb->nsb_at_estimate, ldlm_enqueue_min, 0); nsb->nsb_namespace = ns; + atomic_set(&nsb->nsb_count, 0); } ns->ns_obd = obd; @@ -1144,7 +1144,7 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, } /* We won! Let's add the resource. */ cfs_hash_bd_add_locked(ns->ns_rs_hash, &bd, &res->lr_hash); - if (cfs_hash_bd_count_get(&bd) == 1) + if (atomic_inc_return(&res->lr_ns_bucket->nsb_count) == 1) ns_refcount = ldlm_namespace_get_return(ns); cfs_hash_bd_unlock(ns->ns_rs_hash, &bd, 1); @@ -1202,7 +1202,7 @@ static void __ldlm_resource_putref_final(struct cfs_hash_bd *bd, cfs_hash_bd_unlock(ns->ns_rs_hash, bd, 1); if (ns->ns_lvbo && ns->ns_lvbo->lvbo_free) ns->ns_lvbo->lvbo_free(res); - if (cfs_hash_bd_count_get(bd) == 0) + if (atomic_dec_and_test(&nsb->nsb_count)) ldlm_namespace_put(ns); kmem_cache_free(ldlm_resource_slab, res); } From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 07/20] staging: lustre: ldlm: store name directly in namespace. In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368875.12394.18428069846372860341.stgit@noble> Rather than storing the name of a namespace in the hash table, store it directly in the namespace. This will allow the hashtable to be changed to use rhashtable. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 5 ++++- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index ab90abe1c2d8..500dda854564 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -364,6 +364,9 @@ struct ldlm_namespace { /** Flag indicating if namespace is on client instead of server */ enum ldlm_side ns_client; + /** name of this namespace */ + char *ns_name; + /** Resource hash table for namespace. */ struct cfs_hash *ns_rs_hash; struct ldlm_ns_bucket *ns_rs_buckets; @@ -882,7 +885,7 @@ static inline bool ldlm_has_layout(struct ldlm_lock *lock) static inline char * ldlm_ns_name(struct ldlm_namespace *ns) { - return ns->ns_rs_hash->hs_name; + return ns->ns_name; } static inline struct ldlm_namespace * diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 669556420bdf..a14cc12303ab 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -673,6 +673,9 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, ns->ns_obd = obd; ns->ns_appetite = apt; ns->ns_client = client; + ns->ns_name = kstrdup(name, GFP_KERNEL); + if (!ns->ns_name) + goto out_hash; INIT_LIST_HEAD(&ns->ns_list_chain); INIT_LIST_HEAD(&ns->ns_unused_list); @@ -715,6 +718,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, ldlm_namespace_sysfs_unregister(ns); ldlm_namespace_cleanup(ns, 0); out_hash: + kfree(ns->ns_name); kvfree(ns->ns_rs_buckets); cfs_hash_putref(ns->ns_rs_hash); out_ns: @@ -980,6 +984,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns) ldlm_namespace_sysfs_unregister(ns); cfs_hash_putref(ns->ns_rs_hash); kvfree(ns->ns_rs_buckets); + kfree(ns->ns_name); /* Namespace \a ns should be not on list at this time, otherwise * this will cause issues related to using freed \a ns in poold * thread. From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 08/20] staging: lustre: simplify ldlm_ns_hash_defs[] In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368879.12394.7087606958943793717.stgit@noble> As the ldlm_ns_types are dense, we can use the type as the index to the array, rather than searching through the array for a match. We can also discard nsd_hops as all hash tables now use the same hops. This makes the table smaller and the code simpler. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 62 ++++++-------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index a14cc12303ab..4288a81fd62b 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -545,55 +545,35 @@ static struct cfs_hash_ops ldlm_ns_hash_ops = { .hs_put = ldlm_res_hop_put }; -struct ldlm_ns_hash_def { - enum ldlm_ns_type nsd_type; +static struct { /** hash bucket bits */ unsigned int nsd_bkt_bits; /** hash bits */ unsigned int nsd_all_bits; - /** hash operations */ - struct cfs_hash_ops *nsd_hops; -}; - -static struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = { - { - .nsd_type = LDLM_NS_TYPE_MDC, +} ldlm_ns_hash_defs[] = { + [LDLM_NS_TYPE_MDC] = { .nsd_bkt_bits = 11, .nsd_all_bits = 16, - .nsd_hops = &ldlm_ns_hash_ops, }, - { - .nsd_type = LDLM_NS_TYPE_MDT, + [LDLM_NS_TYPE_MDT] = { .nsd_bkt_bits = 14, .nsd_all_bits = 21, - .nsd_hops = &ldlm_ns_hash_ops, }, - { - .nsd_type = LDLM_NS_TYPE_OSC, + [LDLM_NS_TYPE_OSC] = { .nsd_bkt_bits = 8, .nsd_all_bits = 12, - .nsd_hops = &ldlm_ns_hash_ops, }, - { - .nsd_type = LDLM_NS_TYPE_OST, + [LDLM_NS_TYPE_OST] = { .nsd_bkt_bits = 11, .nsd_all_bits = 17, - .nsd_hops = &ldlm_ns_hash_ops, }, - { - .nsd_type = LDLM_NS_TYPE_MGC, + [LDLM_NS_TYPE_MGC] = { .nsd_bkt_bits = 3, .nsd_all_bits = 4, - .nsd_hops = &ldlm_ns_hash_ops, }, - { - .nsd_type = LDLM_NS_TYPE_MGT, + [LDLM_NS_TYPE_MGT] = { .nsd_bkt_bits = 3, .nsd_all_bits = 4, - .nsd_hops = &ldlm_ns_hash_ops, - }, - { - .nsd_type = LDLM_NS_TYPE_UNKNOWN, }, }; @@ -617,7 +597,6 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, enum ldlm_ns_type ns_type) { struct ldlm_namespace *ns = NULL; - struct ldlm_ns_hash_def *nsd; int idx; int rc; @@ -629,15 +608,10 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, return NULL; } - for (idx = 0;; idx++) { - nsd = &ldlm_ns_hash_defs[idx]; - if (nsd->nsd_type == LDLM_NS_TYPE_UNKNOWN) { - CERROR("Unknown type %d for ns %s\n", ns_type, name); - goto out_ref; - } - - if (nsd->nsd_type == ns_type) - break; + if (ns_type >= ARRAY_SIZE(ldlm_ns_hash_defs) || + ldlm_ns_hash_defs[ns_type].nsd_bkt_bits == 0) { + CERROR("Unknown type %d for ns %s\n", ns_type, name); + goto out_ref; } ns = kzalloc(sizeof(*ns), GFP_NOFS); @@ -645,18 +619,22 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, goto out_ref; ns->ns_rs_hash = cfs_hash_create(name, - nsd->nsd_all_bits, nsd->nsd_all_bits, - nsd->nsd_bkt_bits, 0, + ldlm_ns_hash_defs[ns_type].nsd_all_bits, + ldlm_ns_hash_defs[ns_type].nsd_all_bits, + ldlm_ns_hash_defs[ns_type].nsd_bkt_bits, + 0, CFS_HASH_MIN_THETA, CFS_HASH_MAX_THETA, - nsd->nsd_hops, + &ldlm_ns_hash_ops, CFS_HASH_DEPTH | CFS_HASH_BIGNAME | CFS_HASH_SPIN_BKTLOCK | CFS_HASH_NO_ITEMREF); if (!ns->ns_rs_hash) goto out_ns; - ns->ns_bucket_bits = nsd->nsd_all_bits - nsd->nsd_bkt_bits; + ns->ns_bucket_bits = ldlm_ns_hash_defs[ns_type].nsd_all_bits - + ldlm_ns_hash_defs[ns_type].nsd_bkt_bits; + ns->ns_rs_buckets = kvmalloc_array(1 << ns->ns_bucket_bits, sizeof(ns->ns_rs_buckets[0]), GFP_KERNEL); From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 09/20] staging: lustre: convert ldlm_resource hash to rhashtable. In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368883.12394.3134707122101129408.stgit@noble> Using an rhashtable allows lockless lookup at the cost of rcu freeing of entries. When we find an entry, we need to atomically check the reference hasn't dropped to zero. When adding an entry, we might find an existing entry which is in the process of being removed - with a zero refcount. In that case we loop around and repeat the lookup. To ensure this doesn't spin, the 'cmp' function will fail any comparison with a resource which has a zero refcount. Now that we are using resizing hash tables, we don't need to preconfig suitable sizes for each namespace. We can just use the default and let it grow or shrink as needed. We keep the pre-configured sizes for the bucket array. Previously the sizeof the bucket array was the difference between nsd_all_bits and nsd_bkt_bits. As we don't need nsd_all_bits any more, nsd_bkt_bits is changed to the number of bits used to choose a bucket. Walking an rhashtable requires that we manage refcounts ourself, so a new function, ldlm_resource_for_each() is added to do that. Note that with this patch we now update a per-table counter on every insert/remove, which might cause more contention between CPUs on a busy system. Hopefully rhashtable will be enhanced in the new future to support a per-CPU counter for nelems. ldlm_namespace_cleanup() will sometimes iterate over the hash table and remove everything. If we enable automatic shrinking, the table will be resized during this process. There is currently a bug in rhashtable_walk_start() which means that when that happens, we can miss entires so not everything gets deleted. A fix for the bug has been accepted but has not yet landed upstream. Rather than wait, automatic_shrinking has been disabled for now. Once the bug fix lands we can enable automatic_shrinking. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 10 + drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 31 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 268 +++++++++----------- drivers/staging/lustre/lustre/osc/osc_request.c | 12 - 4 files changed, 138 insertions(+), 183 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 500dda854564..b60170a11d26 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -368,7 +368,7 @@ struct ldlm_namespace { char *ns_name; /** Resource hash table for namespace. */ - struct cfs_hash *ns_rs_hash; + struct rhashtable ns_rs_hash; struct ldlm_ns_bucket *ns_rs_buckets; unsigned int ns_bucket_bits; @@ -828,9 +828,8 @@ struct ldlm_resource { /** * List item for list in namespace hash. - * protected by ns_lock */ - struct hlist_node lr_hash; + struct rhash_head lr_hash; /** Spinlock to protect locks under this resource. */ spinlock_t lr_lock; @@ -874,8 +873,13 @@ struct ldlm_resource { struct lu_ref lr_reference; struct inode *lr_lvb_inode; + struct rcu_head lr_rcu; }; +void ldlm_resource_for_each(struct ldlm_namespace *ns, + int cb(struct ldlm_resource *res, void *data), + void *data); + static inline bool ldlm_has_layout(struct ldlm_lock *lock) { return lock->l_resource->lr_type == LDLM_IBITS && diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index f573de9cf45d..1daeaf76ef89 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -1680,11 +1680,8 @@ struct ldlm_cli_cancel_arg { void *lc_opaque; }; -static int ldlm_cli_hash_cancel_unused(struct cfs_hash *hs, - struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *arg) +static int ldlm_cli_hash_cancel_unused(struct ldlm_resource *res, void *arg) { - struct ldlm_resource *res = cfs_hash_object(hs, hnode); struct ldlm_cli_cancel_arg *lc = arg; ldlm_cli_cancel_unused_resource(ldlm_res_to_ns(res), &res->lr_name, @@ -1718,8 +1715,7 @@ int ldlm_cli_cancel_unused(struct ldlm_namespace *ns, LCK_MINMODE, flags, opaque); } else { - cfs_hash_for_each_nolock(ns->ns_rs_hash, - ldlm_cli_hash_cancel_unused, &arg, 0); + ldlm_resource_for_each(ns, ldlm_cli_hash_cancel_unused, &arg); return ELDLM_OK; } } @@ -1768,27 +1764,21 @@ static int ldlm_iter_helper(struct ldlm_lock *lock, void *closure) return helper->iter(lock, helper->closure); } -static int ldlm_res_iter_helper(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *arg) - +static int ldlm_res_iter_helper(struct ldlm_resource *res, void *arg) { - struct ldlm_resource *res = cfs_hash_object(hs, hnode); - return ldlm_resource_foreach(res, ldlm_iter_helper, arg) == LDLM_ITER_STOP; } static void ldlm_namespace_foreach(struct ldlm_namespace *ns, ldlm_iterator_t iter, void *closure) - { struct iter_helper_data helper = { .iter = iter, .closure = closure, }; - cfs_hash_for_each_nolock(ns->ns_rs_hash, - ldlm_res_iter_helper, &helper, 0); + ldlm_resource_for_each(ns, ldlm_res_iter_helper, &helper); } /* non-blocking function to manipulate a lock whose cb_data is being put away. @@ -1823,11 +1813,14 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure) { struct list_head *list = closure; - /* we use l_pending_chain here, because it's unused on clients. */ - LASSERTF(list_empty(&lock->l_pending_chain), - "lock %p next %p prev %p\n", - lock, &lock->l_pending_chain.next, - &lock->l_pending_chain.prev); + /* + * We use l_pending_chain here, because it's unused on clients. + * As rhashtable_walk_next() can repeat elements when a resize event + * happens, we skip locks that have already been added to the chain + */ + if (!list_empty(&lock->l_pending_chain)) + return LDLM_ITER_CONTINUE; + /* bug 9573: don't replay locks left after eviction, or * bug 17614: locks being actively cancelled. Get a reference * on a lock so that it does not disappear under us (e.g. due to cancel) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 4288a81fd62b..b30ad212e967 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -62,6 +62,7 @@ static LIST_HEAD(ldlm_cli_inactive_namespace_list); static struct dentry *ldlm_debugfs_dir; static struct dentry *ldlm_ns_debugfs_dir; struct dentry *ldlm_svc_debugfs_dir; +static void __ldlm_resource_putref_final(struct ldlm_resource *res); /* during debug dump certain amount of granted locks for one resource to avoid * DDOS. @@ -453,28 +454,6 @@ static int ldlm_namespace_debugfs_register(struct ldlm_namespace *ns) #undef MAX_STRING_SIZE -static struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res) -{ - LASSERT(res); - LASSERT(res != LP_POISON); - atomic_inc(&res->lr_refcount); - CDEBUG(D_INFO, "getref res: %p count: %d\n", res, - atomic_read(&res->lr_refcount)); - return res; -} - -static unsigned int ldlm_res_hop_hash(struct cfs_hash *hs, - const void *key, unsigned int mask) -{ - const struct ldlm_res_id *id = key; - unsigned int val = 0; - unsigned int i; - - for (i = 0; i < RES_NAME_SIZE; i++) - val += id->name[i]; - return val & mask; -} - static unsigned int ldlm_res_hop_fid_hash(const struct ldlm_res_id *id, unsigned int bits) { struct lu_fid fid; @@ -496,84 +475,52 @@ static unsigned int ldlm_res_hop_fid_hash(const struct ldlm_res_id *id, unsigned return hash_32(hash, bits); } -static void *ldlm_res_hop_key(struct hlist_node *hnode) -{ - struct ldlm_resource *res; - - res = hlist_entry(hnode, struct ldlm_resource, lr_hash); - return &res->lr_name; -} - -static int ldlm_res_hop_keycmp(const void *key, struct hlist_node *hnode) -{ - struct ldlm_resource *res; - - res = hlist_entry(hnode, struct ldlm_resource, lr_hash); - return ldlm_res_eq((const struct ldlm_res_id *)key, - (const struct ldlm_res_id *)&res->lr_name); -} - -static void *ldlm_res_hop_object(struct hlist_node *hnode) -{ - return hlist_entry(hnode, struct ldlm_resource, lr_hash); -} - -static void ldlm_res_hop_get_locked(struct cfs_hash *hs, - struct hlist_node *hnode) -{ - struct ldlm_resource *res; - - res = hlist_entry(hnode, struct ldlm_resource, lr_hash); - ldlm_resource_getref(res); -} - -static void ldlm_res_hop_put(struct cfs_hash *hs, struct hlist_node *hnode) +static int rs_cmp(struct rhashtable_compare_arg *arg, const void *obj) { - struct ldlm_resource *res; + /* + * Don't allow entries with lr_refcount==0 to be found. + * rhashtable_remove doesn't use this function, so they + * can still be deleted. + */ + const struct ldlm_res_id *name = arg->key; + const struct ldlm_resource *res = obj; - res = hlist_entry(hnode, struct ldlm_resource, lr_hash); - ldlm_resource_putref(res); + if (!ldlm_res_eq(name, &res->lr_name)) + return -ESRCH; + return atomic_read(&res->lr_refcount) > 0 ? 0 : -EBUSY; } -static struct cfs_hash_ops ldlm_ns_hash_ops = { - .hs_hash = ldlm_res_hop_hash, - .hs_key = ldlm_res_hop_key, - .hs_keycmp = ldlm_res_hop_keycmp, - .hs_keycpy = NULL, - .hs_object = ldlm_res_hop_object, - .hs_get = ldlm_res_hop_get_locked, - .hs_put = ldlm_res_hop_put +static const struct rhashtable_params ns_rs_hash_params = { + .key_len = sizeof(struct ldlm_res_id), + .key_offset = offsetof(struct ldlm_resource, lr_name), + .head_offset = offsetof(struct ldlm_resource, lr_hash), + .obj_cmpfn = rs_cmp, +/* automatic_shrinking cannot be enabled until a bug + * in rhashtable_walk_start() is fixed + .automatic_shrinking = true, + */ }; static struct { - /** hash bucket bits */ unsigned int nsd_bkt_bits; - /** hash bits */ - unsigned int nsd_all_bits; } ldlm_ns_hash_defs[] = { [LDLM_NS_TYPE_MDC] = { - .nsd_bkt_bits = 11, - .nsd_all_bits = 16, + .nsd_bkt_bits = 5, }, [LDLM_NS_TYPE_MDT] = { - .nsd_bkt_bits = 14, - .nsd_all_bits = 21, + .nsd_bkt_bits = 7, }, [LDLM_NS_TYPE_OSC] = { - .nsd_bkt_bits = 8, - .nsd_all_bits = 12, + .nsd_bkt_bits = 4, }, [LDLM_NS_TYPE_OST] = { - .nsd_bkt_bits = 11, - .nsd_all_bits = 17, + .nsd_bkt_bits = 6, }, [LDLM_NS_TYPE_MGC] = { - .nsd_bkt_bits = 3, - .nsd_all_bits = 4, + .nsd_bkt_bits = 1, }, [LDLM_NS_TYPE_MGT] = { - .nsd_bkt_bits = 3, - .nsd_all_bits = 4, + .nsd_bkt_bits = 1, }, }; @@ -618,23 +565,11 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, if (!ns) goto out_ref; - ns->ns_rs_hash = cfs_hash_create(name, - ldlm_ns_hash_defs[ns_type].nsd_all_bits, - ldlm_ns_hash_defs[ns_type].nsd_all_bits, - ldlm_ns_hash_defs[ns_type].nsd_bkt_bits, - 0, - CFS_HASH_MIN_THETA, - CFS_HASH_MAX_THETA, - &ldlm_ns_hash_ops, - CFS_HASH_DEPTH | - CFS_HASH_BIGNAME | - CFS_HASH_SPIN_BKTLOCK | - CFS_HASH_NO_ITEMREF); - if (!ns->ns_rs_hash) - goto out_ns; - ns->ns_bucket_bits = ldlm_ns_hash_defs[ns_type].nsd_all_bits - - ldlm_ns_hash_defs[ns_type].nsd_bkt_bits; + rc = rhashtable_init(&ns->ns_rs_hash, &ns_rs_hash_params); + if (rc) + goto out_ns; + ns->ns_bucket_bits = ldlm_ns_hash_defs[ns_type].nsd_bkt_bits; ns->ns_rs_buckets = kvmalloc_array(1 << ns->ns_bucket_bits, sizeof(ns->ns_rs_buckets[0]), GFP_KERNEL); @@ -698,7 +633,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, out_hash: kfree(ns->ns_name); kvfree(ns->ns_rs_buckets); - cfs_hash_putref(ns->ns_rs_hash); + rhashtable_destroy(&ns->ns_rs_hash); out_ns: kfree(ns); out_ref: @@ -786,23 +721,18 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q, } while (1); } -static int ldlm_resource_clean(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *arg) +static int ldlm_resource_clean(struct ldlm_resource *res, void *arg) { - struct ldlm_resource *res = cfs_hash_object(hs, hnode); - __u64 flags = *(__u64 *)arg; + __u64 *flags = arg; - cleanup_resource(res, &res->lr_granted, flags); - cleanup_resource(res, &res->lr_waiting, flags); + cleanup_resource(res, &res->lr_granted, *flags); + cleanup_resource(res, &res->lr_waiting, *flags); return 0; } -static int ldlm_resource_complain(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *arg) +static int ldlm_resource_complain(struct ldlm_resource *res, void *arg) { - struct ldlm_resource *res = cfs_hash_object(hs, hnode); - lock_res(res); CERROR("%s: namespace resource " DLDLMRES " (%p) refcount nonzero (%d) after lock cleanup; forcing cleanup.\n", @@ -814,6 +744,39 @@ static int ldlm_resource_complain(struct cfs_hash *hs, struct cfs_hash_bd *bd, return 0; } +void ldlm_resource_for_each(struct ldlm_namespace *ns, + int cb(struct ldlm_resource *res, void *data), + void *data) +{ + struct rhashtable_iter iter; + struct ldlm_resource *res, *to_put = NULL; + + rhashtable_walk_enter(&ns->ns_rs_hash, &iter); + rhashtable_walk_start(&iter); + while ((res = rhashtable_walk_next(&iter)) != NULL) { + if (IS_ERR(res)) + continue; + if (!atomic_inc_not_zero(&res->lr_refcount)) + continue; + rhashtable_walk_stop(&iter); + if (to_put) { + __ldlm_resource_putref_final(to_put); + to_put = NULL; + } + if (cb(res, data)) { + ldlm_resource_putref(res); + goto exit; + } + rhashtable_walk_start(&iter); + if (atomic_dec_and_test(&res->lr_refcount)) + to_put = res; + } + rhashtable_walk_stop(&iter); +exit: + rhashtable_walk_exit(&iter); + if (to_put) + __ldlm_resource_putref_final(to_put); +} /** * Cancel and destroy all locks in the namespace. * @@ -828,10 +791,9 @@ int ldlm_namespace_cleanup(struct ldlm_namespace *ns, __u64 flags) return ELDLM_OK; } - cfs_hash_for_each_nolock(ns->ns_rs_hash, ldlm_resource_clean, - &flags, 0); - cfs_hash_for_each_nolock(ns->ns_rs_hash, ldlm_resource_complain, - NULL, 0); + ldlm_resource_for_each(ns, ldlm_resource_clean, &flags); + ldlm_resource_for_each(ns, ldlm_resource_complain, NULL); + return ELDLM_OK; } EXPORT_SYMBOL(ldlm_namespace_cleanup); @@ -960,7 +922,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns) ldlm_namespace_debugfs_unregister(ns); ldlm_namespace_sysfs_unregister(ns); - cfs_hash_putref(ns->ns_rs_hash); + rhashtable_destroy(&ns->ns_rs_hash); kvfree(ns->ns_rs_buckets); kfree(ns->ns_name); /* Namespace \a ns should be not on list at this time, otherwise @@ -1062,27 +1024,22 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, const struct ldlm_res_id *name, enum ldlm_type type, int create) { - struct hlist_node *hnode; struct ldlm_resource *res = NULL; - struct cfs_hash_bd bd; - __u64 version; + struct ldlm_resource *res2; int ns_refcount = 0; int rc; int hash; LASSERT(!parent); - LASSERT(ns->ns_rs_hash); LASSERT(name->name[0] != 0); - cfs_hash_bd_get_and_lock(ns->ns_rs_hash, (void *)name, &bd, 0); - hnode = cfs_hash_bd_lookup_locked(ns->ns_rs_hash, &bd, (void *)name); - if (hnode) { - cfs_hash_bd_unlock(ns->ns_rs_hash, &bd, 0); + rcu_read_lock(); + res = rhashtable_lookup(&ns->ns_rs_hash, name, ns_rs_hash_params); + if (res && atomic_inc_not_zero(&res->lr_refcount)) { + rcu_read_unlock(); goto lvbo_init; } - - version = cfs_hash_bd_version_get(&bd); - cfs_hash_bd_unlock(ns->ns_rs_hash, &bd, 0); + rcu_read_unlock(); if (create == 0) return ERR_PTR(-ENOENT); @@ -1098,20 +1055,30 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, res->lr_name = *name; res->lr_type = type; - cfs_hash_bd_lock(ns->ns_rs_hash, &bd, 1); - hnode = (version == cfs_hash_bd_version_get(&bd)) ? NULL : - cfs_hash_bd_lookup_locked(ns->ns_rs_hash, &bd, (void *)name); - - if (hnode) { + /* + * If we find an existing entry with a refcount of zero, we need to + * try again. + */ + rcu_read_lock(); + do { + res2 = rhashtable_lookup_get_insert_fast(&ns->ns_rs_hash, &res->lr_hash, + ns_rs_hash_params); + } while (!IS_ERR_OR_NULL(res2) && !atomic_inc_not_zero(&res2->lr_refcount)); + rcu_read_unlock(); + if (res2) { + /* Insertion failed: an error occurred or */ /* Someone won the race and already added the resource. */ - cfs_hash_bd_unlock(ns->ns_rs_hash, &bd, 1); + /* Clean lu_ref for failed resource. */ lu_ref_fini(&res->lr_reference); /* We have taken lr_lvb_mutex. Drop it. */ mutex_unlock(&res->lr_lvb_mutex); kmem_cache_free(ldlm_resource_slab, res); + + if (IS_ERR(res2)) + return ERR_PTR(-ENOMEM); + res = res2; lvbo_init: - res = hlist_entry(hnode, struct ldlm_resource, lr_hash); /* Synchronize with regard to resource creation. */ if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) { mutex_lock(&res->lr_lvb_mutex); @@ -1125,12 +1092,9 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, } return res; } - /* We won! Let's add the resource. */ - cfs_hash_bd_add_locked(ns->ns_rs_hash, &bd, &res->lr_hash); if (atomic_inc_return(&res->lr_ns_bucket->nsb_count) == 1) ns_refcount = ldlm_namespace_get_return(ns); - cfs_hash_bd_unlock(ns->ns_rs_hash, &bd, 1); if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) { OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CREATE_RESOURCE, 2); rc = ns->ns_lvbo->lvbo_init(res); @@ -1163,8 +1127,14 @@ ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent, } EXPORT_SYMBOL(ldlm_resource_get); -static void __ldlm_resource_putref_final(struct cfs_hash_bd *bd, - struct ldlm_resource *res) +static void ldlm_resource_free(struct rcu_head *rcu) +{ + struct ldlm_resource *res = container_of(rcu, struct ldlm_resource, + lr_rcu); + kmem_cache_free(ldlm_resource_slab, res); +} + +static void __ldlm_resource_putref_final(struct ldlm_resource *res) { struct ldlm_ns_bucket *nsb = res->lr_ns_bucket; struct ldlm_namespace *ns = nsb->nsb_namespace; @@ -1179,29 +1149,24 @@ static void __ldlm_resource_putref_final(struct cfs_hash_bd *bd, LBUG(); } - cfs_hash_bd_del_locked(ns->ns_rs_hash, - bd, &res->lr_hash); + rhashtable_remove_fast(&ns->ns_rs_hash, + &res->lr_hash, ns_rs_hash_params); lu_ref_fini(&res->lr_reference); - cfs_hash_bd_unlock(ns->ns_rs_hash, bd, 1); if (ns->ns_lvbo && ns->ns_lvbo->lvbo_free) ns->ns_lvbo->lvbo_free(res); if (atomic_dec_and_test(&nsb->nsb_count)) ldlm_namespace_put(ns); - kmem_cache_free(ldlm_resource_slab, res); + call_rcu(&res->lr_rcu, ldlm_resource_free); } void ldlm_resource_putref(struct ldlm_resource *res) { - struct ldlm_namespace *ns = ldlm_res_to_ns(res); - struct cfs_hash_bd bd; - LASSERT_ATOMIC_GT_LT(&res->lr_refcount, 0, LI_POISON); CDEBUG(D_INFO, "putref res: %p count: %d\n", res, atomic_read(&res->lr_refcount) - 1); - cfs_hash_bd_get(ns->ns_rs_hash, &res->lr_name, &bd); - if (cfs_hash_bd_dec_and_lock(ns->ns_rs_hash, &bd, &res->lr_refcount)) - __ldlm_resource_putref_final(&bd, res); + if (atomic_dec_and_test(&res->lr_refcount)) + __ldlm_resource_putref_final(res); } EXPORT_SYMBOL(ldlm_resource_putref); @@ -1263,14 +1228,12 @@ void ldlm_dump_all_namespaces(enum ldlm_side client, int level) mutex_unlock(ldlm_namespace_lock(client)); } -static int ldlm_res_hash_dump(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *arg) +static int ldlm_res_hash_dump(struct ldlm_resource *res, void *arg) { - struct ldlm_resource *res = cfs_hash_object(hs, hnode); - int level = (int)(unsigned long)arg; + int *level = arg; lock_res(res); - ldlm_resource_dump(level, res); + ldlm_resource_dump(*level, res); unlock_res(res); return 0; @@ -1291,9 +1254,8 @@ void ldlm_namespace_dump(int level, struct ldlm_namespace *ns) if (time_before(jiffies, ns->ns_next_dump)) return; - cfs_hash_for_each_nolock(ns->ns_rs_hash, - ldlm_res_hash_dump, - (void *)(unsigned long)level, 0); + ldlm_resource_for_each(ns, ldlm_res_hash_dump, &level); + spin_lock(&ns->ns_lock); ns->ns_next_dump = jiffies + 10 * HZ; spin_unlock(&ns->ns_lock); diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 0038e555e905..06dc52dfb671 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -2479,13 +2479,10 @@ static int osc_disconnect(struct obd_export *exp) return rc; } -static int osc_ldlm_resource_invalidate(struct cfs_hash *hs, - struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *arg) +static int osc_ldlm_resource_invalidate(struct ldlm_resource *res, void *data) { - struct ldlm_resource *res = cfs_hash_object(hs, hnode); + struct lu_env *env = data; struct osc_object *osc = NULL; - struct lu_env *env = arg; struct ldlm_lock *lock; lock_res(res); @@ -2545,9 +2542,8 @@ static int osc_import_event(struct obd_device *obd, if (!IS_ERR(env)) { osc_io_unplug(env, &obd->u.cli, NULL); - cfs_hash_for_each_nolock(ns->ns_rs_hash, - osc_ldlm_resource_invalidate, - env, 0); + ldlm_resource_for_each(ns, osc_ldlm_resource_invalidate, env); + cl_env_put(env, &refcheck); ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY); From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 10/20] staging: lustre: make struct lu_site_bkt_data private In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368887.12394.17432712645950792022.stgit@noble> This data structure only needs to be public so that various modules can access a wait queue to wait for object destruction. If we provide a function to get the wait queue, rather than the whole bucket, the structure can be made private. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lu_object.h | 36 +------------- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 8 ++- drivers/staging/lustre/lustre/lov/lov_object.c | 8 ++- drivers/staging/lustre/lustre/obdclass/lu_object.c | 50 +++++++++++++++++--- 4 files changed, 54 insertions(+), 48 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index c3b0ed518819..f29bbca5af65 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -549,31 +549,7 @@ struct lu_object_header { }; struct fld; - -struct lu_site_bkt_data { - /** - * number of object in this bucket on the lsb_lru list. - */ - long lsb_lru_len; - /** - * LRU list, updated on each access to object. Protected by - * bucket lock of lu_site::ls_obj_hash. - * - * "Cold" end of LRU is lu_site::ls_lru.next. Accessed object are - * moved to the lu_site::ls_lru.prev (this is due to the non-existence - * of list_for_each_entry_safe_reverse()). - */ - struct list_head lsb_lru; - /** - * Wait-queue signaled when an object in this site is ultimately - * destroyed (lu_object_free()). It is used by lu_object_find() to - * wait before re-trying when object in the process of destruction is - * found in the hash table. - * - * \see htable_lookup(). - */ - wait_queue_head_t lsb_marche_funebre; -}; +struct lu_site_bkt_data; enum { LU_SS_CREATED = 0, @@ -642,14 +618,8 @@ struct lu_site { struct percpu_counter ls_lru_len_counter; }; -static inline struct lu_site_bkt_data * -lu_site_bkt_from_fid(struct lu_site *site, struct lu_fid *fid) -{ - struct cfs_hash_bd bd; - - cfs_hash_bd_get(site->ls_obj_hash, fid, &bd); - return cfs_hash_bd_extra_get(site->ls_obj_hash, &bd); -} +wait_queue_head_t * +lu_site_wq_from_fid(struct lu_site *site, struct lu_fid *fid); static inline struct seq_server_site *lu_site2seq(const struct lu_site *s) { diff --git a/drivers/staging/lustre/lustre/llite/lcommon_cl.c b/drivers/staging/lustre/lustre/llite/lcommon_cl.c index df5c0c0ae703..d5b42fb1d601 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_cl.c @@ -211,12 +211,12 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj) if (unlikely(atomic_read(&header->loh_ref) != 1)) { struct lu_site *site = obj->co_lu.lo_dev->ld_site; - struct lu_site_bkt_data *bkt; + wait_queue_head_t *wq; - bkt = lu_site_bkt_from_fid(site, &header->loh_fid); + wq = lu_site_wq_from_fid(site, &header->loh_fid); init_waitqueue_entry(&waiter, current); - add_wait_queue(&bkt->lsb_marche_funebre, &waiter); + add_wait_queue(wq, &waiter); while (1) { set_current_state(TASK_UNINTERRUPTIBLE); @@ -226,7 +226,7 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj) } set_current_state(TASK_RUNNING); - remove_wait_queue(&bkt->lsb_marche_funebre, &waiter); + remove_wait_queue(wq, &waiter); } cl_object_put(env, obj); diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index f7c69680cb7d..adc90f310fd7 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c @@ -370,7 +370,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov, struct cl_object *sub; struct lov_layout_raid0 *r0; struct lu_site *site; - struct lu_site_bkt_data *bkt; + wait_queue_head_t *wq; wait_queue_entry_t *waiter; r0 = &lov->u.raid0; @@ -378,7 +378,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov, sub = lovsub2cl(los); site = sub->co_lu.lo_dev->ld_site; - bkt = lu_site_bkt_from_fid(site, &sub->co_lu.lo_header->loh_fid); + wq = lu_site_wq_from_fid(site, &sub->co_lu.lo_header->loh_fid); cl_object_kill(env, sub); /* release a reference to the sub-object and ... */ @@ -391,7 +391,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov, if (r0->lo_sub[idx] == los) { waiter = &lov_env_info(env)->lti_waiter; init_waitqueue_entry(waiter, current); - add_wait_queue(&bkt->lsb_marche_funebre, waiter); + add_wait_queue(wq, waiter); set_current_state(TASK_UNINTERRUPTIBLE); while (1) { /* this wait-queue is signaled at the end of @@ -408,7 +408,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov, break; } } - remove_wait_queue(&bkt->lsb_marche_funebre, waiter); + remove_wait_queue(wq, waiter); } LASSERT(!r0->lo_sub[idx]); } diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 3de7dc0497c4..2a8a25d6edb5 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -56,6 +56,31 @@ #include #include +struct lu_site_bkt_data { + /** + * number of object in this bucket on the lsb_lru list. + */ + long lsb_lru_len; + /** + * LRU list, updated on each access to object. Protected by + * bucket lock of lu_site::ls_obj_hash. + * + * "Cold" end of LRU is lu_site::ls_lru.next. Accessed object are + * moved to the lu_site::ls_lru.prev (this is due to the non-existence + * of list_for_each_entry_safe_reverse()). + */ + struct list_head lsb_lru; + /** + * Wait-queue signaled when an object in this site is ultimately + * destroyed (lu_object_free()). It is used by lu_object_find() to + * wait before re-trying when object in the process of destruction is + * found in the hash table. + * + * \see htable_lookup(). + */ + wait_queue_head_t lsb_marche_funebre; +}; + enum { LU_CACHE_PERCENT_MAX = 50, LU_CACHE_PERCENT_DEFAULT = 20 @@ -88,6 +113,17 @@ MODULE_PARM_DESC(lu_cache_nr, "Maximum number of objects in lu_object cache"); static void lu_object_free(const struct lu_env *env, struct lu_object *o); static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx); +wait_queue_head_t * +lu_site_wq_from_fid(struct lu_site *site, struct lu_fid *fid) +{ + struct cfs_hash_bd bd; + struct lu_site_bkt_data *bkt; + + cfs_hash_bd_get(site->ls_obj_hash, fid, &bd); + bkt = cfs_hash_bd_extra_get(site->ls_obj_hash, &bd); + return &bkt->lsb_marche_funebre; +} + /** * Decrease reference counter on object. If last reference is freed, return * object to the cache, unless lu_object_is_dying(o) holds. In the latter @@ -288,7 +324,7 @@ static struct lu_object *lu_object_alloc(const struct lu_env *env, */ static void lu_object_free(const struct lu_env *env, struct lu_object *o) { - struct lu_site_bkt_data *bkt; + wait_queue_head_t *wq; struct lu_site *site; struct lu_object *scan; struct list_head *layers; @@ -296,7 +332,7 @@ static void lu_object_free(const struct lu_env *env, struct lu_object *o) site = o->lo_dev->ld_site; layers = &o->lo_header->loh_layers; - bkt = lu_site_bkt_from_fid(site, &o->lo_header->loh_fid); + wq = lu_site_wq_from_fid(site, &o->lo_header->loh_fid); /* * First call ->loo_object_delete() method to release all resources. */ @@ -324,8 +360,8 @@ static void lu_object_free(const struct lu_env *env, struct lu_object *o) o->lo_ops->loo_object_free(env, o); } - if (waitqueue_active(&bkt->lsb_marche_funebre)) - wake_up_all(&bkt->lsb_marche_funebre); + if (waitqueue_active(wq)) + wake_up_all(wq); } /** @@ -749,7 +785,7 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, const struct lu_fid *f, const struct lu_object_conf *conf) { - struct lu_site_bkt_data *bkt; + wait_queue_head_t *wq; struct lu_object *obj; wait_queue_entry_t wait; @@ -762,8 +798,8 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, * wait queue. */ schedule(); - bkt = lu_site_bkt_from_fid(dev->ld_site, (void *)f); - remove_wait_queue(&bkt->lsb_marche_funebre, &wait); + wq = lu_site_wq_from_fid(dev->ld_site, (void *)f); + remove_wait_queue(wq, &wait); } } EXPORT_SYMBOL(lu_object_find_at); From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 11/20] staging: lustre: lu_object: discard extra lru count. In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368891.12394.371279007088347234.stgit@noble> lu_object maintains 2 lru counts. One is a per-bucket lsb_lru_len. The other is the per-cpu ls_lru_len_counter. The only times the per-bucket counters are use are: - a debug message when an object is added - in lu_site_stats_get when all the counters are combined. The debug message is not essential, and the per-cpu counter can be used to get the combined total. So discard the per-bucket lsb_lru_len. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 24 ++++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 2a8a25d6edb5..2bf089817157 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -57,10 +57,6 @@ #include struct lu_site_bkt_data { - /** - * number of object in this bucket on the lsb_lru list. - */ - long lsb_lru_len; /** * LRU list, updated on each access to object. Protected by * bucket lock of lu_site::ls_obj_hash. @@ -187,10 +183,9 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) if (!lu_object_is_dying(top)) { LASSERT(list_empty(&top->loh_lru)); list_add_tail(&top->loh_lru, &bkt->lsb_lru); - bkt->lsb_lru_len++; percpu_counter_inc(&site->ls_lru_len_counter); - CDEBUG(D_INODE, "Add %p to site lru. hash: %p, bkt: %p, lru_len: %ld\n", - o, site->ls_obj_hash, bkt, bkt->lsb_lru_len); + CDEBUG(D_INODE, "Add %p to site lru. hash: %p, bkt: %p\n", + o, site->ls_obj_hash, bkt); cfs_hash_bd_unlock(site->ls_obj_hash, &bd, 1); return; } @@ -238,7 +233,6 @@ void lu_object_unhash(const struct lu_env *env, struct lu_object *o) list_del_init(&top->loh_lru); bkt = cfs_hash_bd_extra_get(obj_hash, &bd); - bkt->lsb_lru_len--; percpu_counter_dec(&site->ls_lru_len_counter); } cfs_hash_bd_del_locked(obj_hash, &bd, &top->loh_hash); @@ -422,7 +416,6 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, cfs_hash_bd_del_locked(s->ls_obj_hash, &bd2, &h->loh_hash); list_move(&h->loh_lru, &dispose); - bkt->lsb_lru_len--; percpu_counter_dec(&s->ls_lru_len_counter); if (did_sth == 0) did_sth = 1; @@ -621,7 +614,6 @@ static struct lu_object *htable_lookup(struct lu_site *s, lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_HIT); if (!list_empty(&h->loh_lru)) { list_del_init(&h->loh_lru); - bkt->lsb_lru_len--; percpu_counter_dec(&s->ls_lru_len_counter); } return lu_object_top(h); @@ -1834,19 +1826,21 @@ struct lu_site_stats { unsigned int lss_busy; }; -static void lu_site_stats_get(struct cfs_hash *hs, +static void lu_site_stats_get(const struct lu_site *s, struct lu_site_stats *stats, int populated) { + struct cfs_hash *hs = s->ls_obj_hash; struct cfs_hash_bd bd; unsigned int i; + /* percpu_counter_read_positive() won't accept a const pointer */ + struct lu_site *s2 = (struct lu_site *)s; + stats->lss_busy += cfs_hash_size_get(hs) - + percpu_counter_read_positive(&s2->ls_lru_len_counter); cfs_hash_for_each_bucket(hs, &bd, i) { - struct lu_site_bkt_data *bkt = cfs_hash_bd_extra_get(hs, &bd); struct hlist_head *hhead; cfs_hash_bd_lock(hs, &bd, 1); - stats->lss_busy += - cfs_hash_bd_count_get(&bd) - bkt->lsb_lru_len; stats->lss_total += cfs_hash_bd_count_get(&bd); stats->lss_max_search = max((int)stats->lss_max_search, cfs_hash_bd_depmax_get(&bd)); @@ -2039,7 +2033,7 @@ int lu_site_stats_print(const struct lu_site *s, struct seq_file *m) struct lu_site_stats stats; memset(&stats, 0, sizeof(stats)); - lu_site_stats_get(s->ls_obj_hash, &stats, 1); + lu_site_stats_get(s, &stats, 1); seq_printf(m, "%d/%d %d/%ld %d %d %d %d %d %d %d\n", stats.lss_busy, From neilb at suse.com Wed Apr 11 21:54:48 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:48 +1000 Subject: [lustre-devel] [PATCH 12/20] staging: lustre: lu_object: factor out extra per-bucket data In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368895.12394.16867389460888705277.stgit@noble> The hash tables managed by lu_object store some extra information in each bucket in the hash table. This prevents the use of resizeable hash tables, so lu_site_init() goes to some trouble to try to guess a good hash size. There is no real need for the extra data to be closely associated with hash buckets. There is a small advantage as both the hash bucket and the extra information can then be protected by the same lock, but as these locks have low contention, that should rarely be noticed. The extra data is updated frequently and accessed rarely, such an lru list and a wait_queue head. There could just be a single copy of this data for the whole array, but on a many-cpu machine, that could become a contention bottle neck. So it makes sense keep multiple shards and combine them only when needed. It does not make sense to have many more copies than there are CPUs. This patch takes the extra data out of the hash table buckets and creates a separate array, which never has more entries than twice the number of possible cpus. As this extra data contains a wait_queue_head, which contains a spinlock, that lock is used to protect the other data (counter and lru list). The code currently uses a very simple hash to choose a hash-table bucket: (fid_seq(fid) + fid_oid(fid)) & (CFS_HASH_NBKT(hs) - 1) There is no documented reason for this and I cannot see any value in not using a general hash function. So I have chosen jhash2() instead. The lock ordering requires that a hash-table lock cannot be taken while an extra-data lock is held. This means that in lu_site_purge_objects() we much first remove objects from the lru (with the extra information locked) and then remove each one from the hash table. To ensure the object is not found between these two steps, the LU_OBJECT_HEARD_BANSHEE flag is set. As the extra info is now separate from the hash buckets, we cannot report statistic from both at the same time. I think the lru statistics are probably more useful than the hash-table statistics, so I have preserved the former and discarded the latter. When the hashtable becomes resizeable, those statistics will be irrelevant. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lu_object.h | 5 + drivers/staging/lustre/lustre/obdclass/lu_object.c | 135 +++++++++++--------- 2 files changed, 77 insertions(+), 63 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index f29bbca5af65..d23a78577fb5 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -576,6 +576,11 @@ struct lu_site { * objects hash table */ struct cfs_hash *ls_obj_hash; + /* + * buckets for summary data + */ + struct lu_site_bkt_data *ls_bkts; + int ls_bkt_cnt; /** * index of bucket on hash table while purging */ diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 2bf089817157..064166843e64 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -55,15 +55,15 @@ #include #include #include +#include struct lu_site_bkt_data { /** * LRU list, updated on each access to object. Protected by - * bucket lock of lu_site::ls_obj_hash. + * lsb_marche_funebre.lock. * * "Cold" end of LRU is lu_site::ls_lru.next. Accessed object are - * moved to the lu_site::ls_lru.prev (this is due to the non-existence - * of list_for_each_entry_safe_reverse()). + * moved to the lu_site::ls_lru.prev. */ struct list_head lsb_lru; /** @@ -92,9 +92,11 @@ enum { #define LU_SITE_BITS_MAX 24 #define LU_SITE_BITS_MAX_CL 19 /** - * total 256 buckets, we don't want too many buckets because: - * - consume too much memory + * max 256 buckets, we don't want too many buckets because: + * - consume too much memory (currently max 16K) * - avoid unbalanced LRU list + * With few cpus there is little gain from extra buckets, so + * we treat this as a maximum in lu_site_init(). */ #define LU_SITE_BKT_BITS 8 @@ -109,14 +111,18 @@ MODULE_PARM_DESC(lu_cache_nr, "Maximum number of objects in lu_object cache"); static void lu_object_free(const struct lu_env *env, struct lu_object *o); static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx); +static inline int lu_bkt_hash(struct lu_site *s, const struct lu_fid *fid) +{ + return jhash2((void*)fid, sizeof(*fid)/4, 0xdeadbeef) & + (s->ls_bkt_cnt - 1); +} + wait_queue_head_t * lu_site_wq_from_fid(struct lu_site *site, struct lu_fid *fid) { - struct cfs_hash_bd bd; struct lu_site_bkt_data *bkt; - cfs_hash_bd_get(site->ls_obj_hash, fid, &bd); - bkt = cfs_hash_bd_extra_get(site->ls_obj_hash, &bd); + bkt = &site->ls_bkts[lu_bkt_hash(site, fid)]; return &bkt->lsb_marche_funebre; } @@ -158,7 +164,6 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) } cfs_hash_bd_get(site->ls_obj_hash, &top->loh_fid, &bd); - bkt = cfs_hash_bd_extra_get(site->ls_obj_hash, &bd); if (!cfs_hash_bd_dec_and_lock(site->ls_obj_hash, &bd, &top->loh_ref)) { if (lu_object_is_dying(top)) { @@ -166,6 +171,7 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) * somebody may be waiting for this, currently only * used for cl_object, see cl_object_put_last(). */ + bkt = &site->ls_bkts[lu_bkt_hash(site, &top->loh_fid)]; wake_up_all(&bkt->lsb_marche_funebre); } return; @@ -180,9 +186,13 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) o->lo_ops->loo_object_release(env, o); } + bkt = &site->ls_bkts[lu_bkt_hash(site, &top->loh_fid)]; + spin_lock(&bkt->lsb_marche_funebre.lock); + if (!lu_object_is_dying(top)) { LASSERT(list_empty(&top->loh_lru)); list_add_tail(&top->loh_lru, &bkt->lsb_lru); + spin_unlock(&bkt->lsb_marche_funebre.lock); percpu_counter_inc(&site->ls_lru_len_counter); CDEBUG(D_INODE, "Add %p to site lru. hash: %p, bkt: %p\n", o, site->ls_obj_hash, bkt); @@ -192,21 +202,20 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) /* * If object is dying (will not be cached), then removed it - * from hash table and LRU. + * from hash table (it is already not on the LRU). * - * This is done with hash table and LRU lists locked. As the only + * This is done with hash table list locked. As the only * way to acquire first reference to previously unreferenced - * object is through hash-table lookup (lu_object_find()), - * or LRU scanning (lu_site_purge()), that are done under hash-table - * and LRU lock, no race with concurrent object lookup is possible - * and we can safely destroy object below. + * object is through hash-table lookup (lu_object_find()) + * which is done under hash-table, no race with concurrent + * object lookup is possible and we can safely destroy object below. */ if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) cfs_hash_bd_del_locked(site->ls_obj_hash, &bd, &top->loh_hash); + spin_unlock(&bkt->lsb_marche_funebre.lock); cfs_hash_bd_unlock(site->ls_obj_hash, &bd, 1); /* - * Object was already removed from hash and lru above, can - * kill it. + * Object was already removed from hash above, can kill it. */ lu_object_free(env, orig); } @@ -231,8 +240,10 @@ void lu_object_unhash(const struct lu_env *env, struct lu_object *o) if (!list_empty(&top->loh_lru)) { struct lu_site_bkt_data *bkt; + bkt = &site->ls_bkts[lu_bkt_hash(site,&top->loh_fid)]; + spin_lock(&bkt->lsb_marche_funebre.lock); list_del_init(&top->loh_lru); - bkt = cfs_hash_bd_extra_get(obj_hash, &bd); + spin_unlock(&bkt->lsb_marche_funebre.lock); percpu_counter_dec(&site->ls_lru_len_counter); } cfs_hash_bd_del_locked(obj_hash, &bd, &top->loh_hash); @@ -369,8 +380,6 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, struct lu_object_header *h; struct lu_object_header *temp; struct lu_site_bkt_data *bkt; - struct cfs_hash_bd bd; - struct cfs_hash_bd bd2; struct list_head dispose; int did_sth; unsigned int start = 0; @@ -388,7 +397,7 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, */ if (nr != ~0) start = s->ls_purge_start; - bnr = (nr == ~0) ? -1 : nr / (int)CFS_HASH_NBKT(s->ls_obj_hash) + 1; + bnr = (nr == ~0) ? -1 : nr / s->ls_bkt_cnt + 1; again: /* * It doesn't make any sense to make purge threads parallel, that can @@ -400,21 +409,21 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, goto out; did_sth = 0; - cfs_hash_for_each_bucket(s->ls_obj_hash, &bd, i) { - if (i < start) - continue; + for (i = start; i < s->ls_bkt_cnt ; i++) { count = bnr; - cfs_hash_bd_lock(s->ls_obj_hash, &bd, 1); - bkt = cfs_hash_bd_extra_get(s->ls_obj_hash, &bd); + bkt = &s->ls_bkts[i]; + spin_lock(&bkt->lsb_marche_funebre.lock); list_for_each_entry_safe(h, temp, &bkt->lsb_lru, loh_lru) { LASSERT(atomic_read(&h->loh_ref) == 0); - cfs_hash_bd_get(s->ls_obj_hash, &h->loh_fid, &bd2); - LASSERT(bd.bd_bucket == bd2.bd_bucket); + LINVRNT(lu_bkt_hash(s, &h->loh_fid) == i); - cfs_hash_bd_del_locked(s->ls_obj_hash, - &bd2, &h->loh_hash); + /* Cannot remove from hash under current spinlock, + * so set flag to stop object from being found + * by htable_lookup(). + */ + set_bit(LU_OBJECT_HEARD_BANSHEE, &h->loh_flags); list_move(&h->loh_lru, &dispose); percpu_counter_dec(&s->ls_lru_len_counter); if (did_sth == 0) @@ -426,16 +435,17 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, if (count > 0 && --count == 0) break; } - cfs_hash_bd_unlock(s->ls_obj_hash, &bd, 1); + spin_unlock(&bkt->lsb_marche_funebre.lock); cond_resched(); /* * Free everything on the dispose list. This is safe against * races due to the reasons described in lu_object_put(). */ - while (!list_empty(&dispose)) { - h = container_of(dispose.next, - struct lu_object_header, loh_lru); + while ((h = list_first_entry_or_null(&dispose, + struct lu_object_header, + loh_lru)) != NULL) { list_del_init(&h->loh_lru); + cfs_hash_del(s->ls_obj_hash, &h->loh_fid, &h->loh_hash); lu_object_free(env, lu_object_top(h)); lprocfs_counter_incr(s->ls_stats, LU_SS_LRU_PURGED); } @@ -450,7 +460,7 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, goto again; } /* race on s->ls_purge_start, but nobody cares */ - s->ls_purge_start = i % CFS_HASH_NBKT(s->ls_obj_hash); + s->ls_purge_start = i & (s->ls_bkt_cnt - 1); out: return nr; } @@ -598,7 +608,6 @@ static struct lu_object *htable_lookup(struct lu_site *s, return ERR_PTR(-ENOENT); *version = ver; - bkt = cfs_hash_bd_extra_get(s->ls_obj_hash, bd); /* cfs_hash_bd_peek_locked is a somehow "internal" function * of cfs_hash, it doesn't add refcount on object. */ @@ -609,6 +618,8 @@ static struct lu_object *htable_lookup(struct lu_site *s, } h = container_of(hnode, struct lu_object_header, loh_hash); + bkt = &s->ls_bkts[lu_bkt_hash(s, f)]; + spin_lock(&bkt->lsb_marche_funebre.lock); if (likely(!lu_object_is_dying(h))) { cfs_hash_get(s->ls_obj_hash, hnode); lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_HIT); @@ -616,8 +627,10 @@ static struct lu_object *htable_lookup(struct lu_site *s, list_del_init(&h->loh_lru); percpu_counter_dec(&s->ls_lru_len_counter); } + spin_unlock(&bkt->lsb_marche_funebre.lock); return lu_object_top(h); } + spin_unlock(&bkt->lsb_marche_funebre.lock); /* * Lookup found an object being destroyed this object cannot be @@ -1028,7 +1041,6 @@ static void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d) int lu_site_init(struct lu_site *s, struct lu_device *top) { struct lu_site_bkt_data *bkt; - struct cfs_hash_bd bd; unsigned long bits; unsigned long i; char name[16]; @@ -1045,7 +1057,7 @@ int lu_site_init(struct lu_site *s, struct lu_device *top) for (bits = lu_htable_order(top); bits >= LU_SITE_BITS_MIN; bits--) { s->ls_obj_hash = cfs_hash_create(name, bits, bits, bits - LU_SITE_BKT_BITS, - sizeof(*bkt), 0, 0, + 0, 0, 0, &lu_site_hash_ops, CFS_HASH_SPIN_BKTLOCK | CFS_HASH_NO_ITEMREF | @@ -1061,15 +1073,26 @@ int lu_site_init(struct lu_site *s, struct lu_device *top) return -ENOMEM; } - cfs_hash_for_each_bucket(s->ls_obj_hash, &bd, i) { - bkt = cfs_hash_bd_extra_get(s->ls_obj_hash, &bd); + s->ls_bkt_cnt = max_t(long, 1 << LU_SITE_BKT_BITS, 2 * num_possible_cpus()); + s->ls_bkt_cnt = roundup_pow_of_two(s->ls_bkt_cnt); + s->ls_bkts = kvmalloc_array(s->ls_bkt_cnt, sizeof(*bkt), GFP_KERNEL); + if (!s->ls_bkts) { + cfs_hash_putref(s->ls_obj_hash); + s->ls_obj_hash = NULL; + s->ls_bkts = NULL; + return -ENOMEM; + } + for (i = 0; i < s->ls_bkt_cnt ; i++) { + bkt = &s->ls_bkts[i]; INIT_LIST_HEAD(&bkt->lsb_lru); init_waitqueue_head(&bkt->lsb_marche_funebre); } s->ls_stats = lprocfs_alloc_stats(LU_SS_LAST_STAT, 0); if (!s->ls_stats) { + kvfree(s->ls_bkts); cfs_hash_putref(s->ls_obj_hash); + s->ls_bkts = NULL; s->ls_obj_hash = NULL; return -ENOMEM; } @@ -1118,6 +1141,8 @@ void lu_site_fini(struct lu_site *s) s->ls_obj_hash = NULL; } + kvfree(s->ls_bkts); + if (s->ls_top_dev) { s->ls_top_dev->ld_site = NULL; lu_ref_del(&s->ls_top_dev->ld_reference, "site-top", s); @@ -1827,34 +1852,18 @@ struct lu_site_stats { }; static void lu_site_stats_get(const struct lu_site *s, - struct lu_site_stats *stats, int populated) + struct lu_site_stats *stats) { - struct cfs_hash *hs = s->ls_obj_hash; - struct cfs_hash_bd bd; - unsigned int i; + int cnt = cfs_hash_size_get(s->ls_obj_hash); /* percpu_counter_read_positive() won't accept a const pointer */ struct lu_site *s2 = (struct lu_site *)s; - stats->lss_busy += cfs_hash_size_get(hs) - + stats->lss_busy += cnt - percpu_counter_read_positive(&s2->ls_lru_len_counter); - cfs_hash_for_each_bucket(hs, &bd, i) { - struct hlist_head *hhead; - - cfs_hash_bd_lock(hs, &bd, 1); - stats->lss_total += cfs_hash_bd_count_get(&bd); - stats->lss_max_search = max((int)stats->lss_max_search, - cfs_hash_bd_depmax_get(&bd)); - if (!populated) { - cfs_hash_bd_unlock(hs, &bd, 1); - continue; - } - cfs_hash_bd_for_each_hlist(hs, &bd, hhead) { - if (!hlist_empty(hhead)) - stats->lss_populated++; - } - cfs_hash_bd_unlock(hs, &bd, 1); - } + stats->lss_total += cnt; + stats->lss_max_search = 0; + stats->lss_populated = 0; } /* @@ -2033,7 +2042,7 @@ int lu_site_stats_print(const struct lu_site *s, struct seq_file *m) struct lu_site_stats stats; memset(&stats, 0, sizeof(stats)); - lu_site_stats_get(s, &stats, 1); + lu_site_stats_get(s, &stats); seq_printf(m, "%d/%d %d/%ld %d %d %d %d %d %d %d\n", stats.lss_busy, From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 13/20] staging: lustre: lu_object: move retry logic inside htable_lookup In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368899.12394.6341901965661540031.stgit@noble> The current retry logic, to wait when a 'dying' object is found, spans multiple functions. The process is attached to a waitqueue and set TASK_UNINTERRUPTIBLE in htable_lookup, and this status is passed back through lu_object_find_try() to lu_object_find_at() where schedule() is called and the process is removed from the queue. This can be simplified by moving all the logic (including hashtable locking) inside htable_lookup(), which now never returns EAGAIN. Note that htable_lookup() is called with the hash bucket lock held, and will drop and retake it if it needs to schedule. I made this a 'goto' loop rather than a 'while(1)' loop as the diff is easier to read. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 73 +++++++------------- 1 file changed, 27 insertions(+), 46 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 064166843e64..bf505a9463a3 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -596,16 +596,21 @@ EXPORT_SYMBOL(lu_object_print); static struct lu_object *htable_lookup(struct lu_site *s, struct cfs_hash_bd *bd, const struct lu_fid *f, - wait_queue_entry_t *waiter, __u64 *version) { + struct cfs_hash *hs = s->ls_obj_hash; struct lu_site_bkt_data *bkt; struct lu_object_header *h; struct hlist_node *hnode; - __u64 ver = cfs_hash_bd_version_get(bd); + __u64 ver; + wait_queue_entry_t waiter; - if (*version == ver) +retry: + ver = cfs_hash_bd_version_get(bd); + + if (*version == ver) { return ERR_PTR(-ENOENT); + } *version = ver; /* cfs_hash_bd_peek_locked is a somehow "internal" function @@ -638,11 +643,15 @@ static struct lu_object *htable_lookup(struct lu_site *s, * drained), and moreover, lookup has to wait until object is freed. */ - init_waitqueue_entry(waiter, current); - add_wait_queue(&bkt->lsb_marche_funebre, waiter); + init_waitqueue_entry(&waiter, current); + add_wait_queue(&bkt->lsb_marche_funebre, &waiter); set_current_state(TASK_UNINTERRUPTIBLE); lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_DEATH_RACE); - return ERR_PTR(-EAGAIN); + cfs_hash_bd_unlock(hs, bd, 1); + schedule(); + remove_wait_queue(&bkt->lsb_marche_funebre, &waiter); + cfs_hash_bd_lock(hs, bd, 1); + goto retry; } /** @@ -706,13 +715,14 @@ static struct lu_object *lu_object_new(const struct lu_env *env, } /** - * Core logic of lu_object_find*() functions. + * Much like lu_object_find(), but top level device of object is specifically + * \a dev rather than top level device of the site. This interface allows + * objects of different "stacking" to be created within the same site. */ -static struct lu_object *lu_object_find_try(const struct lu_env *env, - struct lu_device *dev, - const struct lu_fid *f, - const struct lu_object_conf *conf, - wait_queue_entry_t *waiter) +struct lu_object *lu_object_find_at(const struct lu_env *env, + struct lu_device *dev, + const struct lu_fid *f, + const struct lu_object_conf *conf) { struct lu_object *o; struct lu_object *shadow; @@ -738,17 +748,16 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, * It is unnecessary to perform lookup-alloc-lookup-insert, instead, * just alloc and insert directly. * - * If dying object is found during index search, add @waiter to the - * site wait-queue and return ERR_PTR(-EAGAIN). */ if (conf && conf->loc_flags & LOC_F_NEW) return lu_object_new(env, dev, f, conf); s = dev->ld_site; hs = s->ls_obj_hash; - cfs_hash_bd_get_and_lock(hs, (void *)f, &bd, 1); - o = htable_lookup(s, &bd, f, waiter, &version); - cfs_hash_bd_unlock(hs, &bd, 1); + cfs_hash_bd_get_and_lock(hs, (void *)f, &bd, 0); + o = htable_lookup(s, &bd, f, &version); + cfs_hash_bd_unlock(hs, &bd, 0); + if (!IS_ERR(o) || PTR_ERR(o) != -ENOENT) return o; @@ -764,7 +773,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, cfs_hash_bd_lock(hs, &bd, 1); - shadow = htable_lookup(s, &bd, f, waiter, &version); + shadow = htable_lookup(s, &bd, f, &version); if (likely(PTR_ERR(shadow) == -ENOENT)) { cfs_hash_bd_add_locked(hs, &bd, &o->lo_header->loh_hash); cfs_hash_bd_unlock(hs, &bd, 1); @@ -779,34 +788,6 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, lu_object_free(env, o); return shadow; } - -/** - * Much like lu_object_find(), but top level device of object is specifically - * \a dev rather than top level device of the site. This interface allows - * objects of different "stacking" to be created within the same site. - */ -struct lu_object *lu_object_find_at(const struct lu_env *env, - struct lu_device *dev, - const struct lu_fid *f, - const struct lu_object_conf *conf) -{ - wait_queue_head_t *wq; - struct lu_object *obj; - wait_queue_entry_t wait; - - while (1) { - obj = lu_object_find_try(env, dev, f, conf, &wait); - if (obj != ERR_PTR(-EAGAIN)) - return obj; - /* - * lu_object_find_try() already added waiter into the - * wait queue. - */ - schedule(); - wq = lu_site_wq_from_fid(dev->ld_site, (void *)f); - remove_wait_queue(wq, &wait); - } -} EXPORT_SYMBOL(lu_object_find_at); /** From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 14/20] staging: lustre: fold lu_object_new() into lu_object_find_at() In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368902.12394.3830171785672683813.stgit@noble> lu_object_new() duplicates a lot of code that is in lu_object_find_at(). There is no real need for a separate function, it is simpler just to skip the bits of lu_object_find_at() that we don't want in the LOC_F_NEW case. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 44 +++++--------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index bf505a9463a3..18019f41c7a8 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -691,29 +691,6 @@ static void lu_object_limit(const struct lu_env *env, struct lu_device *dev) false); } -static struct lu_object *lu_object_new(const struct lu_env *env, - struct lu_device *dev, - const struct lu_fid *f, - const struct lu_object_conf *conf) -{ - struct lu_object *o; - struct cfs_hash *hs; - struct cfs_hash_bd bd; - - o = lu_object_alloc(env, dev, f, conf); - if (IS_ERR(o)) - return o; - - hs = dev->ld_site->ls_obj_hash; - cfs_hash_bd_get_and_lock(hs, (void *)f, &bd, 1); - cfs_hash_bd_add_locked(hs, &bd, &o->lo_header->loh_hash); - cfs_hash_bd_unlock(hs, &bd, 1); - - lu_object_limit(env, dev); - - return o; -} - /** * Much like lu_object_find(), but top level device of object is specifically * \a dev rather than top level device of the site. This interface allows @@ -749,18 +726,18 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, * just alloc and insert directly. * */ - if (conf && conf->loc_flags & LOC_F_NEW) - return lu_object_new(env, dev, f, conf); - s = dev->ld_site; hs = s->ls_obj_hash; - cfs_hash_bd_get_and_lock(hs, (void *)f, &bd, 0); - o = htable_lookup(s, &bd, f, &version); - cfs_hash_bd_unlock(hs, &bd, 0); - if (!IS_ERR(o) || PTR_ERR(o) != -ENOENT) - return o; + cfs_hash_bd_get(hs, f, &bd); + if (!(conf && conf->loc_flags & LOC_F_NEW)) { + cfs_hash_bd_lock(hs, &bd, 0); + o = htable_lookup(s, &bd, f, &version); + cfs_hash_bd_unlock(hs, &bd, 0); + if (!IS_ERR(o) || PTR_ERR(o) != -ENOENT) + return o; + } /* * Allocate new object. This may result in rather complicated * operations, including fld queries, inode loading, etc. @@ -773,7 +750,10 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, cfs_hash_bd_lock(hs, &bd, 1); - shadow = htable_lookup(s, &bd, f, &version); + if (conf && conf->loc_flags & LOC_F_NEW) + shadow = ERR_PTR(-ENOENT); + else + shadow = htable_lookup(s, &bd, f, &version); if (likely(PTR_ERR(shadow) == -ENOENT)) { cfs_hash_bd_add_locked(hs, &bd, &o->lo_header->loh_hash); cfs_hash_bd_unlock(hs, &bd, 1); From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 15/20] staging: lustre: llite: use more private data in dump_pgcache In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368905.12394.1871073958371633773.stgit@noble> The dump_page_cache debugfs file allocates and frees an 'env' in each call to vvp_pgcache_start,next,show. This is likely to be fast, but does introduce the need to check for errors. It is reasonable to allocate a single 'env' when the file is opened, and use that throughout. So create 'seq_private' structure which stores the sbi, env, and refcheck, and attach this to the seqfile. Then use it throughout instead of allocating 'env' repeatedly. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/llite/vvp_dev.c | 150 ++++++++++++------------- 1 file changed, 72 insertions(+), 78 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index 987c03b058e6..a2619dc04a7f 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -390,6 +390,12 @@ struct vvp_pgcache_id { struct lu_object_header *vpi_obj; }; +struct seq_private { + struct ll_sb_info *sbi; + struct lu_env *env; + u16 refcheck; +}; + static void vvp_pgcache_id_unpack(loff_t pos, struct vvp_pgcache_id *id) { BUILD_BUG_ON(sizeof(pos) != sizeof(__u64)); @@ -531,95 +537,71 @@ static void vvp_pgcache_page_show(const struct lu_env *env, static int vvp_pgcache_show(struct seq_file *f, void *v) { + struct seq_private *priv = f->private; loff_t pos; - struct ll_sb_info *sbi; struct cl_object *clob; - struct lu_env *env; struct vvp_pgcache_id id; - u16 refcheck; - int result; - env = cl_env_get(&refcheck); - if (!IS_ERR(env)) { - pos = *(loff_t *)v; - vvp_pgcache_id_unpack(pos, &id); - sbi = f->private; - clob = vvp_pgcache_obj(env, &sbi->ll_cl->cd_lu_dev, &id); - if (clob) { - struct inode *inode = vvp_object_inode(clob); - struct cl_page *page = NULL; - struct page *vmpage; - - result = find_get_pages_contig(inode->i_mapping, - id.vpi_index, 1, - &vmpage); - if (result > 0) { - lock_page(vmpage); - page = cl_vmpage_page(vmpage, clob); - unlock_page(vmpage); - put_page(vmpage); - } + pos = *(loff_t *)v; + vvp_pgcache_id_unpack(pos, &id); + clob = vvp_pgcache_obj(priv->env, &priv->sbi->ll_cl->cd_lu_dev, &id); + if (clob) { + struct inode *inode = vvp_object_inode(clob); + struct cl_page *page = NULL; + struct page *vmpage; + int result; + + result = find_get_pages_contig(inode->i_mapping, + id.vpi_index, 1, + &vmpage); + if (result > 0) { + lock_page(vmpage); + page = cl_vmpage_page(vmpage, clob); + unlock_page(vmpage); + put_page(vmpage); + } - seq_printf(f, "%8x@" DFID ": ", id.vpi_index, - PFID(lu_object_fid(&clob->co_lu))); - if (page) { - vvp_pgcache_page_show(env, f, page); - cl_page_put(env, page); - } else { - seq_puts(f, "missing\n"); - } - lu_object_ref_del(&clob->co_lu, "dump", current); - cl_object_put(env, clob); + seq_printf(f, "%8x@" DFID ": ", id.vpi_index, + PFID(lu_object_fid(&clob->co_lu))); + if (page) { + vvp_pgcache_page_show(priv->env, f, page); + cl_page_put(priv->env, page); } else { - seq_printf(f, "%llx missing\n", pos); + seq_puts(f, "missing\n"); } - cl_env_put(env, &refcheck); - result = 0; + lu_object_ref_del(&clob->co_lu, "dump", current); + cl_object_put(priv->env, clob); } else { - result = PTR_ERR(env); + seq_printf(f, "%llx missing\n", pos); } - return result; + return 0; } static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) { - struct ll_sb_info *sbi; - struct lu_env *env; - u16 refcheck; - - sbi = f->private; + struct seq_private *priv = f->private; - env = cl_env_get(&refcheck); - if (!IS_ERR(env)) { - sbi = f->private; - if (sbi->ll_site->ls_obj_hash->hs_cur_bits > - 64 - PGC_OBJ_SHIFT) { - pos = ERR_PTR(-EFBIG); - } else { - *pos = vvp_pgcache_find(env, &sbi->ll_cl->cd_lu_dev, - *pos); - if (*pos == ~0ULL) - pos = NULL; - } - cl_env_put(env, &refcheck); + if (priv->sbi->ll_site->ls_obj_hash->hs_cur_bits > + 64 - PGC_OBJ_SHIFT) { + pos = ERR_PTR(-EFBIG); + } else { + *pos = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, + *pos); + if (*pos == ~0ULL) + pos = NULL; } + return pos; } static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos) { - struct ll_sb_info *sbi; - struct lu_env *env; - u16 refcheck; + struct seq_private *priv = f->private; + + *pos = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, *pos + 1); + if (*pos == ~0ULL) + pos = NULL; - env = cl_env_get(&refcheck); - if (!IS_ERR(env)) { - sbi = f->private; - *pos = vvp_pgcache_find(env, &sbi->ll_cl->cd_lu_dev, *pos + 1); - if (*pos == ~0ULL) - pos = NULL; - cl_env_put(env, &refcheck); - } return pos; } @@ -637,17 +619,29 @@ static const struct seq_operations vvp_pgcache_ops = { static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) { - struct seq_file *seq; - int rc; - - rc = seq_open(filp, &vvp_pgcache_ops); - if (rc) - return rc; + struct seq_private *priv; + + priv = __seq_open_private(filp, &vvp_pgcache_ops, sizeof(*priv)); + if (!priv) + return -ENOMEM; + + priv->sbi = inode->i_private; + priv->env = cl_env_get(&priv->refcheck); + if (IS_ERR(priv->env)) { + int err = PTR_ERR(priv->env); + seq_release_private(inode, filp); + return err; + } + return 0; +} - seq = filp->private_data; - seq->private = inode->i_private; +static int vvp_dump_pgcache_seq_release(struct inode *inode, struct file *file) +{ + struct seq_file *seq = file->private_data; + struct seq_private *priv = seq->private; - return 0; + cl_env_put(priv->env, &priv->refcheck); + return seq_release_private(inode, file); } const struct file_operations vvp_dump_pgcache_file_ops = { @@ -655,5 +649,5 @@ const struct file_operations vvp_dump_pgcache_file_ops = { .open = vvp_dump_pgcache_seq_open, .read = seq_read, .llseek = seq_lseek, - .release = seq_release, + .release = vvp_dump_pgcache_seq_release, }; From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 16/20] staging: lustre: llite: remove redundant lookup in dump_pgcache In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368909.12394.15689499624422928430.stgit@noble> Both the 'next' and the 'show' functions for the dump_page_cache seqfile perform a lookup based on the current file index. This is needless duplication. The reason appears to be that the state that needs to be communicated from "next" to "show" is two pointers, but seq_file only provides for a single pointer to be returned from next and passed to show. So make use of the new 'seq_private' structure to store the extra pointer. So when 'next' (or 'start') find something, it returns the page and stores the clob in the private area. 'show' accepts the page as an argument, and finds the clob where it was stored. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/llite/vvp_dev.c | 97 +++++++++++-------------- 1 file changed, 41 insertions(+), 56 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index a2619dc04a7f..39a85e967368 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -394,6 +394,7 @@ struct seq_private { struct ll_sb_info *sbi; struct lu_env *env; u16 refcheck; + struct cl_object *clob; }; static void vvp_pgcache_id_unpack(loff_t pos, struct vvp_pgcache_id *id) @@ -458,19 +459,20 @@ static struct cl_object *vvp_pgcache_obj(const struct lu_env *env, return NULL; } -static loff_t vvp_pgcache_find(const struct lu_env *env, - struct lu_device *dev, loff_t pos) +static struct page *vvp_pgcache_find(const struct lu_env *env, + struct lu_device *dev, + struct cl_object **clobp, loff_t *pos) { struct cl_object *clob; struct lu_site *site; struct vvp_pgcache_id id; site = dev->ld_site; - vvp_pgcache_id_unpack(pos, &id); + vvp_pgcache_id_unpack(*pos, &id); while (1) { if (id.vpi_bucket >= CFS_HASH_NHLIST(site->ls_obj_hash)) - return ~0ULL; + return NULL; clob = vvp_pgcache_obj(env, dev, &id); if (clob) { struct inode *inode = vvp_object_inode(clob); @@ -482,20 +484,22 @@ static loff_t vvp_pgcache_find(const struct lu_env *env, if (nr > 0) { id.vpi_index = vmpage->index; /* Cant support over 16T file */ - nr = !(vmpage->index > 0xffffffff); + if (vmpage->index <= 0xffffffff) { + *clobp = clob; + *pos = vvp_pgcache_id_pack(&id); + return vmpage; + } put_page(vmpage); } lu_object_ref_del(&clob->co_lu, "dump", current); cl_object_put(env, clob); - if (nr > 0) - return vvp_pgcache_id_pack(&id); } /* to the next object. */ ++id.vpi_depth; id.vpi_depth &= 0xf; if (id.vpi_depth == 0 && ++id.vpi_bucket == 0) - return ~0ULL; + return NULL; id.vpi_index = 0; } } @@ -538,71 +542,52 @@ static void vvp_pgcache_page_show(const struct lu_env *env, static int vvp_pgcache_show(struct seq_file *f, void *v) { struct seq_private *priv = f->private; - loff_t pos; - struct cl_object *clob; - struct vvp_pgcache_id id; - - pos = *(loff_t *)v; - vvp_pgcache_id_unpack(pos, &id); - clob = vvp_pgcache_obj(priv->env, &priv->sbi->ll_cl->cd_lu_dev, &id); - if (clob) { - struct inode *inode = vvp_object_inode(clob); - struct cl_page *page = NULL; - struct page *vmpage; - int result; - - result = find_get_pages_contig(inode->i_mapping, - id.vpi_index, 1, - &vmpage); - if (result > 0) { - lock_page(vmpage); - page = cl_vmpage_page(vmpage, clob); - unlock_page(vmpage); - put_page(vmpage); - } - - seq_printf(f, "%8x@" DFID ": ", id.vpi_index, - PFID(lu_object_fid(&clob->co_lu))); - if (page) { - vvp_pgcache_page_show(priv->env, f, page); - cl_page_put(priv->env, page); - } else { - seq_puts(f, "missing\n"); - } - lu_object_ref_del(&clob->co_lu, "dump", current); - cl_object_put(priv->env, clob); + struct page *vmpage = v; + struct cl_page *page; + + seq_printf(f, "%8lx@" DFID ": ", vmpage->index, + PFID(lu_object_fid(&priv->clob->co_lu))); + lock_page(vmpage); + page = cl_vmpage_page(vmpage, priv->clob); + unlock_page(vmpage); + put_page(vmpage); + + if (page) { + vvp_pgcache_page_show(priv->env, f, page); + cl_page_put(priv->env, page); } else { - seq_printf(f, "%llx missing\n", pos); + seq_puts(f, "missing\n"); } + lu_object_ref_del(&priv->clob->co_lu, "dump", current); + cl_object_put(priv->env, priv->clob); + return 0; } static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) { struct seq_private *priv = f->private; + struct page *ret; if (priv->sbi->ll_site->ls_obj_hash->hs_cur_bits > - 64 - PGC_OBJ_SHIFT) { - pos = ERR_PTR(-EFBIG); - } else { - *pos = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, - *pos); - if (*pos == ~0ULL) - pos = NULL; - } + 64 - PGC_OBJ_SHIFT) + ret = ERR_PTR(-EFBIG); + else + ret = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, + &priv->clob, pos); - return pos; + return ret; } static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos) { struct seq_private *priv = f->private; + struct page *ret; - *pos = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, *pos + 1); - if (*pos == ~0ULL) - pos = NULL; - - return pos; + *pos += 1; + ret = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, + &priv->clob, pos); + return ret; } static void vvp_pgcache_stop(struct seq_file *f, void *v) From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 17/20] staging: lustre: use call_rcu() to free lu_object_headers In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368912.12394.12204341677623060724.stgit@noble> Using call_rcu to free lu_object_headers will allow us to use rhashtable and get lockless lookup. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lu_object.h | 6 +++++- drivers/staging/lustre/lustre/llite/vvp_object.c | 9 ++++++++- drivers/staging/lustre/lustre/lov/lovsub_object.c | 9 ++++++++- .../staging/lustre/lustre/obdecho/echo_client.c | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index d23a78577fb5..85066ece44d6 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -535,8 +535,12 @@ struct lu_object_header { struct hlist_node loh_hash; /** * Linkage into per-site LRU list. Protected by lu_site::ls_guard. + * memory shared with lru_head for delayed freeing; */ - struct list_head loh_lru; + union { + struct list_head loh_lru; + struct rcu_head loh_rcu; + }; /** * Linkage into list of layers. Never modified once set (except lately * during object destruction). No locking is necessary. diff --git a/drivers/staging/lustre/lustre/llite/vvp_object.c b/drivers/staging/lustre/lustre/llite/vvp_object.c index 05ad3b322a29..48a999f8406b 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_object.c +++ b/drivers/staging/lustre/lustre/llite/vvp_object.c @@ -251,13 +251,20 @@ static int vvp_object_init(const struct lu_env *env, struct lu_object *obj, return result; } +static void __vvp_object_free(struct rcu_head *rcu) +{ + struct vvp_object *vob = container_of(rcu, struct vvp_object, vob_header.coh_lu.loh_rcu); + + kmem_cache_free(vvp_object_kmem, vob); +} + static void vvp_object_free(const struct lu_env *env, struct lu_object *obj) { struct vvp_object *vob = lu2vvp(obj); lu_object_fini(obj); lu_object_header_fini(obj->lo_header); - kmem_cache_free(vvp_object_kmem, vob); + call_rcu(&vob->vob_header.coh_lu.loh_rcu, __vvp_object_free); } static const struct lu_object_operations vvp_lu_obj_ops = { diff --git a/drivers/staging/lustre/lustre/lov/lovsub_object.c b/drivers/staging/lustre/lustre/lov/lovsub_object.c index 13d452086b61..3626c2500149 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_object.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_object.c @@ -70,6 +70,13 @@ int lovsub_object_init(const struct lu_env *env, struct lu_object *obj, return result; } +static void __lovsub_object_free(struct rcu_head *rcu) +{ + struct lovsub_object *los = container_of(rcu, struct lovsub_object, + lso_header.coh_lu.loh_rcu); + kmem_cache_free(lovsub_object_kmem, los); +} + static void lovsub_object_free(const struct lu_env *env, struct lu_object *obj) { struct lovsub_object *los = lu2lovsub(obj); @@ -88,7 +95,7 @@ static void lovsub_object_free(const struct lu_env *env, struct lu_object *obj) lu_object_fini(obj); lu_object_header_fini(&los->lso_header.coh_lu); - kmem_cache_free(lovsub_object_kmem, los); + call_rcu(&los->lso_header.coh_lu.loh_rcu, __lovsub_object_free); } static int lovsub_object_print(const struct lu_env *env, void *cookie, diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 767067b61109..16bf3b5a74e4 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -431,6 +431,12 @@ static int echo_object_init(const struct lu_env *env, struct lu_object *obj, return 0; } +static void __echo_object_free(struct rcu_head *rcu) +{ + struct echo_object *eco = container_of(rcu, struct echo_object, eo_hdr.coh_lu.loh_rcu); + kmem_cache_free(echo_object_kmem, eco); +} + static void echo_object_free(const struct lu_env *env, struct lu_object *obj) { struct echo_object *eco = cl2echo_obj(lu2cl(obj)); @@ -446,7 +452,7 @@ static void echo_object_free(const struct lu_env *env, struct lu_object *obj) lu_object_header_fini(obj->lo_header); kfree(eco->eo_oinfo); - kmem_cache_free(echo_object_kmem, eco); + call_rcu(&eco->eo_hdr.coh_lu.loh_rcu, __echo_object_free); } static int echo_object_print(const struct lu_env *env, void *cookie, From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 18/20] staging: lustre: change how "dump_page_cache" walks a hash table In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368915.12394.10633296946135270444.stgit@noble> The "dump_page_cache" seq_file currently tries to encode a location in the hash table into a 64bit file index so that the seq_file can seek to any location. This is not necessary with the current implementation of seq_file. seq_file performs any seeks needed itself by rewinding and calling ->next and ->show until the required index is reached. The required behaviour of ->next is that it always return the next object after the last one returned by either ->start or ->next. It can ignore the ppos, but should increment it. The required behaviour of ->start is one of: 1/ if *ppos is 0, then return the first object 2/ if *ppos is the same value that was passed to the most recent call to either ->start or ->next, then return the same object again 3/ if *ppos is anything else, return the next object after the most recently returned one. To implement this we store a vvp_pgcache_id (index into hash table) in the seq_private data structure, and also store 'prev_pos' as the last value passed to either ->start or ->next. We remove all converstion of an id to a pos, and any limits on the size of the vpi_depth. vvp_pgcache_obj_get() is changed to ignore dying objects so that vvp_pgcache_obj only returns NULL when it reaches the end of a hash chain, and so vpi_bucket needs to be incremented. A reference to the current ->clob pointer is now kept as long as we are iterating over the pages in a given object, so we don't have to try to find it again (and possibly fail) for each page. And the ->start and ->next functions are changed as described above. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/llite/vvp_dev.c | 173 +++++++++++-------------- 1 file changed, 79 insertions(+), 94 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index 39a85e967368..64c3fdbbf0eb 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -365,22 +365,6 @@ int cl_sb_fini(struct super_block *sb) * ****************************************************************************/ -/* - * To represent contents of a page cache as a byte stream, following - * information if encoded in 64bit offset: - * - * - file hash bucket in lu_site::ls_hash[] 28bits - * - * - how far file is from bucket head 4bits - * - * - page index 32bits - * - * First two data identify a file in the cache uniquely. - */ - -#define PGC_OBJ_SHIFT (32 + 4) -#define PGC_DEPTH_SHIFT (32) - struct vvp_pgcache_id { unsigned int vpi_bucket; unsigned int vpi_depth; @@ -395,37 +379,26 @@ struct seq_private { struct lu_env *env; u16 refcheck; struct cl_object *clob; + struct vvp_pgcache_id id; + /* + * prev_pos is the 'pos' of the last object returned + * by ->start of ->next. + */ + loff_t prev_pos; }; -static void vvp_pgcache_id_unpack(loff_t pos, struct vvp_pgcache_id *id) -{ - BUILD_BUG_ON(sizeof(pos) != sizeof(__u64)); - - id->vpi_index = pos & 0xffffffff; - id->vpi_depth = (pos >> PGC_DEPTH_SHIFT) & 0xf; - id->vpi_bucket = (unsigned long long)pos >> PGC_OBJ_SHIFT; -} - -static loff_t vvp_pgcache_id_pack(struct vvp_pgcache_id *id) -{ - return - ((__u64)id->vpi_index) | - ((__u64)id->vpi_depth << PGC_DEPTH_SHIFT) | - ((__u64)id->vpi_bucket << PGC_OBJ_SHIFT); -} - static int vvp_pgcache_obj_get(struct cfs_hash *hs, struct cfs_hash_bd *bd, struct hlist_node *hnode, void *data) { struct vvp_pgcache_id *id = data; struct lu_object_header *hdr = cfs_hash_object(hs, hnode); + if (lu_object_is_dying(hdr)) + return 0; + if (id->vpi_curdep-- > 0) return 0; /* continue */ - if (lu_object_is_dying(hdr)) - return 1; - cfs_hash_get(hs, hnode); id->vpi_obj = hdr; return 1; @@ -437,7 +410,6 @@ static struct cl_object *vvp_pgcache_obj(const struct lu_env *env, { LASSERT(lu_device_is_cl(dev)); - id->vpi_depth &= 0xf; id->vpi_obj = NULL; id->vpi_curdep = id->vpi_depth; @@ -452,55 +424,42 @@ static struct cl_object *vvp_pgcache_obj(const struct lu_env *env, return lu2cl(lu_obj); } lu_object_put(env, lu_object_top(id->vpi_obj)); - - } else if (id->vpi_curdep > 0) { - id->vpi_depth = 0xf; } return NULL; } -static struct page *vvp_pgcache_find(const struct lu_env *env, - struct lu_device *dev, - struct cl_object **clobp, loff_t *pos) +static struct page *vvp_pgcache_current(struct seq_private *priv) { - struct cl_object *clob; - struct lu_site *site; - struct vvp_pgcache_id id; - - site = dev->ld_site; - vvp_pgcache_id_unpack(*pos, &id); - - while (1) { - if (id.vpi_bucket >= CFS_HASH_NHLIST(site->ls_obj_hash)) - return NULL; - clob = vvp_pgcache_obj(env, dev, &id); - if (clob) { - struct inode *inode = vvp_object_inode(clob); - struct page *vmpage; - int nr; - - nr = find_get_pages_contig(inode->i_mapping, - id.vpi_index, 1, &vmpage); - if (nr > 0) { - id.vpi_index = vmpage->index; - /* Cant support over 16T file */ - if (vmpage->index <= 0xffffffff) { - *clobp = clob; - *pos = vvp_pgcache_id_pack(&id); - return vmpage; - } - put_page(vmpage); - } - - lu_object_ref_del(&clob->co_lu, "dump", current); - cl_object_put(env, clob); + struct lu_device *dev = &priv->sbi->ll_cl->cd_lu_dev; + + while(1) { + struct inode *inode; + int nr; + struct page *vmpage; + + if (!priv->clob) { + struct cl_object *clob; + + while ((clob = vvp_pgcache_obj(priv->env, dev, &priv->id)) == NULL && + ++(priv->id.vpi_bucket) < CFS_HASH_NHLIST(dev->ld_site->ls_obj_hash)) + priv->id.vpi_depth = 0; + if (!clob) + return NULL; + priv->clob = clob; + priv->id.vpi_index = 0; + } + + inode = vvp_object_inode(priv->clob); + nr = find_get_pages_contig(inode->i_mapping, priv->id.vpi_index, 1, &vmpage); + if (nr > 0) { + priv->id.vpi_index = vmpage->index; + return vmpage; } - /* to the next object. */ - ++id.vpi_depth; - id.vpi_depth &= 0xf; - if (id.vpi_depth == 0 && ++id.vpi_bucket == 0) - return NULL; - id.vpi_index = 0; + lu_object_ref_del(&priv->clob->co_lu, "dump", current); + cl_object_put(priv->env, priv->clob); + priv->clob = NULL; + priv->id.vpi_index = 0; + priv->id.vpi_depth++; } } @@ -558,36 +517,54 @@ static int vvp_pgcache_show(struct seq_file *f, void *v) } else { seq_puts(f, "missing\n"); } - lu_object_ref_del(&priv->clob->co_lu, "dump", current); - cl_object_put(priv->env, priv->clob); return 0; } +static void vvp_pgcache_rewind(struct seq_private *priv) +{ + if (priv->prev_pos) { + memset(&priv->id, 0, sizeof(priv->id)); + priv->prev_pos = 0; + if (priv->clob) { + lu_object_ref_del(&priv->clob->co_lu, "dump", current); + cl_object_put(priv->env, priv->clob); + } + priv->clob = NULL; + } +} + +static struct page *vvp_pgcache_next_page(struct seq_private *priv) +{ + priv->id.vpi_index += 1; + return vvp_pgcache_current(priv); +} + static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) { struct seq_private *priv = f->private; - struct page *ret; - if (priv->sbi->ll_site->ls_obj_hash->hs_cur_bits > - 64 - PGC_OBJ_SHIFT) - ret = ERR_PTR(-EFBIG); - else - ret = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, - &priv->clob, pos); + if (*pos == 0) + vvp_pgcache_rewind(priv); + else if (*pos == priv->prev_pos) + /* Return the current item */; + else { + WARN_ON(*pos != priv->prev_pos + 1); + priv->id.vpi_index += 1; + } - return ret; + priv->prev_pos = *pos; + return vvp_pgcache_current(priv); } static void *vvp_pgcache_next(struct seq_file *f, void *v, loff_t *pos) { struct seq_private *priv = f->private; - struct page *ret; + WARN_ON(*pos != priv->prev_pos); *pos += 1; - ret = vvp_pgcache_find(priv->env, &priv->sbi->ll_cl->cd_lu_dev, - &priv->clob, pos); - return ret; + priv->prev_pos = *pos; + return vvp_pgcache_next_page(priv); } static void vvp_pgcache_stop(struct seq_file *f, void *v) @@ -612,6 +589,9 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) priv->sbi = inode->i_private; priv->env = cl_env_get(&priv->refcheck); + priv->clob = NULL; + memset(&priv->id, 0, sizeof(priv->id)); + if (IS_ERR(priv->env)) { int err = PTR_ERR(priv->env); seq_release_private(inode, filp); @@ -625,6 +605,11 @@ static int vvp_dump_pgcache_seq_release(struct inode *inode, struct file *file) struct seq_file *seq = file->private_data; struct seq_private *priv = seq->private; + if (priv->clob) { + lu_object_ref_del(&priv->clob->co_lu, "dump", current); + cl_object_put(priv->env, priv->clob); + } + cl_env_put(priv->env, &priv->refcheck); return seq_release_private(inode, file); } From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 19/20] staging: lustre: convert lu_object cache to rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368919.12394.7505057425201912278.stgit@noble> The lu_object cache is a little more complex than the other lustre hash tables for two reasons. 1/ there is a debugfs file which displays the contents of the cache, so we need to use rhashtable_walk in a way that works for seq_file. 2/ There is a (shared) lru list for objects which are no longer referenced, so finding an object needs to consider races with the lru as well as with the hash table. The debugfs file already manages walking the libcfs hash table keeping a current-position in the private data. We can fairly easily convert that to a struct rhashtable_iter. The debugfs file actually reports pages, and there are multiple pages per hashtable object. So as well as rhashtable_iter, we need the current page index. For the double-locking, the current code uses direct-access to the bucket locks that libcfs_hash provides. rhashtable doesn't provide that access - callers must provide their own locking or use rcu techniques. The lsb_marche_funebre.lock is still used to manage the lru list, but with this patch it is no longer nested *inside* the hashtable locks, but instead is outside. It is used to protect an object with a refcount of zero. When purging old objects from an lru, we first set LU_OBJECT_HEARD_BANSHEE while holding the lsb_marche_funebre.lock, then remove all the entries from the hashtable separately. When we find an object in the hashtable with a refcount of zero, we take the corresponding lsb_marche_funebre.lock and check LU_OBJECT_HEARD_BANSHEE isn't set. If it isn't, we can safely increment the refcount. If it is, the object is gone. When removing the last reference from an object, we first take the lsb_marche_funebre.lock, then decrement the reference and add to the lru list. This way, we only ever manipulate an object with a refcount of zero while holding the lsb_marche_funebre.lock. As there is nothing to stop us using the resizing capabilities of rhashtable, the code to try to guess the perfect has size has been removed. Signed-off-by: NeilBrown --- drivers/staging/lustre/lustre/include/lu_object.h | 8 drivers/staging/lustre/lustre/llite/vvp_dev.c | 98 ++--- drivers/staging/lustre/lustre/obdclass/lu_object.c | 362 +++++++------------- 3 files changed, 170 insertions(+), 298 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index 85066ece44d6..fab576687608 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -530,9 +530,9 @@ struct lu_object_header { */ __u32 loh_attr; /** - * Linkage into per-site hash table. Protected by lu_site::ls_guard. + * Linkage into per-site hash table. */ - struct hlist_node loh_hash; + struct rhash_head loh_hash; /** * Linkage into per-site LRU list. Protected by lu_site::ls_guard. * memory shared with lru_head for delayed freeing; @@ -579,7 +579,7 @@ struct lu_site { /** * objects hash table */ - struct cfs_hash *ls_obj_hash; + struct rhashtable ls_obj_hash; /* * buckets for summary data */ @@ -655,6 +655,8 @@ int lu_object_init(struct lu_object *o, void lu_object_fini(struct lu_object *o); void lu_object_add_top(struct lu_object_header *h, struct lu_object *o); void lu_object_add(struct lu_object *before, struct lu_object *o); +struct lu_object *lu_object_get_first(struct lu_object_header *h, + struct lu_device *dev); /** * Helpers to initialize and finalize device types. diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index 64c3fdbbf0eb..da39375ae43d 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -365,21 +365,13 @@ int cl_sb_fini(struct super_block *sb) * ****************************************************************************/ -struct vvp_pgcache_id { - unsigned int vpi_bucket; - unsigned int vpi_depth; - u32 vpi_index; - - unsigned int vpi_curdep; - struct lu_object_header *vpi_obj; -}; - struct seq_private { struct ll_sb_info *sbi; struct lu_env *env; u16 refcheck; struct cl_object *clob; - struct vvp_pgcache_id id; + struct rhashtable_iter iter; + u32 page_index; /* * prev_pos is the 'pos' of the last object returned * by ->start of ->next. @@ -387,79 +379,43 @@ struct seq_private { loff_t prev_pos; }; -static int vvp_pgcache_obj_get(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *data) -{ - struct vvp_pgcache_id *id = data; - struct lu_object_header *hdr = cfs_hash_object(hs, hnode); - - if (lu_object_is_dying(hdr)) - return 0; - - if (id->vpi_curdep-- > 0) - return 0; /* continue */ - - cfs_hash_get(hs, hnode); - id->vpi_obj = hdr; - return 1; -} - -static struct cl_object *vvp_pgcache_obj(const struct lu_env *env, - struct lu_device *dev, - struct vvp_pgcache_id *id) -{ - LASSERT(lu_device_is_cl(dev)); - - id->vpi_obj = NULL; - id->vpi_curdep = id->vpi_depth; - - cfs_hash_hlist_for_each(dev->ld_site->ls_obj_hash, id->vpi_bucket, - vvp_pgcache_obj_get, id); - if (id->vpi_obj) { - struct lu_object *lu_obj; - - lu_obj = lu_object_locate(id->vpi_obj, dev->ld_type); - if (lu_obj) { - lu_object_ref_add(lu_obj, "dump", current); - return lu2cl(lu_obj); - } - lu_object_put(env, lu_object_top(id->vpi_obj)); - } - return NULL; -} - static struct page *vvp_pgcache_current(struct seq_private *priv) { struct lu_device *dev = &priv->sbi->ll_cl->cd_lu_dev; + rhashtable_walk_start(&priv->iter); while(1) { struct inode *inode; int nr; struct page *vmpage; if (!priv->clob) { - struct cl_object *clob; - - while ((clob = vvp_pgcache_obj(priv->env, dev, &priv->id)) == NULL && - ++(priv->id.vpi_bucket) < CFS_HASH_NHLIST(dev->ld_site->ls_obj_hash)) - priv->id.vpi_depth = 0; - if (!clob) + struct lu_object_header *h; + struct lu_object *lu_obj; + + while ((h = rhashtable_walk_next(&priv->iter)) != NULL && + (lu_obj = lu_object_get_first(h, dev)) == NULL) + ; + if (!h) { + rhashtable_walk_stop(&priv->iter); return NULL; - priv->clob = clob; - priv->id.vpi_index = 0; + } + priv->clob = lu2cl(lu_obj); + lu_object_ref_add(lu_obj, "dump", current); + priv->page_index = 0; } inode = vvp_object_inode(priv->clob); - nr = find_get_pages_contig(inode->i_mapping, priv->id.vpi_index, 1, &vmpage); + nr = find_get_pages_contig(inode->i_mapping, priv->page_index, 1, &vmpage); if (nr > 0) { - priv->id.vpi_index = vmpage->index; + priv->page_index = vmpage->index; + rhashtable_walk_stop(&priv->iter); return vmpage; } lu_object_ref_del(&priv->clob->co_lu, "dump", current); cl_object_put(priv->env, priv->clob); priv->clob = NULL; - priv->id.vpi_index = 0; - priv->id.vpi_depth++; + priv->page_index = 0; } } @@ -524,7 +480,9 @@ static int vvp_pgcache_show(struct seq_file *f, void *v) static void vvp_pgcache_rewind(struct seq_private *priv) { if (priv->prev_pos) { - memset(&priv->id, 0, sizeof(priv->id)); + struct lu_site *s = priv->sbi->ll_cl->cd_lu_dev.ld_site; + rhashtable_walk_exit(&priv->iter); + rhashtable_walk_enter(&s->ls_obj_hash, &priv->iter); priv->prev_pos = 0; if (priv->clob) { lu_object_ref_del(&priv->clob->co_lu, "dump", current); @@ -536,7 +494,7 @@ static void vvp_pgcache_rewind(struct seq_private *priv) static struct page *vvp_pgcache_next_page(struct seq_private *priv) { - priv->id.vpi_index += 1; + priv->page_index += 1; return vvp_pgcache_current(priv); } @@ -550,7 +508,7 @@ static void *vvp_pgcache_start(struct seq_file *f, loff_t *pos) /* Return the current item */; else { WARN_ON(*pos != priv->prev_pos + 1); - priv->id.vpi_index += 1; + priv->page_index += 1; } priv->prev_pos = *pos; @@ -582,6 +540,7 @@ static const struct seq_operations vvp_pgcache_ops = { static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) { struct seq_private *priv; + struct lu_site *s; priv = __seq_open_private(filp, &vvp_pgcache_ops, sizeof(*priv)); if (!priv) @@ -590,13 +549,16 @@ static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) priv->sbi = inode->i_private; priv->env = cl_env_get(&priv->refcheck); priv->clob = NULL; - memset(&priv->id, 0, sizeof(priv->id)); if (IS_ERR(priv->env)) { int err = PTR_ERR(priv->env); seq_release_private(inode, filp); return err; } + + s = priv->sbi->ll_cl->cd_lu_dev.ld_site; + rhashtable_walk_enter(&s->ls_obj_hash, &priv->iter); + return 0; } @@ -609,8 +571,8 @@ static int vvp_dump_pgcache_seq_release(struct inode *inode, struct file *file) lu_object_ref_del(&priv->clob->co_lu, "dump", current); cl_object_put(priv->env, priv->clob); } - cl_env_put(priv->env, &priv->refcheck); + rhashtable_walk_exit(&priv->iter); return seq_release_private(inode, file); } diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 18019f41c7a8..6ec5b83b3570 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -45,8 +45,6 @@ #include -/* hash_long() */ -#include #include #include #include @@ -88,9 +86,6 @@ enum { #define LU_CACHE_NR_LDISKFS_LIMIT LU_CACHE_NR_UNLIMITED #define LU_CACHE_NR_ZFS_LIMIT 256 -#define LU_SITE_BITS_MIN 12 -#define LU_SITE_BITS_MAX 24 -#define LU_SITE_BITS_MAX_CL 19 /** * max 256 buckets, we don't want too many buckets because: * - consume too much memory (currently max 16K) @@ -126,6 +121,13 @@ lu_site_wq_from_fid(struct lu_site *site, struct lu_fid *fid) return &bkt->lsb_marche_funebre; } +static const struct rhashtable_params obj_hash_params = { + .key_len = sizeof(struct lu_fid), + .key_offset = offsetof(struct lu_object_header, loh_fid), + .head_offset = offsetof(struct lu_object_header, loh_hash), + .automatic_shrinking = true, +}; + /** * Decrease reference counter on object. If last reference is freed, return * object to the cache, unless lu_object_is_dying(o) holds. In the latter @@ -137,7 +139,6 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) struct lu_object_header *top; struct lu_site *site; struct lu_object *orig; - struct cfs_hash_bd bd; const struct lu_fid *fid; top = o->lo_header; @@ -151,7 +152,6 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) */ fid = lu_object_fid(o); if (fid_is_zero(fid)) { - LASSERT(!top->loh_hash.next && !top->loh_hash.pprev); LASSERT(list_empty(&top->loh_lru)); if (!atomic_dec_and_test(&top->loh_ref)) return; @@ -163,9 +163,8 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) return; } - cfs_hash_bd_get(site->ls_obj_hash, &top->loh_fid, &bd); - - if (!cfs_hash_bd_dec_and_lock(site->ls_obj_hash, &bd, &top->loh_ref)) { + if (atomic_add_unless(&top->loh_ref, -1, 1)) { + still_active: if (lu_object_is_dying(top)) { /* * somebody may be waiting for this, currently only @@ -177,6 +176,16 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) return; } + bkt = &site->ls_bkts[lu_bkt_hash(site, &top->loh_fid)]; + spin_lock(&bkt->lsb_marche_funebre.lock); + if (!atomic_dec_and_test(&top->loh_ref)) { + spin_unlock(&bkt->lsb_marche_funebre.lock); + goto still_active; + } + /* refcount is zero, and cannot be incremented without taking the + * bkt lock, so object is stable. + */ + /* * When last reference is released, iterate over object * layers, and notify them that object is no longer busy. @@ -186,17 +195,13 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) o->lo_ops->loo_object_release(env, o); } - bkt = &site->ls_bkts[lu_bkt_hash(site, &top->loh_fid)]; - spin_lock(&bkt->lsb_marche_funebre.lock); - if (!lu_object_is_dying(top)) { LASSERT(list_empty(&top->loh_lru)); list_add_tail(&top->loh_lru, &bkt->lsb_lru); spin_unlock(&bkt->lsb_marche_funebre.lock); percpu_counter_inc(&site->ls_lru_len_counter); - CDEBUG(D_INODE, "Add %p to site lru. hash: %p, bkt: %p\n", - o, site->ls_obj_hash, bkt); - cfs_hash_bd_unlock(site->ls_obj_hash, &bd, 1); + CDEBUG(D_INODE, "Add %p to site lru. bkt: %p\n", + o, bkt); return; } @@ -204,16 +209,15 @@ void lu_object_put(const struct lu_env *env, struct lu_object *o) * If object is dying (will not be cached), then removed it * from hash table (it is already not on the LRU). * - * This is done with hash table list locked. As the only + * This is done with bucket lock held. As the only * way to acquire first reference to previously unreferenced * object is through hash-table lookup (lu_object_find()) - * which is done under hash-table, no race with concurrent + * which takes the lock for first reference, no race with concurrent * object lookup is possible and we can safely destroy object below. */ if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) - cfs_hash_bd_del_locked(site->ls_obj_hash, &bd, &top->loh_hash); + rhashtable_remove_fast(&site->ls_obj_hash, &top->loh_hash, obj_hash_params); spin_unlock(&bkt->lsb_marche_funebre.lock); - cfs_hash_bd_unlock(site->ls_obj_hash, &bd, 1); /* * Object was already removed from hash above, can kill it. */ @@ -233,21 +237,19 @@ void lu_object_unhash(const struct lu_env *env, struct lu_object *o) set_bit(LU_OBJECT_HEARD_BANSHEE, &top->loh_flags); if (!test_and_set_bit(LU_OBJECT_UNHASHED, &top->loh_flags)) { struct lu_site *site = o->lo_dev->ld_site; - struct cfs_hash *obj_hash = site->ls_obj_hash; - struct cfs_hash_bd bd; + struct rhashtable *obj_hash = &site->ls_obj_hash; + struct lu_site_bkt_data *bkt; - cfs_hash_bd_get_and_lock(obj_hash, &top->loh_fid, &bd, 1); - if (!list_empty(&top->loh_lru)) { - struct lu_site_bkt_data *bkt; + bkt = &site->ls_bkts[lu_bkt_hash(site,&top->loh_fid)]; + spin_lock(&bkt->lsb_marche_funebre.lock); - bkt = &site->ls_bkts[lu_bkt_hash(site,&top->loh_fid)]; - spin_lock(&bkt->lsb_marche_funebre.lock); + if (!list_empty(&top->loh_lru)) { list_del_init(&top->loh_lru); - spin_unlock(&bkt->lsb_marche_funebre.lock); percpu_counter_dec(&site->ls_lru_len_counter); } - cfs_hash_bd_del_locked(obj_hash, &bd, &top->loh_hash); - cfs_hash_bd_unlock(obj_hash, &bd, 1); + spin_unlock(&bkt->lsb_marche_funebre.lock); + + rhashtable_remove_fast(obj_hash, &top->loh_hash, obj_hash_params); } } EXPORT_SYMBOL(lu_object_unhash); @@ -419,11 +421,8 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, LINVRNT(lu_bkt_hash(s, &h->loh_fid) == i); - /* Cannot remove from hash under current spinlock, - * so set flag to stop object from being found - * by htable_lookup(). - */ - set_bit(LU_OBJECT_HEARD_BANSHEE, &h->loh_flags); + rhashtable_remove_fast(&s->ls_obj_hash, &h->loh_hash, + obj_hash_params); list_move(&h->loh_lru, &dispose); percpu_counter_dec(&s->ls_lru_len_counter); if (did_sth == 0) @@ -445,7 +444,6 @@ int lu_site_purge_objects(const struct lu_env *env, struct lu_site *s, struct lu_object_header, loh_lru)) != NULL) { list_del_init(&h->loh_lru); - cfs_hash_del(s->ls_obj_hash, &h->loh_fid, &h->loh_hash); lu_object_free(env, lu_object_top(h)); lprocfs_counter_incr(s->ls_stats, LU_SS_LRU_PURGED); } @@ -555,9 +553,9 @@ void lu_object_header_print(const struct lu_env *env, void *cookie, (*printer)(env, cookie, "header@%p[%#lx, %d, " DFID "%s%s%s]", hdr, hdr->loh_flags, atomic_read(&hdr->loh_ref), PFID(&hdr->loh_fid), - hlist_unhashed(&hdr->loh_hash) ? "" : " hash", - list_empty((struct list_head *)&hdr->loh_lru) ? \ - "" : " lru", + test_bit(LU_OBJECT_UNHASHED, + &hdr->loh_flags) ? "" : " hash", + list_empty(&hdr->loh_lru) ? "" : " lru", hdr->loh_attr & LOHA_EXISTS ? " exist":""); } EXPORT_SYMBOL(lu_object_header_print); @@ -594,39 +592,37 @@ void lu_object_print(const struct lu_env *env, void *cookie, EXPORT_SYMBOL(lu_object_print); static struct lu_object *htable_lookup(struct lu_site *s, - struct cfs_hash_bd *bd, + struct lu_site_bkt_data *bkt, const struct lu_fid *f, - __u64 *version) + struct lu_object_header *new) { - struct cfs_hash *hs = s->ls_obj_hash; - struct lu_site_bkt_data *bkt; struct lu_object_header *h; - struct hlist_node *hnode; - __u64 ver; wait_queue_entry_t waiter; retry: - ver = cfs_hash_bd_version_get(bd); - - if (*version == ver) { + rcu_read_lock(); + if (new) + h = rhashtable_lookup_get_insert_fast(&s->ls_obj_hash, &new->loh_hash, + obj_hash_params); + else + h = rhashtable_lookup(&s->ls_obj_hash, f, obj_hash_params); + if (!h) { + /* Not found */ + if (!new) + lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_MISS); + rcu_read_unlock(); return ERR_PTR(-ENOENT); } - - *version = ver; - /* cfs_hash_bd_peek_locked is a somehow "internal" function - * of cfs_hash, it doesn't add refcount on object. - */ - hnode = cfs_hash_bd_peek_locked(s->ls_obj_hash, bd, (void *)f); - if (!hnode) { - lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_MISS); - return ERR_PTR(-ENOENT); + if (atomic_inc_not_zero(&h->loh_ref)) { + rcu_read_unlock(); + return lu_object_top(h); } - h = container_of(hnode, struct lu_object_header, loh_hash); - bkt = &s->ls_bkts[lu_bkt_hash(s, f)]; spin_lock(&bkt->lsb_marche_funebre.lock); if (likely(!lu_object_is_dying(h))) { - cfs_hash_get(s->ls_obj_hash, hnode); + rcu_read_unlock(); + atomic_inc(&h->loh_ref); + lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_HIT); if (!list_empty(&h->loh_lru)) { list_del_init(&h->loh_lru); @@ -635,7 +631,7 @@ static struct lu_object *htable_lookup(struct lu_site *s, spin_unlock(&bkt->lsb_marche_funebre.lock); return lu_object_top(h); } - spin_unlock(&bkt->lsb_marche_funebre.lock); + rcu_read_unlock(); /* * Lookup found an object being destroyed this object cannot be @@ -647,10 +643,9 @@ static struct lu_object *htable_lookup(struct lu_site *s, add_wait_queue(&bkt->lsb_marche_funebre, &waiter); set_current_state(TASK_UNINTERRUPTIBLE); lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_DEATH_RACE); - cfs_hash_bd_unlock(hs, bd, 1); + spin_unlock(&bkt->lsb_marche_funebre.lock); schedule(); remove_wait_queue(&bkt->lsb_marche_funebre, &waiter); - cfs_hash_bd_lock(hs, bd, 1); goto retry; } @@ -681,7 +676,7 @@ static void lu_object_limit(const struct lu_env *env, struct lu_device *dev) if (lu_cache_nr == LU_CACHE_NR_UNLIMITED) return; - size = cfs_hash_size_get(dev->ld_site->ls_obj_hash); + size = atomic_read(&dev->ld_site->ls_obj_hash.nelems); nr = (__u64)lu_cache_nr; if (size <= nr) return; @@ -691,6 +686,35 @@ static void lu_object_limit(const struct lu_env *env, struct lu_device *dev) false); } +/* + * Get a 'first' reference to an object that was found while looking + * through the hash table. + */ +struct lu_object *lu_object_get_first(struct lu_object_header *h, + struct lu_device *dev) +{ + struct lu_object *ret; + struct lu_site *s = dev->ld_site; + + if (IS_ERR_OR_NULL(h) || lu_object_is_dying(h)) + return NULL; + + ret = lu_object_locate(h, dev->ld_type); + if (!ret) + return ret; + if (!atomic_inc_not_zero(&h->loh_ref)) { + struct lu_site_bkt_data *bkt = &s->ls_bkts[lu_bkt_hash(s, &h->loh_fid)]; + + spin_lock(&bkt->lsb_marche_funebre.lock); + if (!lu_object_is_dying(h)) + atomic_inc(&h->loh_ref); + else + ret = NULL; + spin_unlock(&bkt->lsb_marche_funebre.lock); + } + return ret; +} + /** * Much like lu_object_find(), but top level device of object is specifically * \a dev rather than top level device of the site. This interface allows @@ -704,9 +728,8 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, struct lu_object *o; struct lu_object *shadow; struct lu_site *s; - struct cfs_hash *hs; - struct cfs_hash_bd bd; - __u64 version = 0; + struct rhashtable *hs; + struct lu_site_bkt_data *bkt; /* * This uses standard index maintenance protocol: @@ -727,13 +750,11 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, * */ s = dev->ld_site; - hs = s->ls_obj_hash; + hs = &s->ls_obj_hash; + bkt = &s->ls_bkts[lu_bkt_hash(s, f)]; - cfs_hash_bd_get(hs, f, &bd); if (!(conf && conf->loc_flags & LOC_F_NEW)) { - cfs_hash_bd_lock(hs, &bd, 0); - o = htable_lookup(s, &bd, f, &version); - cfs_hash_bd_unlock(hs, &bd, 0); + o = htable_lookup(s, bkt, f, NULL); if (!IS_ERR(o) || PTR_ERR(o) != -ENOENT) return o; @@ -748,15 +769,20 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, LASSERT(lu_fid_eq(lu_object_fid(o), f)); - cfs_hash_bd_lock(hs, &bd, 1); + if (conf && conf->loc_flags & LOC_F_NEW) { + int status = rhashtable_insert_fast(hs, &o->lo_header->loh_hash, + obj_hash_params); + if (status == -EEXIST) + /* Already existed! go the slow way */ + shadow = htable_lookup(s, bkt, f, o->lo_header); + else if (status) + shadow = ERR_PTR(status); + else + shadow = ERR_PTR(-ENOENT); + } else + shadow = htable_lookup(s, bkt, f, o->lo_header); - if (conf && conf->loc_flags & LOC_F_NEW) - shadow = ERR_PTR(-ENOENT); - else - shadow = htable_lookup(s, &bd, f, &version); if (likely(PTR_ERR(shadow) == -ENOENT)) { - cfs_hash_bd_add_locked(hs, &bd, &o->lo_header->loh_hash); - cfs_hash_bd_unlock(hs, &bd, 1); lu_object_limit(env, dev); @@ -764,7 +790,6 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, } lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_RACE); - cfs_hash_bd_unlock(hs, &bd, 1); lu_object_free(env, o); return shadow; } @@ -846,14 +871,9 @@ struct lu_site_print_arg { lu_printer_t lsp_printer; }; -static int -lu_site_obj_print(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *data) +static void +lu_site_obj_print(struct lu_object_header *h, struct lu_site_print_arg *arg) { - struct lu_site_print_arg *arg = (struct lu_site_print_arg *)data; - struct lu_object_header *h; - - h = hlist_entry(hnode, struct lu_object_header, loh_hash); if (!list_empty(&h->loh_layers)) { const struct lu_object *o; @@ -864,7 +884,6 @@ lu_site_obj_print(struct cfs_hash *hs, struct cfs_hash_bd *bd, lu_object_header_print(arg->lsp_env, arg->lsp_cookie, arg->lsp_printer, h); } - return 0; } /** @@ -878,115 +897,20 @@ void lu_site_print(const struct lu_env *env, struct lu_site *s, void *cookie, .lsp_cookie = cookie, .lsp_printer = printer, }; - - cfs_hash_for_each(s->ls_obj_hash, lu_site_obj_print, &arg); -} -EXPORT_SYMBOL(lu_site_print); - -/** - * Return desired hash table order. - */ -static unsigned long lu_htable_order(struct lu_device *top) -{ - unsigned long bits_max = LU_SITE_BITS_MAX; - unsigned long cache_size; - unsigned long bits; - - if (!strcmp(top->ld_type->ldt_name, LUSTRE_VVP_NAME)) - bits_max = LU_SITE_BITS_MAX_CL; - - /* - * Calculate hash table size, assuming that we want reasonable - * performance when 20% of total memory is occupied by cache of - * lu_objects. - * - * Size of lu_object is (arbitrary) taken as 1K (together with inode). - */ - cache_size = totalram_pages; - -#if BITS_PER_LONG == 32 - /* limit hashtable size for lowmem systems to low RAM */ - if (cache_size > 1 << (30 - PAGE_SHIFT)) - cache_size = 1 << (30 - PAGE_SHIFT) * 3 / 4; -#endif - - /* clear off unreasonable cache setting. */ - if (lu_cache_percent == 0 || lu_cache_percent > LU_CACHE_PERCENT_MAX) { - CWARN("obdclass: invalid lu_cache_percent: %u, it must be in the range of (0, %u]. Will use default value: %u.\n", - lu_cache_percent, LU_CACHE_PERCENT_MAX, - LU_CACHE_PERCENT_DEFAULT); - - lu_cache_percent = LU_CACHE_PERCENT_DEFAULT; - } - cache_size = cache_size / 100 * lu_cache_percent * - (PAGE_SIZE / 1024); - - for (bits = 1; (1 << bits) < cache_size; ++bits) - ; - return clamp_t(typeof(bits), bits, LU_SITE_BITS_MIN, bits_max); -} - -static unsigned int lu_obj_hop_hash(struct cfs_hash *hs, - const void *key, unsigned int mask) -{ - struct lu_fid *fid = (struct lu_fid *)key; - __u32 hash; - - hash = fid_flatten32(fid); - hash += (hash >> 4) + (hash << 12); /* mixing oid and seq */ - hash = hash_long(hash, hs->hs_bkt_bits); - - /* give me another random factor */ - hash -= hash_long((unsigned long)hs, fid_oid(fid) % 11 + 3); - - hash <<= hs->hs_cur_bits - hs->hs_bkt_bits; - hash |= (fid_seq(fid) + fid_oid(fid)) & (CFS_HASH_NBKT(hs) - 1); - - return hash & mask; -} - -static void *lu_obj_hop_object(struct hlist_node *hnode) -{ - return hlist_entry(hnode, struct lu_object_header, loh_hash); -} - -static void *lu_obj_hop_key(struct hlist_node *hnode) -{ struct lu_object_header *h; - - h = hlist_entry(hnode, struct lu_object_header, loh_hash); - return &h->loh_fid; -} - -static int lu_obj_hop_keycmp(const void *key, struct hlist_node *hnode) -{ - struct lu_object_header *h; - - h = hlist_entry(hnode, struct lu_object_header, loh_hash); - return lu_fid_eq(&h->loh_fid, (struct lu_fid *)key); -} - -static void lu_obj_hop_get(struct cfs_hash *hs, struct hlist_node *hnode) -{ - struct lu_object_header *h; - - h = hlist_entry(hnode, struct lu_object_header, loh_hash); - atomic_inc(&h->loh_ref); -} - -static void lu_obj_hop_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) -{ - LBUG(); /* we should never called it */ + struct rhashtable_iter iter; + + rhashtable_walk_enter(&s->ls_obj_hash, &iter); + rhashtable_walk_start(&iter); + while ((h = rhashtable_walk_next(&iter)) != NULL) { + if (IS_ERR(h)) + continue; + lu_site_obj_print(h, &arg); + } + rhashtable_walk_stop(&iter); + rhashtable_walk_exit(&iter); } - -static struct cfs_hash_ops lu_site_hash_ops = { - .hs_hash = lu_obj_hop_hash, - .hs_key = lu_obj_hop_key, - .hs_keycmp = lu_obj_hop_keycmp, - .hs_object = lu_obj_hop_object, - .hs_get = lu_obj_hop_get, - .hs_put_locked = lu_obj_hop_put_locked, -}; +EXPORT_SYMBOL(lu_site_print); static void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d) { @@ -1002,9 +926,7 @@ static void lu_dev_add_linkage(struct lu_site *s, struct lu_device *d) int lu_site_init(struct lu_site *s, struct lu_device *top) { struct lu_site_bkt_data *bkt; - unsigned long bits; unsigned long i; - char name[16]; int rc; memset(s, 0, sizeof(*s)); @@ -1014,23 +936,8 @@ int lu_site_init(struct lu_site *s, struct lu_device *top) if (rc) return -ENOMEM; - snprintf(name, sizeof(name), "lu_site_%s", top->ld_type->ldt_name); - for (bits = lu_htable_order(top); bits >= LU_SITE_BITS_MIN; bits--) { - s->ls_obj_hash = cfs_hash_create(name, bits, bits, - bits - LU_SITE_BKT_BITS, - 0, 0, 0, - &lu_site_hash_ops, - CFS_HASH_SPIN_BKTLOCK | - CFS_HASH_NO_ITEMREF | - CFS_HASH_DEPTH | - CFS_HASH_ASSERT_EMPTY | - CFS_HASH_COUNTER); - if (s->ls_obj_hash) - break; - } - - if (!s->ls_obj_hash) { - CERROR("failed to create lu_site hash with bits: %lu\n", bits); + if (rhashtable_init(&s->ls_obj_hash, &obj_hash_params) != 0) { + CERROR("failed to create lu_site hash\n"); return -ENOMEM; } @@ -1038,8 +945,7 @@ int lu_site_init(struct lu_site *s, struct lu_device *top) s->ls_bkt_cnt = roundup_pow_of_two(s->ls_bkt_cnt); s->ls_bkts = kvmalloc_array(s->ls_bkt_cnt, sizeof(*bkt), GFP_KERNEL); if (!s->ls_bkts) { - cfs_hash_putref(s->ls_obj_hash); - s->ls_obj_hash = NULL; + rhashtable_destroy(&s->ls_obj_hash); s->ls_bkts = NULL; return -ENOMEM; } @@ -1052,9 +958,8 @@ int lu_site_init(struct lu_site *s, struct lu_device *top) s->ls_stats = lprocfs_alloc_stats(LU_SS_LAST_STAT, 0); if (!s->ls_stats) { kvfree(s->ls_bkts); - cfs_hash_putref(s->ls_obj_hash); s->ls_bkts = NULL; - s->ls_obj_hash = NULL; + rhashtable_destroy(&s->ls_obj_hash); return -ENOMEM; } @@ -1097,13 +1002,12 @@ void lu_site_fini(struct lu_site *s) percpu_counter_destroy(&s->ls_lru_len_counter); - if (s->ls_obj_hash) { - cfs_hash_putref(s->ls_obj_hash); - s->ls_obj_hash = NULL; + if (s->ls_bkts) { + rhashtable_destroy(&s->ls_obj_hash); + kvfree(s->ls_bkts); + s->ls_bkts = NULL; } - kvfree(s->ls_bkts); - if (s->ls_top_dev) { s->ls_top_dev->ld_site = NULL; lu_ref_del(&s->ls_top_dev->ld_reference, "site-top", s); @@ -1259,7 +1163,6 @@ int lu_object_header_init(struct lu_object_header *h) { memset(h, 0, sizeof(*h)); atomic_set(&h->loh_ref, 1); - INIT_HLIST_NODE(&h->loh_hash); INIT_LIST_HEAD(&h->loh_lru); INIT_LIST_HEAD(&h->loh_layers); lu_ref_init(&h->loh_reference); @@ -1274,7 +1177,6 @@ void lu_object_header_fini(struct lu_object_header *h) { LASSERT(list_empty(&h->loh_layers)); LASSERT(list_empty(&h->loh_lru)); - LASSERT(hlist_unhashed(&h->loh_hash)); lu_ref_fini(&h->loh_reference); } EXPORT_SYMBOL(lu_object_header_fini); @@ -1815,7 +1717,7 @@ struct lu_site_stats { static void lu_site_stats_get(const struct lu_site *s, struct lu_site_stats *stats) { - int cnt = cfs_hash_size_get(s->ls_obj_hash); + int cnt = atomic_read(&s->ls_obj_hash.nelems); /* percpu_counter_read_positive() won't accept a const pointer */ struct lu_site *s2 = (struct lu_site *)s; @@ -2001,15 +1903,21 @@ static __u32 ls_stats_read(struct lprocfs_stats *stats, int idx) int lu_site_stats_print(const struct lu_site *s, struct seq_file *m) { struct lu_site_stats stats; + const struct bucket_table *tbl; + long chains; memset(&stats, 0, sizeof(stats)); lu_site_stats_get(s, &stats); + rcu_read_lock(); + tbl = rht_dereference_rcu(s->ls_obj_hash.tbl, &((struct lu_site *)s)->ls_obj_hash); + chains = tbl->size; + rcu_read_unlock(); seq_printf(m, "%d/%d %d/%ld %d %d %d %d %d %d %d\n", stats.lss_busy, stats.lss_total, stats.lss_populated, - CFS_HASH_NHLIST(s->ls_obj_hash), + chains, stats.lss_max_search, ls_stats_read(s->ls_stats, LU_SS_CREATED), ls_stats_read(s->ls_stats, LU_SS_CACHE_HIT), From neilb at suse.com Wed Apr 11 21:54:49 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 12 Apr 2018 07:54:49 +1000 Subject: [lustre-devel] [PATCH 20/20] staging: lustre: remove cfs_hash resizeable hashtable implementation. In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <152348368922.12394.15220353270157149002.stgit@noble> All users of this library have been converted to use rhashtable. Signed-off-by: NeilBrown --- .../staging/lustre/include/linux/libcfs/libcfs.h | 1 .../lustre/include/linux/libcfs/libcfs_hash.h | 866 -------- drivers/staging/lustre/lnet/libcfs/Makefile | 2 drivers/staging/lustre/lnet/libcfs/hash.c | 2064 -------------------- drivers/staging/lustre/lnet/libcfs/module.c | 12 5 files changed, 1 insertion(+), 2944 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h delete mode 100644 drivers/staging/lustre/lnet/libcfs/hash.c diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index f183f31da387..62e46aa3c554 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -44,7 +44,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h deleted file mode 100644 index 0506f1d45757..000000000000 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +++ /dev/null @@ -1,866 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2012, 2015 Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * libcfs/include/libcfs/libcfs_hash.h - * - * Hashing routines - * - */ - -#ifndef __LIBCFS_HASH_H__ -#define __LIBCFS_HASH_H__ - -#include - -/* - * Knuth recommends primes in approximately golden ratio to the maximum - * integer representable by a machine word for multiplicative hashing. - * Chuck Lever verified the effectiveness of this technique: - * http://www.citi.umich.edu/techreports/reports/citi-tr-00-1.pdf - * - * These primes are chosen to be bit-sparse, that is operations on - * them can use shifts and additions instead of multiplications for - * machines where multiplications are slow. - */ -/* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ -#define CFS_GOLDEN_RATIO_PRIME_32 0x9e370001UL -/* 2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */ -#define CFS_GOLDEN_RATIO_PRIME_64 0x9e37fffffffc0001ULL - -/** disable debug */ -#define CFS_HASH_DEBUG_NONE 0 -/* - * record hash depth and output to console when it's too deep, - * computing overhead is low but consume more memory - */ -#define CFS_HASH_DEBUG_1 1 -/** expensive, check key validation */ -#define CFS_HASH_DEBUG_2 2 - -#define CFS_HASH_DEBUG_LEVEL CFS_HASH_DEBUG_NONE - -struct cfs_hash_ops; -struct cfs_hash_lock_ops; -struct cfs_hash_hlist_ops; - -union cfs_hash_lock { - rwlock_t rw; /**< rwlock */ - spinlock_t spin; /**< spinlock */ -}; - -/** - * cfs_hash_bucket is a container of: - * - lock, counter ... - * - array of hash-head starting from hsb_head[0], hash-head can be one of - * . struct cfs_hash_head - * . struct cfs_hash_head_dep - * . struct cfs_hash_dhead - * . struct cfs_hash_dhead_dep - * which depends on requirement of user - * - some extra bytes (caller can require it while creating hash) - */ -struct cfs_hash_bucket { - union cfs_hash_lock hsb_lock; /**< bucket lock */ - u32 hsb_count; /**< current entries */ - u32 hsb_version; /**< change version */ - unsigned int hsb_index; /**< index of bucket */ - int hsb_depmax; /**< max depth on bucket */ - long hsb_head[0]; /**< hash-head array */ -}; - -/** - * cfs_hash bucket descriptor, it's normally in stack of caller - */ -struct cfs_hash_bd { - /* address of bucket */ - struct cfs_hash_bucket *bd_bucket; - /* offset in bucket */ - unsigned int bd_offset; -}; - -#define CFS_HASH_NAME_LEN 16 /**< default name length */ -#define CFS_HASH_BIGNAME_LEN 64 /**< bigname for param tree */ - -#define CFS_HASH_BKT_BITS 3 /**< default bits of bucket */ -#define CFS_HASH_BITS_MAX 30 /**< max bits of bucket */ -#define CFS_HASH_BITS_MIN CFS_HASH_BKT_BITS - -/** - * common hash attributes. - */ -enum cfs_hash_tag { - /** - * don't need any lock, caller will protect operations with it's - * own lock. With this flag: - * . CFS_HASH_NO_BKTLOCK, CFS_HASH_RW_BKTLOCK, CFS_HASH_SPIN_BKTLOCK - * will be ignored. - * . Some functions will be disabled with this flag, i.e: - * cfs_hash_for_each_empty, cfs_hash_rehash - */ - CFS_HASH_NO_LOCK = BIT(0), - /** no bucket lock, use one spinlock to protect the whole hash */ - CFS_HASH_NO_BKTLOCK = BIT(1), - /** rwlock to protect bucket */ - CFS_HASH_RW_BKTLOCK = BIT(2), - /** spinlock to protect bucket */ - CFS_HASH_SPIN_BKTLOCK = BIT(3), - /** always add new item to tail */ - CFS_HASH_ADD_TAIL = BIT(4), - /** hash-table doesn't have refcount on item */ - CFS_HASH_NO_ITEMREF = BIT(5), - /** big name for param-tree */ - CFS_HASH_BIGNAME = BIT(6), - /** track global count */ - CFS_HASH_COUNTER = BIT(7), - /** rehash item by new key */ - CFS_HASH_REHASH_KEY = BIT(8), - /** Enable dynamic hash resizing */ - CFS_HASH_REHASH = BIT(9), - /** can shrink hash-size */ - CFS_HASH_SHRINK = BIT(10), - /** assert hash is empty on exit */ - CFS_HASH_ASSERT_EMPTY = BIT(11), - /** record hlist depth */ - CFS_HASH_DEPTH = BIT(12), - /** - * rehash is always scheduled in a different thread, so current - * change on hash table is non-blocking - */ - CFS_HASH_NBLK_CHANGE = BIT(13), - /** - * NB, we typed hs_flags as u16, please change it - * if you need to extend >=16 flags - */ -}; - -/** most used attributes */ -#define CFS_HASH_DEFAULT (CFS_HASH_RW_BKTLOCK | \ - CFS_HASH_COUNTER | CFS_HASH_REHASH) - -/** - * cfs_hash is a hash-table implementation for general purpose, it can support: - * . two refcount modes - * hash-table with & without refcount - * . four lock modes - * nolock, one-spinlock, rw-bucket-lock, spin-bucket-lock - * . general operations - * lookup, add(add_tail or add_head), delete - * . rehash - * grows or shrink - * . iteration - * locked iteration and unlocked iteration - * . bigname - * support long name hash - * . debug - * trace max searching depth - * - * Rehash: - * When the htable grows or shrinks, a separate task (cfs_hash_rehash_worker) - * is spawned to handle the rehash in the background, it's possible that other - * processes can concurrently perform additions, deletions, and lookups - * without being blocked on rehash completion, because rehash will release - * the global wrlock for each bucket. - * - * rehash and iteration can't run at the same time because it's too tricky - * to keep both of them safe and correct. - * As they are relatively rare operations, so: - * . if iteration is in progress while we try to launch rehash, then - * it just giveup, iterator will launch rehash at the end. - * . if rehash is in progress while we try to iterate the hash table, - * then we just wait (shouldn't be very long time), anyway, nobody - * should expect iteration of whole hash-table to be non-blocking. - * - * During rehashing, a (key,object) pair may be in one of two buckets, - * depending on whether the worker task has yet to transfer the object - * to its new location in the table. Lookups and deletions need to search both - * locations; additions must take care to only insert into the new bucket. - */ - -struct cfs_hash { - /** - * serialize with rehash, or serialize all operations if - * the hash-table has CFS_HASH_NO_BKTLOCK - */ - union cfs_hash_lock hs_lock; - /** hash operations */ - struct cfs_hash_ops *hs_ops; - /** hash lock operations */ - struct cfs_hash_lock_ops *hs_lops; - /** hash list operations */ - struct cfs_hash_hlist_ops *hs_hops; - /** hash buckets-table */ - struct cfs_hash_bucket **hs_buckets; - /** total number of items on this hash-table */ - atomic_t hs_count; - /** hash flags, see cfs_hash_tag for detail */ - u16 hs_flags; - /** # of extra-bytes for bucket, for user saving extended attributes */ - u16 hs_extra_bytes; - /** wants to iterate */ - u8 hs_iterating; - /** hash-table is dying */ - u8 hs_exiting; - /** current hash bits */ - u8 hs_cur_bits; - /** min hash bits */ - u8 hs_min_bits; - /** max hash bits */ - u8 hs_max_bits; - /** bits for rehash */ - u8 hs_rehash_bits; - /** bits for each bucket */ - u8 hs_bkt_bits; - /** resize min threshold */ - u16 hs_min_theta; - /** resize max threshold */ - u16 hs_max_theta; - /** resize count */ - u32 hs_rehash_count; - /** # of iterators (caller of cfs_hash_for_each_*) */ - u32 hs_iterators; - /** rehash workitem */ - struct work_struct hs_rehash_work; - /** refcount on this hash table */ - atomic_t hs_refcount; - /** rehash buckets-table */ - struct cfs_hash_bucket **hs_rehash_buckets; -#if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 - /** serialize debug members */ - spinlock_t hs_dep_lock; - /** max depth */ - unsigned int hs_dep_max; - /** id of the deepest bucket */ - unsigned int hs_dep_bkt; - /** offset in the deepest bucket */ - unsigned int hs_dep_off; - /** bits when we found the max depth */ - unsigned int hs_dep_bits; - /** workitem to output max depth */ - struct work_struct hs_dep_work; -#endif - /** name of htable */ - char hs_name[0]; -}; - -struct cfs_hash_lock_ops { - /** lock the hash table */ - void (*hs_lock)(union cfs_hash_lock *lock, int exclusive); - /** unlock the hash table */ - void (*hs_unlock)(union cfs_hash_lock *lock, int exclusive); - /** lock the hash bucket */ - void (*hs_bkt_lock)(union cfs_hash_lock *lock, int exclusive); - /** unlock the hash bucket */ - void (*hs_bkt_unlock)(union cfs_hash_lock *lock, int exclusive); -}; - -struct cfs_hash_hlist_ops { - /** return hlist_head of hash-head of @bd */ - struct hlist_head *(*hop_hhead)(struct cfs_hash *hs, - struct cfs_hash_bd *bd); - /** return hash-head size */ - int (*hop_hhead_size)(struct cfs_hash *hs); - /** add @hnode to hash-head of @bd */ - int (*hop_hnode_add)(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode); - /** remove @hnode from hash-head of @bd */ - int (*hop_hnode_del)(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode); -}; - -struct cfs_hash_ops { - /** return hashed value from @key */ - unsigned int (*hs_hash)(struct cfs_hash *hs, const void *key, - unsigned int mask); - /** return key address of @hnode */ - void * (*hs_key)(struct hlist_node *hnode); - /** copy key from @hnode to @key */ - void (*hs_keycpy)(struct hlist_node *hnode, void *key); - /** - * compare @key with key of @hnode - * returns 1 on a match - */ - int (*hs_keycmp)(const void *key, struct hlist_node *hnode); - /** return object address of @hnode, i.e: container_of(...hnode) */ - void * (*hs_object)(struct hlist_node *hnode); - /** get refcount of item, always called with holding bucket-lock */ - void (*hs_get)(struct cfs_hash *hs, struct hlist_node *hnode); - /** release refcount of item */ - void (*hs_put)(struct cfs_hash *hs, struct hlist_node *hnode); - /** release refcount of item, always called with holding bucket-lock */ - void (*hs_put_locked)(struct cfs_hash *hs, - struct hlist_node *hnode); - /** it's called before removing of @hnode */ - void (*hs_exit)(struct cfs_hash *hs, struct hlist_node *hnode); -}; - -/** total number of buckets in @hs */ -#define CFS_HASH_NBKT(hs) \ - BIT((hs)->hs_cur_bits - (hs)->hs_bkt_bits) - -/** total number of buckets in @hs while rehashing */ -#define CFS_HASH_RH_NBKT(hs) \ - BIT((hs)->hs_rehash_bits - (hs)->hs_bkt_bits) - -/** number of hlist for in bucket */ -#define CFS_HASH_BKT_NHLIST(hs) BIT((hs)->hs_bkt_bits) - -/** total number of hlist in @hs */ -#define CFS_HASH_NHLIST(hs) BIT((hs)->hs_cur_bits) - -/** total number of hlist in @hs while rehashing */ -#define CFS_HASH_RH_NHLIST(hs) BIT((hs)->hs_rehash_bits) - -static inline int -cfs_hash_with_no_lock(struct cfs_hash *hs) -{ - /* caller will serialize all operations for this hash-table */ - return hs->hs_flags & CFS_HASH_NO_LOCK; -} - -static inline int -cfs_hash_with_no_bktlock(struct cfs_hash *hs) -{ - /* no bucket lock, one single lock to protect the hash-table */ - return hs->hs_flags & CFS_HASH_NO_BKTLOCK; -} - -static inline int -cfs_hash_with_rw_bktlock(struct cfs_hash *hs) -{ - /* rwlock to protect hash bucket */ - return hs->hs_flags & CFS_HASH_RW_BKTLOCK; -} - -static inline int -cfs_hash_with_spin_bktlock(struct cfs_hash *hs) -{ - /* spinlock to protect hash bucket */ - return hs->hs_flags & CFS_HASH_SPIN_BKTLOCK; -} - -static inline int -cfs_hash_with_add_tail(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_ADD_TAIL; -} - -static inline int -cfs_hash_with_no_itemref(struct cfs_hash *hs) -{ - /* - * hash-table doesn't keep refcount on item, - * item can't be removed from hash unless it's - * ZERO refcount - */ - return hs->hs_flags & CFS_HASH_NO_ITEMREF; -} - -static inline int -cfs_hash_with_bigname(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_BIGNAME; -} - -static inline int -cfs_hash_with_counter(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_COUNTER; -} - -static inline int -cfs_hash_with_rehash(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_REHASH; -} - -static inline int -cfs_hash_with_rehash_key(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_REHASH_KEY; -} - -static inline int -cfs_hash_with_shrink(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_SHRINK; -} - -static inline int -cfs_hash_with_assert_empty(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_ASSERT_EMPTY; -} - -static inline int -cfs_hash_with_depth(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_DEPTH; -} - -static inline int -cfs_hash_with_nblk_change(struct cfs_hash *hs) -{ - return hs->hs_flags & CFS_HASH_NBLK_CHANGE; -} - -static inline int -cfs_hash_is_exiting(struct cfs_hash *hs) -{ - /* cfs_hash_destroy is called */ - return hs->hs_exiting; -} - -static inline int -cfs_hash_is_rehashing(struct cfs_hash *hs) -{ - /* rehash is launched */ - return !!hs->hs_rehash_bits; -} - -static inline int -cfs_hash_is_iterating(struct cfs_hash *hs) -{ - /* someone is calling cfs_hash_for_each_* */ - return hs->hs_iterating || hs->hs_iterators; -} - -static inline int -cfs_hash_bkt_size(struct cfs_hash *hs) -{ - return offsetof(struct cfs_hash_bucket, hsb_head[0]) + - hs->hs_hops->hop_hhead_size(hs) * CFS_HASH_BKT_NHLIST(hs) + - hs->hs_extra_bytes; -} - -static inline unsigned -cfs_hash_id(struct cfs_hash *hs, const void *key, unsigned int mask) -{ - return hs->hs_ops->hs_hash(hs, key, mask); -} - -static inline void * -cfs_hash_key(struct cfs_hash *hs, struct hlist_node *hnode) -{ - return hs->hs_ops->hs_key(hnode); -} - -static inline void -cfs_hash_keycpy(struct cfs_hash *hs, struct hlist_node *hnode, void *key) -{ - if (hs->hs_ops->hs_keycpy) - hs->hs_ops->hs_keycpy(hnode, key); -} - -/** - * Returns 1 on a match, - */ -static inline int -cfs_hash_keycmp(struct cfs_hash *hs, const void *key, struct hlist_node *hnode) -{ - return hs->hs_ops->hs_keycmp(key, hnode); -} - -static inline void * -cfs_hash_object(struct cfs_hash *hs, struct hlist_node *hnode) -{ - return hs->hs_ops->hs_object(hnode); -} - -static inline void -cfs_hash_get(struct cfs_hash *hs, struct hlist_node *hnode) -{ - return hs->hs_ops->hs_get(hs, hnode); -} - -static inline void -cfs_hash_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) -{ - return hs->hs_ops->hs_put_locked(hs, hnode); -} - -static inline void -cfs_hash_put(struct cfs_hash *hs, struct hlist_node *hnode) -{ - return hs->hs_ops->hs_put(hs, hnode); -} - -static inline void -cfs_hash_exit(struct cfs_hash *hs, struct hlist_node *hnode) -{ - if (hs->hs_ops->hs_exit) - hs->hs_ops->hs_exit(hs, hnode); -} - -static inline void cfs_hash_lock(struct cfs_hash *hs, int excl) -{ - hs->hs_lops->hs_lock(&hs->hs_lock, excl); -} - -static inline void cfs_hash_unlock(struct cfs_hash *hs, int excl) -{ - hs->hs_lops->hs_unlock(&hs->hs_lock, excl); -} - -static inline int cfs_hash_dec_and_lock(struct cfs_hash *hs, - atomic_t *condition) -{ - LASSERT(cfs_hash_with_no_bktlock(hs)); - return atomic_dec_and_lock(condition, &hs->hs_lock.spin); -} - -static inline void cfs_hash_bd_lock(struct cfs_hash *hs, - struct cfs_hash_bd *bd, int excl) -{ - hs->hs_lops->hs_bkt_lock(&bd->bd_bucket->hsb_lock, excl); -} - -static inline void cfs_hash_bd_unlock(struct cfs_hash *hs, - struct cfs_hash_bd *bd, int excl) -{ - hs->hs_lops->hs_bkt_unlock(&bd->bd_bucket->hsb_lock, excl); -} - -/** - * operations on cfs_hash bucket (bd: bucket descriptor), - * they are normally for hash-table without rehash - */ -void cfs_hash_bd_get(struct cfs_hash *hs, const void *key, - struct cfs_hash_bd *bd); - -static inline void -cfs_hash_bd_get_and_lock(struct cfs_hash *hs, const void *key, - struct cfs_hash_bd *bd, int excl) -{ - cfs_hash_bd_get(hs, key, bd); - cfs_hash_bd_lock(hs, bd, excl); -} - -static inline unsigned -cfs_hash_bd_index_get(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - return bd->bd_offset | (bd->bd_bucket->hsb_index << hs->hs_bkt_bits); -} - -static inline void -cfs_hash_bd_index_set(struct cfs_hash *hs, unsigned int index, - struct cfs_hash_bd *bd) -{ - bd->bd_bucket = hs->hs_buckets[index >> hs->hs_bkt_bits]; - bd->bd_offset = index & (CFS_HASH_BKT_NHLIST(hs) - 1U); -} - -static inline void * -cfs_hash_bd_extra_get(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - return (void *)bd->bd_bucket + - cfs_hash_bkt_size(hs) - hs->hs_extra_bytes; -} - -static inline u32 -cfs_hash_bd_version_get(struct cfs_hash_bd *bd) -{ - /* need hold cfs_hash_bd_lock */ - return bd->bd_bucket->hsb_version; -} - -static inline u32 -cfs_hash_bd_count_get(struct cfs_hash_bd *bd) -{ - /* need hold cfs_hash_bd_lock */ - return bd->bd_bucket->hsb_count; -} - -static inline int -cfs_hash_bd_depmax_get(struct cfs_hash_bd *bd) -{ - return bd->bd_bucket->hsb_depmax; -} - -static inline int -cfs_hash_bd_compare(struct cfs_hash_bd *bd1, struct cfs_hash_bd *bd2) -{ - if (bd1->bd_bucket->hsb_index != bd2->bd_bucket->hsb_index) - return bd1->bd_bucket->hsb_index - bd2->bd_bucket->hsb_index; - - if (bd1->bd_offset != bd2->bd_offset) - return bd1->bd_offset - bd2->bd_offset; - - return 0; -} - -void cfs_hash_bd_add_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode); -void cfs_hash_bd_del_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode); -void cfs_hash_bd_move_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd_old, - struct cfs_hash_bd *bd_new, - struct hlist_node *hnode); - -static inline int -cfs_hash_bd_dec_and_lock(struct cfs_hash *hs, struct cfs_hash_bd *bd, - atomic_t *condition) -{ - LASSERT(cfs_hash_with_spin_bktlock(hs)); - return atomic_dec_and_lock(condition, &bd->bd_bucket->hsb_lock.spin); -} - -static inline struct hlist_head * -cfs_hash_bd_hhead(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - return hs->hs_hops->hop_hhead(hs, bd); -} - -struct hlist_node * -cfs_hash_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - const void *key); -struct hlist_node * -cfs_hash_bd_peek_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - const void *key); - -/** - * operations on cfs_hash bucket (bd: bucket descriptor), - * they are safe for hash-table with rehash - */ -void cfs_hash_dual_bd_get(struct cfs_hash *hs, const void *key, - struct cfs_hash_bd *bds); -void cfs_hash_dual_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds, - int excl); -void cfs_hash_dual_bd_unlock(struct cfs_hash *hs, struct cfs_hash_bd *bds, - int excl); - -static inline void -cfs_hash_dual_bd_get_and_lock(struct cfs_hash *hs, const void *key, - struct cfs_hash_bd *bds, int excl) -{ - cfs_hash_dual_bd_get(hs, key, bds); - cfs_hash_dual_bd_lock(hs, bds, excl); -} - -struct hlist_node * -cfs_hash_dual_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - const void *key); -struct hlist_node * -cfs_hash_dual_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - const void *key, struct hlist_node *hnode, - int insist_add); -struct hlist_node * -cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - const void *key, struct hlist_node *hnode); - -/* Hash init/cleanup functions */ -struct cfs_hash * -cfs_hash_create(char *name, unsigned int cur_bits, unsigned int max_bits, - unsigned int bkt_bits, unsigned int extra_bytes, - unsigned int min_theta, unsigned int max_theta, - struct cfs_hash_ops *ops, unsigned int flags); - -struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs); -void cfs_hash_putref(struct cfs_hash *hs); - -/* Hash addition functions */ -void cfs_hash_add(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode); -int cfs_hash_add_unique(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode); -void *cfs_hash_findadd_unique(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode); - -/* Hash deletion functions */ -void *cfs_hash_del(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode); -void *cfs_hash_del_key(struct cfs_hash *hs, const void *key); - -/* Hash lookup/for_each functions */ -#define CFS_HASH_LOOP_HOG 1024 - -typedef int (*cfs_hash_for_each_cb_t)(struct cfs_hash *hs, - struct cfs_hash_bd *bd, - struct hlist_node *node, - void *data); -void * -cfs_hash_lookup(struct cfs_hash *hs, const void *key); -void -cfs_hash_for_each(struct cfs_hash *hs, cfs_hash_for_each_cb_t cb, void *data); -void -cfs_hash_for_each_safe(struct cfs_hash *hs, cfs_hash_for_each_cb_t cb, - void *data); -int -cfs_hash_for_each_nolock(struct cfs_hash *hs, cfs_hash_for_each_cb_t cb, - void *data, int start); -int -cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t cb, - void *data); -void -cfs_hash_for_each_key(struct cfs_hash *hs, const void *key, - cfs_hash_for_each_cb_t cb, void *data); -typedef int (*cfs_hash_cond_opt_cb_t)(void *obj, void *data); -void -cfs_hash_cond_del(struct cfs_hash *hs, cfs_hash_cond_opt_cb_t cb, void *data); - -void -cfs_hash_hlist_for_each(struct cfs_hash *hs, unsigned int hindex, - cfs_hash_for_each_cb_t cb, void *data); -int cfs_hash_is_empty(struct cfs_hash *hs); -u64 cfs_hash_size_get(struct cfs_hash *hs); - -/* - * Rehash - Theta is calculated to be the average chained - * hash depth assuming a perfectly uniform hash function. - */ -void cfs_hash_rehash_cancel_locked(struct cfs_hash *hs); -void cfs_hash_rehash_cancel(struct cfs_hash *hs); -void cfs_hash_rehash(struct cfs_hash *hs, int do_rehash); -void cfs_hash_rehash_key(struct cfs_hash *hs, const void *old_key, - void *new_key, struct hlist_node *hnode); - -#if CFS_HASH_DEBUG_LEVEL > CFS_HASH_DEBUG_1 -/* Validate hnode references the correct key */ -static inline void -cfs_hash_key_validate(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode) -{ - LASSERT(cfs_hash_keycmp(hs, key, hnode)); -} - -/* Validate hnode is in the correct bucket */ -static inline void -cfs_hash_bucket_validate(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - struct cfs_hash_bd bds[2]; - - cfs_hash_dual_bd_get(hs, cfs_hash_key(hs, hnode), bds); - LASSERT(bds[0].bd_bucket == bd->bd_bucket || - bds[1].bd_bucket == bd->bd_bucket); -} - -#else /* CFS_HASH_DEBUG_LEVEL > CFS_HASH_DEBUG_1 */ - -static inline void -cfs_hash_key_validate(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode) {} - -static inline void -cfs_hash_bucket_validate(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) {} - -#endif /* CFS_HASH_DEBUG_LEVEL */ - -#define CFS_HASH_THETA_BITS 10 -#define CFS_HASH_MIN_THETA BIT(CFS_HASH_THETA_BITS - 1) -#define CFS_HASH_MAX_THETA BIT(CFS_HASH_THETA_BITS + 1) - -/* Return integer component of theta */ -static inline int __cfs_hash_theta_int(int theta) -{ - return (theta >> CFS_HASH_THETA_BITS); -} - -/* Return a fractional value between 0 and 999 */ -static inline int __cfs_hash_theta_frac(int theta) -{ - return ((theta * 1000) >> CFS_HASH_THETA_BITS) - - (__cfs_hash_theta_int(theta) * 1000); -} - -static inline int __cfs_hash_theta(struct cfs_hash *hs) -{ - return (atomic_read(&hs->hs_count) << - CFS_HASH_THETA_BITS) >> hs->hs_cur_bits; -} - -static inline void -__cfs_hash_set_theta(struct cfs_hash *hs, int min, int max) -{ - LASSERT(min < max); - hs->hs_min_theta = (u16)min; - hs->hs_max_theta = (u16)max; -} - -/* Generic debug formatting routines mainly for proc handler */ -struct seq_file; -void cfs_hash_debug_header(struct seq_file *m); -void cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m); - -/* - * Generic djb2 hash algorithm for character arrays. - */ -static inline unsigned -cfs_hash_djb2_hash(const void *key, size_t size, unsigned int mask) -{ - unsigned int i, hash = 5381; - - LASSERT(key); - - for (i = 0; i < size; i++) - hash = hash * 33 + ((char *)key)[i]; - - return (hash & mask); -} - -/* - * Generic u32 hash algorithm. - */ -static inline unsigned -cfs_hash_u32_hash(const u32 key, unsigned int mask) -{ - return ((key * CFS_GOLDEN_RATIO_PRIME_32) & mask); -} - -/* - * Generic u64 hash algorithm. - */ -static inline unsigned -cfs_hash_u64_hash(const u64 key, unsigned int mask) -{ - return ((unsigned int)(key * CFS_GOLDEN_RATIO_PRIME_64) & mask); -} - -/** iterate over all buckets in @bds (array of struct cfs_hash_bd) */ -#define cfs_hash_for_each_bd(bds, n, i) \ - for (i = 0; i < n && (bds)[i].bd_bucket != NULL; i++) - -/** iterate over all buckets of @hs */ -#define cfs_hash_for_each_bucket(hs, bd, pos) \ - for (pos = 0; \ - pos < CFS_HASH_NBKT(hs) && \ - ((bd)->bd_bucket = (hs)->hs_buckets[pos]) != NULL; pos++) - -/** iterate over all hlist of bucket @bd */ -#define cfs_hash_bd_for_each_hlist(hs, bd, hlist) \ - for ((bd)->bd_offset = 0; \ - (bd)->bd_offset < CFS_HASH_BKT_NHLIST(hs) && \ - (hlist = cfs_hash_bd_hhead(hs, bd)) != NULL; \ - (bd)->bd_offset++) - -/* !__LIBCFS__HASH_H__ */ -#endif diff --git a/drivers/staging/lustre/lnet/libcfs/Makefile b/drivers/staging/lustre/lnet/libcfs/Makefile index b7dc7ac11cc5..36b49a6b7b88 100644 --- a/drivers/staging/lustre/lnet/libcfs/Makefile +++ b/drivers/staging/lustre/lnet/libcfs/Makefile @@ -13,7 +13,7 @@ libcfs-linux-objs += linux-crypto-adler.o libcfs-linux-objs := $(addprefix linux/,$(libcfs-linux-objs)) libcfs-all-objs := debug.o fail.o module.o tracefile.o \ - libcfs_string.o hash.o \ + libcfs_string.o \ libcfs_cpu.o libcfs_mem.o libcfs_lock.o libcfs-objs := $(libcfs-linux-objs) $(libcfs-all-objs) diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c deleted file mode 100644 index f7b3c9306456..000000000000 --- a/drivers/staging/lustre/lnet/libcfs/hash.c +++ /dev/null @@ -1,2064 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * libcfs/libcfs/hash.c - * - * Implement a hash class for hash process in lustre system. - * - * Author: YuZhangyong - * - * 2008-08-15: Brian Behlendorf - * - Simplified API and improved documentation - * - Added per-hash feature flags: - * * CFS_HASH_DEBUG additional validation - * * CFS_HASH_REHASH dynamic rehashing - * - Added per-hash statistics - * - General performance enhancements - * - * 2009-07-31: Liang Zhen - * - move all stuff to libcfs - * - don't allow cur_bits != max_bits without setting of CFS_HASH_REHASH - * - ignore hs_rwlock if without CFS_HASH_REHASH setting - * - buckets are allocated one by one(instead of contiguous memory), - * to avoid unnecessary cacheline conflict - * - * 2010-03-01: Liang Zhen - * - "bucket" is a group of hlist_head now, user can specify bucket size - * by bkt_bits of cfs_hash_create(), all hlist_heads in a bucket share - * one lock for reducing memory overhead. - * - * - support lockless hash, caller will take care of locks: - * avoid lock overhead for hash tables that are already protected - * by locking in the caller for another reason - * - * - support both spin_lock/rwlock for bucket: - * overhead of spinlock contention is lower than read/write - * contention of rwlock, so using spinlock to serialize operations on - * bucket is more reasonable for those frequently changed hash tables - * - * - support one-single lock mode: - * one lock to protect all hash operations to avoid overhead of - * multiple locks if hash table is always small - * - * - removed a lot of unnecessary addref & decref on hash element: - * addref & decref are atomic operations in many use-cases which - * are expensive. - * - * - support non-blocking cfs_hash_add() and cfs_hash_findadd(): - * some lustre use-cases require these functions to be strictly - * non-blocking, we need to schedule required rehash on a different - * thread on those cases. - * - * - safer rehash on large hash table - * In old implementation, rehash function will exclusively lock the - * hash table and finish rehash in one batch, it's dangerous on SMP - * system because rehash millions of elements could take long time. - * New implemented rehash can release lock and relax CPU in middle - * of rehash, it's safe for another thread to search/change on the - * hash table even it's in rehasing. - * - * - support two different refcount modes - * . hash table has refcount on element - * . hash table doesn't change refcount on adding/removing element - * - * - support long name hash table (for param-tree) - * - * - fix a bug for cfs_hash_rehash_key: - * in old implementation, cfs_hash_rehash_key could screw up the - * hash-table because @key is overwritten without any protection. - * Now we need user to define hs_keycpy for those rehash enabled - * hash tables, cfs_hash_rehash_key will overwrite hash-key - * inside lock by calling hs_keycpy. - * - * - better hash iteration: - * Now we support both locked iteration & lockless iteration of hash - * table. Also, user can break the iteration by return 1 in callback. - */ -#include -#include - -#include - -#if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 -static unsigned int warn_on_depth = 8; -module_param(warn_on_depth, uint, 0644); -MODULE_PARM_DESC(warn_on_depth, "warning when hash depth is high."); -#endif - -struct workqueue_struct *cfs_rehash_wq; - -static inline void -cfs_hash_nl_lock(union cfs_hash_lock *lock, int exclusive) {} - -static inline void -cfs_hash_nl_unlock(union cfs_hash_lock *lock, int exclusive) {} - -static inline void -cfs_hash_spin_lock(union cfs_hash_lock *lock, int exclusive) - __acquires(&lock->spin) -{ - spin_lock(&lock->spin); -} - -static inline void -cfs_hash_spin_unlock(union cfs_hash_lock *lock, int exclusive) - __releases(&lock->spin) -{ - spin_unlock(&lock->spin); -} - -static inline void -cfs_hash_rw_lock(union cfs_hash_lock *lock, int exclusive) - __acquires(&lock->rw) -{ - if (!exclusive) - read_lock(&lock->rw); - else - write_lock(&lock->rw); -} - -static inline void -cfs_hash_rw_unlock(union cfs_hash_lock *lock, int exclusive) - __releases(&lock->rw) -{ - if (!exclusive) - read_unlock(&lock->rw); - else - write_unlock(&lock->rw); -} - -/** No lock hash */ -static struct cfs_hash_lock_ops cfs_hash_nl_lops = { - .hs_lock = cfs_hash_nl_lock, - .hs_unlock = cfs_hash_nl_unlock, - .hs_bkt_lock = cfs_hash_nl_lock, - .hs_bkt_unlock = cfs_hash_nl_unlock, -}; - -/** no bucket lock, one spinlock to protect everything */ -static struct cfs_hash_lock_ops cfs_hash_nbl_lops = { - .hs_lock = cfs_hash_spin_lock, - .hs_unlock = cfs_hash_spin_unlock, - .hs_bkt_lock = cfs_hash_nl_lock, - .hs_bkt_unlock = cfs_hash_nl_unlock, -}; - -/** spin bucket lock, rehash is enabled */ -static struct cfs_hash_lock_ops cfs_hash_bkt_spin_lops = { - .hs_lock = cfs_hash_rw_lock, - .hs_unlock = cfs_hash_rw_unlock, - .hs_bkt_lock = cfs_hash_spin_lock, - .hs_bkt_unlock = cfs_hash_spin_unlock, -}; - -/** rw bucket lock, rehash is enabled */ -static struct cfs_hash_lock_ops cfs_hash_bkt_rw_lops = { - .hs_lock = cfs_hash_rw_lock, - .hs_unlock = cfs_hash_rw_unlock, - .hs_bkt_lock = cfs_hash_rw_lock, - .hs_bkt_unlock = cfs_hash_rw_unlock, -}; - -/** spin bucket lock, rehash is disabled */ -static struct cfs_hash_lock_ops cfs_hash_nr_bkt_spin_lops = { - .hs_lock = cfs_hash_nl_lock, - .hs_unlock = cfs_hash_nl_unlock, - .hs_bkt_lock = cfs_hash_spin_lock, - .hs_bkt_unlock = cfs_hash_spin_unlock, -}; - -/** rw bucket lock, rehash is disabled */ -static struct cfs_hash_lock_ops cfs_hash_nr_bkt_rw_lops = { - .hs_lock = cfs_hash_nl_lock, - .hs_unlock = cfs_hash_nl_unlock, - .hs_bkt_lock = cfs_hash_rw_lock, - .hs_bkt_unlock = cfs_hash_rw_unlock, -}; - -static void -cfs_hash_lock_setup(struct cfs_hash *hs) -{ - if (cfs_hash_with_no_lock(hs)) { - hs->hs_lops = &cfs_hash_nl_lops; - - } else if (cfs_hash_with_no_bktlock(hs)) { - hs->hs_lops = &cfs_hash_nbl_lops; - spin_lock_init(&hs->hs_lock.spin); - - } else if (cfs_hash_with_rehash(hs)) { - rwlock_init(&hs->hs_lock.rw); - - if (cfs_hash_with_rw_bktlock(hs)) - hs->hs_lops = &cfs_hash_bkt_rw_lops; - else if (cfs_hash_with_spin_bktlock(hs)) - hs->hs_lops = &cfs_hash_bkt_spin_lops; - else - LBUG(); - } else { - if (cfs_hash_with_rw_bktlock(hs)) - hs->hs_lops = &cfs_hash_nr_bkt_rw_lops; - else if (cfs_hash_with_spin_bktlock(hs)) - hs->hs_lops = &cfs_hash_nr_bkt_spin_lops; - else - LBUG(); - } -} - -/** - * Simple hash head without depth tracking - * new element is always added to head of hlist - */ -struct cfs_hash_head { - struct hlist_head hh_head; /**< entries list */ -}; - -static int -cfs_hash_hh_hhead_size(struct cfs_hash *hs) -{ - return sizeof(struct cfs_hash_head); -} - -static struct hlist_head * -cfs_hash_hh_hhead(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - struct cfs_hash_head *head; - - head = (struct cfs_hash_head *)&bd->bd_bucket->hsb_head[0]; - return &head[bd->bd_offset].hh_head; -} - -static int -cfs_hash_hh_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - hlist_add_head(hnode, cfs_hash_hh_hhead(hs, bd)); - return -1; /* unknown depth */ -} - -static int -cfs_hash_hh_hnode_del(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - hlist_del_init(hnode); - return -1; /* unknown depth */ -} - -/** - * Simple hash head with depth tracking - * new element is always added to head of hlist - */ -struct cfs_hash_head_dep { - struct hlist_head hd_head; /**< entries list */ - unsigned int hd_depth; /**< list length */ -}; - -static int -cfs_hash_hd_hhead_size(struct cfs_hash *hs) -{ - return sizeof(struct cfs_hash_head_dep); -} - -static struct hlist_head * -cfs_hash_hd_hhead(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - struct cfs_hash_head_dep *head; - - head = (struct cfs_hash_head_dep *)&bd->bd_bucket->hsb_head[0]; - return &head[bd->bd_offset].hd_head; -} - -static int -cfs_hash_hd_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - struct cfs_hash_head_dep *hh; - - hh = container_of(cfs_hash_hd_hhead(hs, bd), - struct cfs_hash_head_dep, hd_head); - hlist_add_head(hnode, &hh->hd_head); - return ++hh->hd_depth; -} - -static int -cfs_hash_hd_hnode_del(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - struct cfs_hash_head_dep *hh; - - hh = container_of(cfs_hash_hd_hhead(hs, bd), - struct cfs_hash_head_dep, hd_head); - hlist_del_init(hnode); - return --hh->hd_depth; -} - -/** - * double links hash head without depth tracking - * new element is always added to tail of hlist - */ -struct cfs_hash_dhead { - struct hlist_head dh_head; /**< entries list */ - struct hlist_node *dh_tail; /**< the last entry */ -}; - -static int -cfs_hash_dh_hhead_size(struct cfs_hash *hs) -{ - return sizeof(struct cfs_hash_dhead); -} - -static struct hlist_head * -cfs_hash_dh_hhead(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - struct cfs_hash_dhead *head; - - head = (struct cfs_hash_dhead *)&bd->bd_bucket->hsb_head[0]; - return &head[bd->bd_offset].dh_head; -} - -static int -cfs_hash_dh_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - struct cfs_hash_dhead *dh; - - dh = container_of(cfs_hash_dh_hhead(hs, bd), - struct cfs_hash_dhead, dh_head); - if (dh->dh_tail) /* not empty */ - hlist_add_behind(hnode, dh->dh_tail); - else /* empty list */ - hlist_add_head(hnode, &dh->dh_head); - dh->dh_tail = hnode; - return -1; /* unknown depth */ -} - -static int -cfs_hash_dh_hnode_del(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnd) -{ - struct cfs_hash_dhead *dh; - - dh = container_of(cfs_hash_dh_hhead(hs, bd), - struct cfs_hash_dhead, dh_head); - if (!hnd->next) { /* it's the tail */ - dh->dh_tail = (hnd->pprev == &dh->dh_head.first) ? NULL : - container_of(hnd->pprev, struct hlist_node, next); - } - hlist_del_init(hnd); - return -1; /* unknown depth */ -} - -/** - * double links hash head with depth tracking - * new element is always added to tail of hlist - */ -struct cfs_hash_dhead_dep { - struct hlist_head dd_head; /**< entries list */ - struct hlist_node *dd_tail; /**< the last entry */ - unsigned int dd_depth; /**< list length */ -}; - -static int -cfs_hash_dd_hhead_size(struct cfs_hash *hs) -{ - return sizeof(struct cfs_hash_dhead_dep); -} - -static struct hlist_head * -cfs_hash_dd_hhead(struct cfs_hash *hs, struct cfs_hash_bd *bd) -{ - struct cfs_hash_dhead_dep *head; - - head = (struct cfs_hash_dhead_dep *)&bd->bd_bucket->hsb_head[0]; - return &head[bd->bd_offset].dd_head; -} - -static int -cfs_hash_dd_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - struct cfs_hash_dhead_dep *dh; - - dh = container_of(cfs_hash_dd_hhead(hs, bd), - struct cfs_hash_dhead_dep, dd_head); - if (dh->dd_tail) /* not empty */ - hlist_add_behind(hnode, dh->dd_tail); - else /* empty list */ - hlist_add_head(hnode, &dh->dd_head); - dh->dd_tail = hnode; - return ++dh->dd_depth; -} - -static int -cfs_hash_dd_hnode_del(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnd) -{ - struct cfs_hash_dhead_dep *dh; - - dh = container_of(cfs_hash_dd_hhead(hs, bd), - struct cfs_hash_dhead_dep, dd_head); - if (!hnd->next) { /* it's the tail */ - dh->dd_tail = (hnd->pprev == &dh->dd_head.first) ? NULL : - container_of(hnd->pprev, struct hlist_node, next); - } - hlist_del_init(hnd); - return --dh->dd_depth; -} - -static struct cfs_hash_hlist_ops cfs_hash_hh_hops = { - .hop_hhead = cfs_hash_hh_hhead, - .hop_hhead_size = cfs_hash_hh_hhead_size, - .hop_hnode_add = cfs_hash_hh_hnode_add, - .hop_hnode_del = cfs_hash_hh_hnode_del, -}; - -static struct cfs_hash_hlist_ops cfs_hash_hd_hops = { - .hop_hhead = cfs_hash_hd_hhead, - .hop_hhead_size = cfs_hash_hd_hhead_size, - .hop_hnode_add = cfs_hash_hd_hnode_add, - .hop_hnode_del = cfs_hash_hd_hnode_del, -}; - -static struct cfs_hash_hlist_ops cfs_hash_dh_hops = { - .hop_hhead = cfs_hash_dh_hhead, - .hop_hhead_size = cfs_hash_dh_hhead_size, - .hop_hnode_add = cfs_hash_dh_hnode_add, - .hop_hnode_del = cfs_hash_dh_hnode_del, -}; - -static struct cfs_hash_hlist_ops cfs_hash_dd_hops = { - .hop_hhead = cfs_hash_dd_hhead, - .hop_hhead_size = cfs_hash_dd_hhead_size, - .hop_hnode_add = cfs_hash_dd_hnode_add, - .hop_hnode_del = cfs_hash_dd_hnode_del, -}; - -static void -cfs_hash_hlist_setup(struct cfs_hash *hs) -{ - if (cfs_hash_with_add_tail(hs)) { - hs->hs_hops = cfs_hash_with_depth(hs) ? - &cfs_hash_dd_hops : &cfs_hash_dh_hops; - } else { - hs->hs_hops = cfs_hash_with_depth(hs) ? - &cfs_hash_hd_hops : &cfs_hash_hh_hops; - } -} - -static void -cfs_hash_bd_from_key(struct cfs_hash *hs, struct cfs_hash_bucket **bkts, - unsigned int bits, const void *key, struct cfs_hash_bd *bd) -{ - unsigned int index = cfs_hash_id(hs, key, (1U << bits) - 1); - - LASSERT(bits == hs->hs_cur_bits || bits == hs->hs_rehash_bits); - - bd->bd_bucket = bkts[index & ((1U << (bits - hs->hs_bkt_bits)) - 1)]; - bd->bd_offset = index >> (bits - hs->hs_bkt_bits); -} - -void -cfs_hash_bd_get(struct cfs_hash *hs, const void *key, struct cfs_hash_bd *bd) -{ - /* NB: caller should hold hs->hs_rwlock if REHASH is set */ - if (likely(!hs->hs_rehash_buckets)) { - cfs_hash_bd_from_key(hs, hs->hs_buckets, - hs->hs_cur_bits, key, bd); - } else { - LASSERT(hs->hs_rehash_bits); - cfs_hash_bd_from_key(hs, hs->hs_rehash_buckets, - hs->hs_rehash_bits, key, bd); - } -} -EXPORT_SYMBOL(cfs_hash_bd_get); - -static inline void -cfs_hash_bd_dep_record(struct cfs_hash *hs, struct cfs_hash_bd *bd, int dep_cur) -{ - if (likely(dep_cur <= bd->bd_bucket->hsb_depmax)) - return; - - bd->bd_bucket->hsb_depmax = dep_cur; -# if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 - if (likely(!warn_on_depth || - max(warn_on_depth, hs->hs_dep_max) >= dep_cur)) - return; - - spin_lock(&hs->hs_dep_lock); - hs->hs_dep_max = dep_cur; - hs->hs_dep_bkt = bd->bd_bucket->hsb_index; - hs->hs_dep_off = bd->bd_offset; - hs->hs_dep_bits = hs->hs_cur_bits; - spin_unlock(&hs->hs_dep_lock); - - queue_work(cfs_rehash_wq, &hs->hs_dep_work); -# endif -} - -void -cfs_hash_bd_add_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - int rc; - - rc = hs->hs_hops->hop_hnode_add(hs, bd, hnode); - cfs_hash_bd_dep_record(hs, bd, rc); - bd->bd_bucket->hsb_version++; - if (unlikely(!bd->bd_bucket->hsb_version)) - bd->bd_bucket->hsb_version++; - bd->bd_bucket->hsb_count++; - - if (cfs_hash_with_counter(hs)) - atomic_inc(&hs->hs_count); - if (!cfs_hash_with_no_itemref(hs)) - cfs_hash_get(hs, hnode); -} -EXPORT_SYMBOL(cfs_hash_bd_add_locked); - -void -cfs_hash_bd_del_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode) -{ - hs->hs_hops->hop_hnode_del(hs, bd, hnode); - - LASSERT(bd->bd_bucket->hsb_count > 0); - bd->bd_bucket->hsb_count--; - bd->bd_bucket->hsb_version++; - if (unlikely(!bd->bd_bucket->hsb_version)) - bd->bd_bucket->hsb_version++; - - if (cfs_hash_with_counter(hs)) { - LASSERT(atomic_read(&hs->hs_count) > 0); - atomic_dec(&hs->hs_count); - } - if (!cfs_hash_with_no_itemref(hs)) - cfs_hash_put_locked(hs, hnode); -} -EXPORT_SYMBOL(cfs_hash_bd_del_locked); - -void -cfs_hash_bd_move_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd_old, - struct cfs_hash_bd *bd_new, struct hlist_node *hnode) -{ - struct cfs_hash_bucket *obkt = bd_old->bd_bucket; - struct cfs_hash_bucket *nbkt = bd_new->bd_bucket; - int rc; - - if (!cfs_hash_bd_compare(bd_old, bd_new)) - return; - - /* use cfs_hash_bd_hnode_add/del, to avoid atomic & refcount ops - * in cfs_hash_bd_del/add_locked - */ - hs->hs_hops->hop_hnode_del(hs, bd_old, hnode); - rc = hs->hs_hops->hop_hnode_add(hs, bd_new, hnode); - cfs_hash_bd_dep_record(hs, bd_new, rc); - - LASSERT(obkt->hsb_count > 0); - obkt->hsb_count--; - obkt->hsb_version++; - if (unlikely(!obkt->hsb_version)) - obkt->hsb_version++; - nbkt->hsb_count++; - nbkt->hsb_version++; - if (unlikely(!nbkt->hsb_version)) - nbkt->hsb_version++; -} - -enum { - /** always set, for sanity (avoid ZERO intent) */ - CFS_HS_LOOKUP_MASK_FIND = BIT(0), - /** return entry with a ref */ - CFS_HS_LOOKUP_MASK_REF = BIT(1), - /** add entry if not existing */ - CFS_HS_LOOKUP_MASK_ADD = BIT(2), - /** delete entry, ignore other masks */ - CFS_HS_LOOKUP_MASK_DEL = BIT(3), -}; - -enum cfs_hash_lookup_intent { - /** return item w/o refcount */ - CFS_HS_LOOKUP_IT_PEEK = CFS_HS_LOOKUP_MASK_FIND, - /** return item with refcount */ - CFS_HS_LOOKUP_IT_FIND = (CFS_HS_LOOKUP_MASK_FIND | - CFS_HS_LOOKUP_MASK_REF), - /** return item w/o refcount if existed, otherwise add */ - CFS_HS_LOOKUP_IT_ADD = (CFS_HS_LOOKUP_MASK_FIND | - CFS_HS_LOOKUP_MASK_ADD), - /** return item with refcount if existed, otherwise add */ - CFS_HS_LOOKUP_IT_FINDADD = (CFS_HS_LOOKUP_IT_FIND | - CFS_HS_LOOKUP_MASK_ADD), - /** delete if existed */ - CFS_HS_LOOKUP_IT_FINDDEL = (CFS_HS_LOOKUP_MASK_FIND | - CFS_HS_LOOKUP_MASK_DEL) -}; - -static struct hlist_node * -cfs_hash_bd_lookup_intent(struct cfs_hash *hs, struct cfs_hash_bd *bd, - const void *key, struct hlist_node *hnode, - enum cfs_hash_lookup_intent intent) - -{ - struct hlist_head *hhead = cfs_hash_bd_hhead(hs, bd); - struct hlist_node *ehnode; - struct hlist_node *match; - int intent_add = intent & CFS_HS_LOOKUP_MASK_ADD; - - /* with this function, we can avoid a lot of useless refcount ops, - * which are expensive atomic operations most time. - */ - match = intent_add ? NULL : hnode; - hlist_for_each(ehnode, hhead) { - if (!cfs_hash_keycmp(hs, key, ehnode)) - continue; - - if (match && match != ehnode) /* can't match */ - continue; - - /* match and ... */ - if (intent & CFS_HS_LOOKUP_MASK_DEL) { - cfs_hash_bd_del_locked(hs, bd, ehnode); - return ehnode; - } - - /* caller wants refcount? */ - if (intent & CFS_HS_LOOKUP_MASK_REF) - cfs_hash_get(hs, ehnode); - return ehnode; - } - /* no match item */ - if (!intent_add) - return NULL; - - LASSERT(hnode); - cfs_hash_bd_add_locked(hs, bd, hnode); - return hnode; -} - -struct hlist_node * -cfs_hash_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - const void *key) -{ - return cfs_hash_bd_lookup_intent(hs, bd, key, NULL, - CFS_HS_LOOKUP_IT_FIND); -} -EXPORT_SYMBOL(cfs_hash_bd_lookup_locked); - -struct hlist_node * -cfs_hash_bd_peek_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - const void *key) -{ - return cfs_hash_bd_lookup_intent(hs, bd, key, NULL, - CFS_HS_LOOKUP_IT_PEEK); -} -EXPORT_SYMBOL(cfs_hash_bd_peek_locked); - -static void -cfs_hash_multi_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds, - unsigned int n, int excl) -{ - struct cfs_hash_bucket *prev = NULL; - int i; - - /** - * bds must be ascendantly ordered by bd->bd_bucket->hsb_index. - * NB: it's possible that several bds point to the same bucket but - * have different bd::bd_offset, so need take care of deadlock. - */ - cfs_hash_for_each_bd(bds, n, i) { - if (prev == bds[i].bd_bucket) - continue; - - LASSERT(!prev || prev->hsb_index < bds[i].bd_bucket->hsb_index); - cfs_hash_bd_lock(hs, &bds[i], excl); - prev = bds[i].bd_bucket; - } -} - -static void -cfs_hash_multi_bd_unlock(struct cfs_hash *hs, struct cfs_hash_bd *bds, - unsigned int n, int excl) -{ - struct cfs_hash_bucket *prev = NULL; - int i; - - cfs_hash_for_each_bd(bds, n, i) { - if (prev != bds[i].bd_bucket) { - cfs_hash_bd_unlock(hs, &bds[i], excl); - prev = bds[i].bd_bucket; - } - } -} - -static struct hlist_node * -cfs_hash_multi_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - unsigned int n, const void *key) -{ - struct hlist_node *ehnode; - unsigned int i; - - cfs_hash_for_each_bd(bds, n, i) { - ehnode = cfs_hash_bd_lookup_intent(hs, &bds[i], key, NULL, - CFS_HS_LOOKUP_IT_FIND); - if (ehnode) - return ehnode; - } - return NULL; -} - -static struct hlist_node * -cfs_hash_multi_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - unsigned int n, const void *key, - struct hlist_node *hnode, int noref) -{ - struct hlist_node *ehnode; - int intent; - unsigned int i; - - LASSERT(hnode); - intent = (!noref * CFS_HS_LOOKUP_MASK_REF) | CFS_HS_LOOKUP_IT_PEEK; - - cfs_hash_for_each_bd(bds, n, i) { - ehnode = cfs_hash_bd_lookup_intent(hs, &bds[i], key, - NULL, intent); - if (ehnode) - return ehnode; - } - - if (i == 1) { /* only one bucket */ - cfs_hash_bd_add_locked(hs, &bds[0], hnode); - } else { - struct cfs_hash_bd mybd; - - cfs_hash_bd_get(hs, key, &mybd); - cfs_hash_bd_add_locked(hs, &mybd, hnode); - } - - return hnode; -} - -static struct hlist_node * -cfs_hash_multi_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - unsigned int n, const void *key, - struct hlist_node *hnode) -{ - struct hlist_node *ehnode; - unsigned int i; - - cfs_hash_for_each_bd(bds, n, i) { - ehnode = cfs_hash_bd_lookup_intent(hs, &bds[i], key, hnode, - CFS_HS_LOOKUP_IT_FINDDEL); - if (ehnode) - return ehnode; - } - return NULL; -} - -static void -cfs_hash_bd_order(struct cfs_hash_bd *bd1, struct cfs_hash_bd *bd2) -{ - int rc; - - if (!bd2->bd_bucket) - return; - - if (!bd1->bd_bucket) { - *bd1 = *bd2; - bd2->bd_bucket = NULL; - return; - } - - rc = cfs_hash_bd_compare(bd1, bd2); - if (!rc) - bd2->bd_bucket = NULL; - else if (rc > 0) - swap(*bd1, *bd2); /* swap bd1 and bd2 */ -} - -void -cfs_hash_dual_bd_get(struct cfs_hash *hs, const void *key, - struct cfs_hash_bd *bds) -{ - /* NB: caller should hold hs_lock.rw if REHASH is set */ - cfs_hash_bd_from_key(hs, hs->hs_buckets, - hs->hs_cur_bits, key, &bds[0]); - if (likely(!hs->hs_rehash_buckets)) { - /* no rehash or not rehashing */ - bds[1].bd_bucket = NULL; - return; - } - - LASSERT(hs->hs_rehash_bits); - cfs_hash_bd_from_key(hs, hs->hs_rehash_buckets, - hs->hs_rehash_bits, key, &bds[1]); - - cfs_hash_bd_order(&bds[0], &bds[1]); -} - -void -cfs_hash_dual_bd_lock(struct cfs_hash *hs, struct cfs_hash_bd *bds, int excl) -{ - cfs_hash_multi_bd_lock(hs, bds, 2, excl); -} - -void -cfs_hash_dual_bd_unlock(struct cfs_hash *hs, struct cfs_hash_bd *bds, int excl) -{ - cfs_hash_multi_bd_unlock(hs, bds, 2, excl); -} - -struct hlist_node * -cfs_hash_dual_bd_lookup_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - const void *key) -{ - return cfs_hash_multi_bd_lookup_locked(hs, bds, 2, key); -} - -struct hlist_node * -cfs_hash_dual_bd_findadd_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - const void *key, struct hlist_node *hnode, - int noref) -{ - return cfs_hash_multi_bd_findadd_locked(hs, bds, 2, key, - hnode, noref); -} - -struct hlist_node * -cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs, struct cfs_hash_bd *bds, - const void *key, struct hlist_node *hnode) -{ - return cfs_hash_multi_bd_finddel_locked(hs, bds, 2, key, hnode); -} - -static void -cfs_hash_buckets_free(struct cfs_hash_bucket **buckets, - int bkt_size, int prev_size, int size) -{ - int i; - - for (i = prev_size; i < size; i++) - kfree(buckets[i]); - - kvfree(buckets); -} - -/* - * Create or grow bucket memory. Return old_buckets if no allocation was - * needed, the newly allocated buckets if allocation was needed and - * successful, and NULL on error. - */ -static struct cfs_hash_bucket ** -cfs_hash_buckets_realloc(struct cfs_hash *hs, struct cfs_hash_bucket **old_bkts, - unsigned int old_size, unsigned int new_size) -{ - struct cfs_hash_bucket **new_bkts; - int i; - - LASSERT(!old_size || old_bkts); - - if (old_bkts && old_size == new_size) - return old_bkts; - - new_bkts = kvmalloc_array(new_size, sizeof(new_bkts[0]), GFP_KERNEL); - if (!new_bkts) - return NULL; - - if (old_bkts) { - memcpy(new_bkts, old_bkts, - min(old_size, new_size) * sizeof(*old_bkts)); - } - - for (i = old_size; i < new_size; i++) { - struct hlist_head *hhead; - struct cfs_hash_bd bd; - - new_bkts[i] = kzalloc(cfs_hash_bkt_size(hs), GFP_KERNEL); - if (!new_bkts[i]) { - cfs_hash_buckets_free(new_bkts, cfs_hash_bkt_size(hs), - old_size, new_size); - return NULL; - } - - new_bkts[i]->hsb_index = i; - new_bkts[i]->hsb_version = 1; /* shouldn't be zero */ - new_bkts[i]->hsb_depmax = -1; /* unknown */ - bd.bd_bucket = new_bkts[i]; - cfs_hash_bd_for_each_hlist(hs, &bd, hhead) - INIT_HLIST_HEAD(hhead); - - if (cfs_hash_with_no_lock(hs) || - cfs_hash_with_no_bktlock(hs)) - continue; - - if (cfs_hash_with_rw_bktlock(hs)) - rwlock_init(&new_bkts[i]->hsb_lock.rw); - else if (cfs_hash_with_spin_bktlock(hs)) - spin_lock_init(&new_bkts[i]->hsb_lock.spin); - else - LBUG(); /* invalid use-case */ - } - return new_bkts; -} - -/** - * Initialize new libcfs hash, where: - * @name - Descriptive hash name - * @cur_bits - Initial hash table size, in bits - * @max_bits - Maximum allowed hash table resize, in bits - * @ops - Registered hash table operations - * @flags - CFS_HASH_REHASH enable synamic hash resizing - * - CFS_HASH_SORT enable chained hash sort - */ -static void cfs_hash_rehash_worker(struct work_struct *work); - -#if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 -static void cfs_hash_dep_print(struct work_struct *work) -{ - struct cfs_hash *hs = container_of(work, struct cfs_hash, hs_dep_work); - int dep; - int bkt; - int off; - int bits; - - spin_lock(&hs->hs_dep_lock); - dep = hs->hs_dep_max; - bkt = hs->hs_dep_bkt; - off = hs->hs_dep_off; - bits = hs->hs_dep_bits; - spin_unlock(&hs->hs_dep_lock); - - LCONSOLE_WARN("#### HASH %s (bits: %d): max depth %d at bucket %d/%d\n", - hs->hs_name, bits, dep, bkt, off); - spin_lock(&hs->hs_dep_lock); - hs->hs_dep_bits = 0; /* mark as workitem done */ - spin_unlock(&hs->hs_dep_lock); - return 0; -} - -static void cfs_hash_depth_wi_init(struct cfs_hash *hs) -{ - spin_lock_init(&hs->hs_dep_lock); - INIT_WORK(&hs->hs_dep_work, cfs_hash_dep_print); -} - -static void cfs_hash_depth_wi_cancel(struct cfs_hash *hs) -{ - cancel_work_sync(&hs->hs_dep_work); -} - -#else /* CFS_HASH_DEBUG_LEVEL < CFS_HASH_DEBUG_1 */ - -static inline void cfs_hash_depth_wi_init(struct cfs_hash *hs) {} -static inline void cfs_hash_depth_wi_cancel(struct cfs_hash *hs) {} - -#endif /* CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1 */ - -struct cfs_hash * -cfs_hash_create(char *name, unsigned int cur_bits, unsigned int max_bits, - unsigned int bkt_bits, unsigned int extra_bytes, - unsigned int min_theta, unsigned int max_theta, - struct cfs_hash_ops *ops, unsigned int flags) -{ - struct cfs_hash *hs; - int len; - - BUILD_BUG_ON(CFS_HASH_THETA_BITS >= 15); - - LASSERT(name); - LASSERT(ops->hs_key); - LASSERT(ops->hs_hash); - LASSERT(ops->hs_object); - LASSERT(ops->hs_keycmp); - LASSERT(ops->hs_get); - LASSERT(ops->hs_put || ops->hs_put_locked); - - if (flags & CFS_HASH_REHASH) - flags |= CFS_HASH_COUNTER; /* must have counter */ - - LASSERT(cur_bits > 0); - LASSERT(cur_bits >= bkt_bits); - LASSERT(max_bits >= cur_bits && max_bits < 31); - LASSERT(ergo(!(flags & CFS_HASH_REHASH), cur_bits == max_bits)); - LASSERT(ergo(flags & CFS_HASH_REHASH, !(flags & CFS_HASH_NO_LOCK))); - LASSERT(ergo(flags & CFS_HASH_REHASH_KEY, ops->hs_keycpy)); - - len = !(flags & CFS_HASH_BIGNAME) ? - CFS_HASH_NAME_LEN : CFS_HASH_BIGNAME_LEN; - hs = kzalloc(offsetof(struct cfs_hash, hs_name[len]), GFP_KERNEL); - if (!hs) - return NULL; - - strlcpy(hs->hs_name, name, len); - hs->hs_flags = flags; - - atomic_set(&hs->hs_refcount, 1); - atomic_set(&hs->hs_count, 0); - - cfs_hash_lock_setup(hs); - cfs_hash_hlist_setup(hs); - - hs->hs_cur_bits = (u8)cur_bits; - hs->hs_min_bits = (u8)cur_bits; - hs->hs_max_bits = (u8)max_bits; - hs->hs_bkt_bits = (u8)bkt_bits; - - hs->hs_ops = ops; - hs->hs_extra_bytes = extra_bytes; - hs->hs_rehash_bits = 0; - INIT_WORK(&hs->hs_rehash_work, cfs_hash_rehash_worker); - cfs_hash_depth_wi_init(hs); - - if (cfs_hash_with_rehash(hs)) - __cfs_hash_set_theta(hs, min_theta, max_theta); - - hs->hs_buckets = cfs_hash_buckets_realloc(hs, NULL, 0, - CFS_HASH_NBKT(hs)); - if (hs->hs_buckets) - return hs; - - kfree(hs); - return NULL; -} -EXPORT_SYMBOL(cfs_hash_create); - -/** - * Cleanup libcfs hash @hs. - */ -static void -cfs_hash_destroy(struct cfs_hash *hs) -{ - struct hlist_node *hnode; - struct hlist_node *pos; - struct cfs_hash_bd bd; - int i; - - LASSERT(hs); - LASSERT(!cfs_hash_is_exiting(hs) && - !cfs_hash_is_iterating(hs)); - - /** - * prohibit further rehashes, don't need any lock because - * I'm the only (last) one can change it. - */ - hs->hs_exiting = 1; - if (cfs_hash_with_rehash(hs)) - cfs_hash_rehash_cancel(hs); - - cfs_hash_depth_wi_cancel(hs); - /* rehash should be done/canceled */ - LASSERT(hs->hs_buckets && !hs->hs_rehash_buckets); - - cfs_hash_for_each_bucket(hs, &bd, i) { - struct hlist_head *hhead; - - LASSERT(bd.bd_bucket); - /* no need to take this lock, just for consistent code */ - cfs_hash_bd_lock(hs, &bd, 1); - - cfs_hash_bd_for_each_hlist(hs, &bd, hhead) { - hlist_for_each_safe(hnode, pos, hhead) { - LASSERTF(!cfs_hash_with_assert_empty(hs), - "hash %s bucket %u(%u) is not empty: %u items left\n", - hs->hs_name, bd.bd_bucket->hsb_index, - bd.bd_offset, bd.bd_bucket->hsb_count); - /* can't assert key valicate, because we - * can interrupt rehash - */ - cfs_hash_bd_del_locked(hs, &bd, hnode); - cfs_hash_exit(hs, hnode); - } - } - LASSERT(!bd.bd_bucket->hsb_count); - cfs_hash_bd_unlock(hs, &bd, 1); - cond_resched(); - } - - LASSERT(!atomic_read(&hs->hs_count)); - - cfs_hash_buckets_free(hs->hs_buckets, cfs_hash_bkt_size(hs), - 0, CFS_HASH_NBKT(hs)); - i = cfs_hash_with_bigname(hs) ? - CFS_HASH_BIGNAME_LEN : CFS_HASH_NAME_LEN; - kfree(hs); -} - -struct cfs_hash *cfs_hash_getref(struct cfs_hash *hs) -{ - if (atomic_inc_not_zero(&hs->hs_refcount)) - return hs; - return NULL; -} -EXPORT_SYMBOL(cfs_hash_getref); - -void cfs_hash_putref(struct cfs_hash *hs) -{ - if (atomic_dec_and_test(&hs->hs_refcount)) - cfs_hash_destroy(hs); -} -EXPORT_SYMBOL(cfs_hash_putref); - -static inline int -cfs_hash_rehash_bits(struct cfs_hash *hs) -{ - if (cfs_hash_with_no_lock(hs) || - !cfs_hash_with_rehash(hs)) - return -EOPNOTSUPP; - - if (unlikely(cfs_hash_is_exiting(hs))) - return -ESRCH; - - if (unlikely(cfs_hash_is_rehashing(hs))) - return -EALREADY; - - if (unlikely(cfs_hash_is_iterating(hs))) - return -EAGAIN; - - /* XXX: need to handle case with max_theta != 2.0 - * and the case with min_theta != 0.5 - */ - if ((hs->hs_cur_bits < hs->hs_max_bits) && - (__cfs_hash_theta(hs) > hs->hs_max_theta)) - return hs->hs_cur_bits + 1; - - if (!cfs_hash_with_shrink(hs)) - return 0; - - if ((hs->hs_cur_bits > hs->hs_min_bits) && - (__cfs_hash_theta(hs) < hs->hs_min_theta)) - return hs->hs_cur_bits - 1; - - return 0; -} - -/** - * don't allow inline rehash if: - * - user wants non-blocking change (add/del) on hash table - * - too many elements - */ -static inline int -cfs_hash_rehash_inline(struct cfs_hash *hs) -{ - return !cfs_hash_with_nblk_change(hs) && - atomic_read(&hs->hs_count) < CFS_HASH_LOOP_HOG; -} - -/** - * Add item @hnode to libcfs hash @hs using @key. The registered - * ops->hs_get function will be called when the item is added. - */ -void -cfs_hash_add(struct cfs_hash *hs, const void *key, struct hlist_node *hnode) -{ - struct cfs_hash_bd bd; - int bits; - - LASSERT(hlist_unhashed(hnode)); - - cfs_hash_lock(hs, 0); - cfs_hash_bd_get_and_lock(hs, key, &bd, 1); - - cfs_hash_key_validate(hs, key, hnode); - cfs_hash_bd_add_locked(hs, &bd, hnode); - - cfs_hash_bd_unlock(hs, &bd, 1); - - bits = cfs_hash_rehash_bits(hs); - cfs_hash_unlock(hs, 0); - if (bits > 0) - cfs_hash_rehash(hs, cfs_hash_rehash_inline(hs)); -} -EXPORT_SYMBOL(cfs_hash_add); - -static struct hlist_node * -cfs_hash_find_or_add(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode, int noref) -{ - struct hlist_node *ehnode; - struct cfs_hash_bd bds[2]; - int bits = 0; - - LASSERTF(hlist_unhashed(hnode), "hnode = %p\n", hnode); - - cfs_hash_lock(hs, 0); - cfs_hash_dual_bd_get_and_lock(hs, key, bds, 1); - - cfs_hash_key_validate(hs, key, hnode); - ehnode = cfs_hash_dual_bd_findadd_locked(hs, bds, key, - hnode, noref); - cfs_hash_dual_bd_unlock(hs, bds, 1); - - if (ehnode == hnode) /* new item added */ - bits = cfs_hash_rehash_bits(hs); - cfs_hash_unlock(hs, 0); - if (bits > 0) - cfs_hash_rehash(hs, cfs_hash_rehash_inline(hs)); - - return ehnode; -} - -/** - * Add item @hnode to libcfs hash @hs using @key. The registered - * ops->hs_get function will be called if the item was added. - * Returns 0 on success or -EALREADY on key collisions. - */ -int -cfs_hash_add_unique(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode) -{ - return cfs_hash_find_or_add(hs, key, hnode, 1) != hnode ? - -EALREADY : 0; -} -EXPORT_SYMBOL(cfs_hash_add_unique); - -/** - * Add item @hnode to libcfs hash @hs using @key. If this @key - * already exists in the hash then ops->hs_get will be called on the - * conflicting entry and that entry will be returned to the caller. - * Otherwise ops->hs_get is called on the item which was added. - */ -void * -cfs_hash_findadd_unique(struct cfs_hash *hs, const void *key, - struct hlist_node *hnode) -{ - hnode = cfs_hash_find_or_add(hs, key, hnode, 0); - - return cfs_hash_object(hs, hnode); -} -EXPORT_SYMBOL(cfs_hash_findadd_unique); - -/** - * Delete item @hnode from the libcfs hash @hs using @key. The @key - * is required to ensure the correct hash bucket is locked since there - * is no direct linkage from the item to the bucket. The object - * removed from the hash will be returned and obs->hs_put is called - * on the removed object. - */ -void * -cfs_hash_del(struct cfs_hash *hs, const void *key, struct hlist_node *hnode) -{ - void *obj = NULL; - int bits = 0; - struct cfs_hash_bd bds[2]; - - cfs_hash_lock(hs, 0); - cfs_hash_dual_bd_get_and_lock(hs, key, bds, 1); - - /* NB: do nothing if @hnode is not in hash table */ - if (!hnode || !hlist_unhashed(hnode)) { - if (!bds[1].bd_bucket && hnode) { - cfs_hash_bd_del_locked(hs, &bds[0], hnode); - } else { - hnode = cfs_hash_dual_bd_finddel_locked(hs, bds, - key, hnode); - } - } - - if (hnode) { - obj = cfs_hash_object(hs, hnode); - bits = cfs_hash_rehash_bits(hs); - } - - cfs_hash_dual_bd_unlock(hs, bds, 1); - cfs_hash_unlock(hs, 0); - if (bits > 0) - cfs_hash_rehash(hs, cfs_hash_rehash_inline(hs)); - - return obj; -} -EXPORT_SYMBOL(cfs_hash_del); - -/** - * Delete item given @key in libcfs hash @hs. The first @key found in - * the hash will be removed, if the key exists multiple times in the hash - * @hs this function must be called once per key. The removed object - * will be returned and ops->hs_put is called on the removed object. - */ -void * -cfs_hash_del_key(struct cfs_hash *hs, const void *key) -{ - return cfs_hash_del(hs, key, NULL); -} -EXPORT_SYMBOL(cfs_hash_del_key); - -/** - * Lookup an item using @key in the libcfs hash @hs and return it. - * If the @key is found in the hash hs->hs_get() is called and the - * matching objects is returned. It is the callers responsibility - * to call the counterpart ops->hs_put using the cfs_hash_put() macro - * when when finished with the object. If the @key was not found - * in the hash @hs NULL is returned. - */ -void * -cfs_hash_lookup(struct cfs_hash *hs, const void *key) -{ - void *obj = NULL; - struct hlist_node *hnode; - struct cfs_hash_bd bds[2]; - - cfs_hash_lock(hs, 0); - cfs_hash_dual_bd_get_and_lock(hs, key, bds, 0); - - hnode = cfs_hash_dual_bd_lookup_locked(hs, bds, key); - if (hnode) - obj = cfs_hash_object(hs, hnode); - - cfs_hash_dual_bd_unlock(hs, bds, 0); - cfs_hash_unlock(hs, 0); - - return obj; -} -EXPORT_SYMBOL(cfs_hash_lookup); - -static void -cfs_hash_for_each_enter(struct cfs_hash *hs) -{ - LASSERT(!cfs_hash_is_exiting(hs)); - - if (!cfs_hash_with_rehash(hs)) - return; - /* - * NB: it's race on cfs_has_t::hs_iterating, but doesn't matter - * because it's just an unreliable signal to rehash-thread, - * rehash-thread will try to finish rehash ASAP when seeing this. - */ - hs->hs_iterating = 1; - - cfs_hash_lock(hs, 1); - hs->hs_iterators++; - cfs_hash_unlock(hs, 1); - - /* NB: iteration is mostly called by service thread, - * we tend to cancel pending rehash-request, instead of - * blocking service thread, we will relaunch rehash request - * after iteration - */ - if (cfs_hash_is_rehashing(hs)) - cfs_hash_rehash_cancel(hs); -} - -static void -cfs_hash_for_each_exit(struct cfs_hash *hs) -{ - int remained; - int bits; - - if (!cfs_hash_with_rehash(hs)) - return; - cfs_hash_lock(hs, 1); - remained = --hs->hs_iterators; - bits = cfs_hash_rehash_bits(hs); - cfs_hash_unlock(hs, 1); - /* NB: it's race on cfs_has_t::hs_iterating, see above */ - if (!remained) - hs->hs_iterating = 0; - if (bits > 0) { - cfs_hash_rehash(hs, atomic_read(&hs->hs_count) < - CFS_HASH_LOOP_HOG); - } -} - -/** - * For each item in the libcfs hash @hs call the passed callback @func - * and pass to it as an argument each hash item and the private @data. - * - * a) the function may sleep! - * b) during the callback: - * . the bucket lock is held so the callback must never sleep. - * . if @removal_safe is true, use can remove current item by - * cfs_hash_bd_del_locked - */ -static u64 -cfs_hash_for_each_tight(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data, int remove_safe) -{ - struct hlist_node *hnode; - struct hlist_node *pos; - struct cfs_hash_bd bd; - u64 count = 0; - int excl = !!remove_safe; - int loop = 0; - int i; - - cfs_hash_for_each_enter(hs); - - cfs_hash_lock(hs, 0); - LASSERT(!cfs_hash_is_rehashing(hs)); - - cfs_hash_for_each_bucket(hs, &bd, i) { - struct hlist_head *hhead; - - cfs_hash_bd_lock(hs, &bd, excl); - if (!func) { /* only glimpse size */ - count += bd.bd_bucket->hsb_count; - cfs_hash_bd_unlock(hs, &bd, excl); - continue; - } - - cfs_hash_bd_for_each_hlist(hs, &bd, hhead) { - hlist_for_each_safe(hnode, pos, hhead) { - cfs_hash_bucket_validate(hs, &bd, hnode); - count++; - loop++; - if (func(hs, &bd, hnode, data)) { - cfs_hash_bd_unlock(hs, &bd, excl); - goto out; - } - } - } - cfs_hash_bd_unlock(hs, &bd, excl); - if (loop < CFS_HASH_LOOP_HOG) - continue; - loop = 0; - cfs_hash_unlock(hs, 0); - cond_resched(); - cfs_hash_lock(hs, 0); - } - out: - cfs_hash_unlock(hs, 0); - - cfs_hash_for_each_exit(hs); - return count; -} - -struct cfs_hash_cond_arg { - cfs_hash_cond_opt_cb_t func; - void *arg; -}; - -static int -cfs_hash_cond_del_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *data) -{ - struct cfs_hash_cond_arg *cond = data; - - if (cond->func(cfs_hash_object(hs, hnode), cond->arg)) - cfs_hash_bd_del_locked(hs, bd, hnode); - return 0; -} - -/** - * Delete item from the libcfs hash @hs when @func return true. - * The write lock being hold during loop for each bucket to avoid - * any object be reference. - */ -void -cfs_hash_cond_del(struct cfs_hash *hs, cfs_hash_cond_opt_cb_t func, void *data) -{ - struct cfs_hash_cond_arg arg = { - .func = func, - .arg = data, - }; - - cfs_hash_for_each_tight(hs, cfs_hash_cond_del_locked, &arg, 1); -} -EXPORT_SYMBOL(cfs_hash_cond_del); - -void -cfs_hash_for_each(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data) -{ - cfs_hash_for_each_tight(hs, func, data, 0); -} -EXPORT_SYMBOL(cfs_hash_for_each); - -void -cfs_hash_for_each_safe(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data) -{ - cfs_hash_for_each_tight(hs, func, data, 1); -} -EXPORT_SYMBOL(cfs_hash_for_each_safe); - -static int -cfs_hash_peek(struct cfs_hash *hs, struct cfs_hash_bd *bd, - struct hlist_node *hnode, void *data) -{ - *(int *)data = 0; - return 1; /* return 1 to break the loop */ -} - -int -cfs_hash_is_empty(struct cfs_hash *hs) -{ - int empty = 1; - - cfs_hash_for_each_tight(hs, cfs_hash_peek, &empty, 0); - return empty; -} -EXPORT_SYMBOL(cfs_hash_is_empty); - -u64 -cfs_hash_size_get(struct cfs_hash *hs) -{ - return cfs_hash_with_counter(hs) ? - atomic_read(&hs->hs_count) : - cfs_hash_for_each_tight(hs, NULL, NULL, 0); -} -EXPORT_SYMBOL(cfs_hash_size_get); - -/* - * cfs_hash_for_each_relax: - * Iterate the hash table and call @func on each item without - * any lock. This function can't guarantee to finish iteration - * if these features are enabled: - * - * a. if rehash_key is enabled, an item can be moved from - * one bucket to another bucket - * b. user can remove non-zero-ref item from hash-table, - * so the item can be removed from hash-table, even worse, - * it's possible that user changed key and insert to another - * hash bucket. - * there's no way for us to finish iteration correctly on previous - * two cases, so iteration has to be stopped on change. - */ -static int -cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data, int start) -{ - struct hlist_node *next = NULL; - struct hlist_node *hnode; - struct cfs_hash_bd bd; - u32 version; - int count = 0; - int stop_on_change; - int has_put_locked; - int end = -1; - int rc = 0; - int i; - - stop_on_change = cfs_hash_with_rehash_key(hs) || - !cfs_hash_with_no_itemref(hs); - has_put_locked = hs->hs_ops->hs_put_locked != NULL; - cfs_hash_lock(hs, 0); -again: - LASSERT(!cfs_hash_is_rehashing(hs)); - - cfs_hash_for_each_bucket(hs, &bd, i) { - struct hlist_head *hhead; - - if (i < start) - continue; - else if (end > 0 && i >= end) - break; - - cfs_hash_bd_lock(hs, &bd, 0); - version = cfs_hash_bd_version_get(&bd); - - cfs_hash_bd_for_each_hlist(hs, &bd, hhead) { - hnode = hhead->first; - if (!hnode) - continue; - cfs_hash_get(hs, hnode); - - for (; hnode; hnode = next) { - cfs_hash_bucket_validate(hs, &bd, hnode); - next = hnode->next; - if (next) - cfs_hash_get(hs, next); - cfs_hash_bd_unlock(hs, &bd, 0); - cfs_hash_unlock(hs, 0); - - rc = func(hs, &bd, hnode, data); - if (stop_on_change || !has_put_locked) - cfs_hash_put(hs, hnode); - cond_resched(); - count++; - - cfs_hash_lock(hs, 0); - cfs_hash_bd_lock(hs, &bd, 0); - if (stop_on_change) { - if (version != - cfs_hash_bd_version_get(&bd)) - rc = -EINTR; - } else if (has_put_locked) { - cfs_hash_put_locked(hs, hnode); - } - if (rc) /* callback wants to break iteration */ - break; - } - if (next) { - if (has_put_locked) { - cfs_hash_put_locked(hs, next); - next = NULL; - } - break; - } else if (rc) { - break; - } - } - cfs_hash_bd_unlock(hs, &bd, 0); - if (next && !has_put_locked) { - cfs_hash_put(hs, next); - next = NULL; - } - if (rc) /* callback wants to break iteration */ - break; - } - if (start > 0 && !rc) { - end = start; - start = 0; - goto again; - } - - cfs_hash_unlock(hs, 0); - return count; -} - -int -cfs_hash_for_each_nolock(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data, int start) -{ - if (cfs_hash_with_no_lock(hs) || - cfs_hash_with_rehash_key(hs) || - !cfs_hash_with_no_itemref(hs)) - return -EOPNOTSUPP; - - if (!hs->hs_ops->hs_get || - (!hs->hs_ops->hs_put && !hs->hs_ops->hs_put_locked)) - return -EOPNOTSUPP; - - cfs_hash_for_each_enter(hs); - cfs_hash_for_each_relax(hs, func, data, start); - cfs_hash_for_each_exit(hs); - - return 0; -} -EXPORT_SYMBOL(cfs_hash_for_each_nolock); - -/** - * For each hash bucket in the libcfs hash @hs call the passed callback - * @func until all the hash buckets are empty. The passed callback @func - * or the previously registered callback hs->hs_put must remove the item - * from the hash. You may either use the cfs_hash_del() or hlist_del() - * functions. No rwlocks will be held during the callback @func it is - * safe to sleep if needed. This function will not terminate until the - * hash is empty. Note it is still possible to concurrently add new - * items in to the hash. It is the callers responsibility to ensure - * the required locking is in place to prevent concurrent insertions. - */ -int -cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func, - void *data) -{ - unsigned int i = 0; - - if (cfs_hash_with_no_lock(hs)) - return -EOPNOTSUPP; - - if (!hs->hs_ops->hs_get || - (!hs->hs_ops->hs_put && !hs->hs_ops->hs_put_locked)) - return -EOPNOTSUPP; - - cfs_hash_for_each_enter(hs); - while (cfs_hash_for_each_relax(hs, func, data, 0)) { - CDEBUG(D_INFO, "Try to empty hash: %s, loop: %u\n", - hs->hs_name, i++); - } - cfs_hash_for_each_exit(hs); - return 0; -} -EXPORT_SYMBOL(cfs_hash_for_each_empty); - -void -cfs_hash_hlist_for_each(struct cfs_hash *hs, unsigned int hindex, - cfs_hash_for_each_cb_t func, void *data) -{ - struct hlist_head *hhead; - struct hlist_node *hnode; - struct cfs_hash_bd bd; - - cfs_hash_for_each_enter(hs); - cfs_hash_lock(hs, 0); - if (hindex >= CFS_HASH_NHLIST(hs)) - goto out; - - cfs_hash_bd_index_set(hs, hindex, &bd); - - cfs_hash_bd_lock(hs, &bd, 0); - hhead = cfs_hash_bd_hhead(hs, &bd); - hlist_for_each(hnode, hhead) { - if (func(hs, &bd, hnode, data)) - break; - } - cfs_hash_bd_unlock(hs, &bd, 0); -out: - cfs_hash_unlock(hs, 0); - cfs_hash_for_each_exit(hs); -} -EXPORT_SYMBOL(cfs_hash_hlist_for_each); - -/* - * For each item in the libcfs hash @hs which matches the @key call - * the passed callback @func and pass to it as an argument each hash - * item and the private @data. During the callback the bucket lock - * is held so the callback must never sleep. - */ -void -cfs_hash_for_each_key(struct cfs_hash *hs, const void *key, - cfs_hash_for_each_cb_t func, void *data) -{ - struct hlist_node *hnode; - struct cfs_hash_bd bds[2]; - unsigned int i; - - cfs_hash_lock(hs, 0); - - cfs_hash_dual_bd_get_and_lock(hs, key, bds, 0); - - cfs_hash_for_each_bd(bds, 2, i) { - struct hlist_head *hlist = cfs_hash_bd_hhead(hs, &bds[i]); - - hlist_for_each(hnode, hlist) { - cfs_hash_bucket_validate(hs, &bds[i], hnode); - - if (cfs_hash_keycmp(hs, key, hnode)) { - if (func(hs, &bds[i], hnode, data)) - break; - } - } - } - - cfs_hash_dual_bd_unlock(hs, bds, 0); - cfs_hash_unlock(hs, 0); -} -EXPORT_SYMBOL(cfs_hash_for_each_key); - -/** - * Rehash the libcfs hash @hs to the given @bits. This can be used - * to grow the hash size when excessive chaining is detected, or to - * shrink the hash when it is larger than needed. When the CFS_HASH_REHASH - * flag is set in @hs the libcfs hash may be dynamically rehashed - * during addition or removal if the hash's theta value exceeds - * either the hs->hs_min_theta or hs->max_theta values. By default - * these values are tuned to keep the chained hash depth small, and - * this approach assumes a reasonably uniform hashing function. The - * theta thresholds for @hs are tunable via cfs_hash_set_theta(). - */ -void -cfs_hash_rehash_cancel(struct cfs_hash *hs) -{ - LASSERT(cfs_hash_with_rehash(hs)); - cancel_work_sync(&hs->hs_rehash_work); -} - -void -cfs_hash_rehash(struct cfs_hash *hs, int do_rehash) -{ - int rc; - - LASSERT(cfs_hash_with_rehash(hs) && !cfs_hash_with_no_lock(hs)); - - cfs_hash_lock(hs, 1); - - rc = cfs_hash_rehash_bits(hs); - if (rc <= 0) { - cfs_hash_unlock(hs, 1); - return; - } - - hs->hs_rehash_bits = rc; - if (!do_rehash) { - /* launch and return */ - queue_work(cfs_rehash_wq, &hs->hs_rehash_work); - cfs_hash_unlock(hs, 1); - return; - } - - /* rehash right now */ - cfs_hash_unlock(hs, 1); - - cfs_hash_rehash_worker(&hs->hs_rehash_work); -} - -static int -cfs_hash_rehash_bd(struct cfs_hash *hs, struct cfs_hash_bd *old) -{ - struct cfs_hash_bd new; - struct hlist_head *hhead; - struct hlist_node *hnode; - struct hlist_node *pos; - void *key; - int c = 0; - - /* hold cfs_hash_lock(hs, 1), so don't need any bucket lock */ - cfs_hash_bd_for_each_hlist(hs, old, hhead) { - hlist_for_each_safe(hnode, pos, hhead) { - key = cfs_hash_key(hs, hnode); - LASSERT(key); - /* Validate hnode is in the correct bucket. */ - cfs_hash_bucket_validate(hs, old, hnode); - /* - * Delete from old hash bucket; move to new bucket. - * ops->hs_key must be defined. - */ - cfs_hash_bd_from_key(hs, hs->hs_rehash_buckets, - hs->hs_rehash_bits, key, &new); - cfs_hash_bd_move_locked(hs, old, &new, hnode); - c++; - } - } - - return c; -} - -static void -cfs_hash_rehash_worker(struct work_struct *work) -{ - struct cfs_hash *hs = container_of(work, struct cfs_hash, hs_rehash_work); - struct cfs_hash_bucket **bkts; - struct cfs_hash_bd bd; - unsigned int old_size; - unsigned int new_size; - int bsize; - int count = 0; - int rc = 0; - int i; - - LASSERT(hs && cfs_hash_with_rehash(hs)); - - cfs_hash_lock(hs, 0); - LASSERT(cfs_hash_is_rehashing(hs)); - - old_size = CFS_HASH_NBKT(hs); - new_size = CFS_HASH_RH_NBKT(hs); - - cfs_hash_unlock(hs, 0); - - /* - * don't need hs::hs_rwlock for hs::hs_buckets, - * because nobody can change bkt-table except me. - */ - bkts = cfs_hash_buckets_realloc(hs, hs->hs_buckets, - old_size, new_size); - cfs_hash_lock(hs, 1); - if (!bkts) { - rc = -ENOMEM; - goto out; - } - - if (bkts == hs->hs_buckets) { - bkts = NULL; /* do nothing */ - goto out; - } - - rc = __cfs_hash_theta(hs); - if ((rc >= hs->hs_min_theta) && (rc <= hs->hs_max_theta)) { - /* free the new allocated bkt-table */ - old_size = new_size; - new_size = CFS_HASH_NBKT(hs); - rc = -EALREADY; - goto out; - } - - LASSERT(!hs->hs_rehash_buckets); - hs->hs_rehash_buckets = bkts; - - rc = 0; - cfs_hash_for_each_bucket(hs, &bd, i) { - if (cfs_hash_is_exiting(hs)) { - rc = -ESRCH; - /* someone wants to destroy the hash, abort now */ - if (old_size < new_size) /* OK to free old bkt-table */ - break; - /* it's shrinking, need free new bkt-table */ - hs->hs_rehash_buckets = NULL; - old_size = new_size; - new_size = CFS_HASH_NBKT(hs); - goto out; - } - - count += cfs_hash_rehash_bd(hs, &bd); - if (count < CFS_HASH_LOOP_HOG || - cfs_hash_is_iterating(hs)) { /* need to finish ASAP */ - continue; - } - - count = 0; - cfs_hash_unlock(hs, 1); - cond_resched(); - cfs_hash_lock(hs, 1); - } - - hs->hs_rehash_count++; - - bkts = hs->hs_buckets; - hs->hs_buckets = hs->hs_rehash_buckets; - hs->hs_rehash_buckets = NULL; - - hs->hs_cur_bits = hs->hs_rehash_bits; -out: - hs->hs_rehash_bits = 0; - bsize = cfs_hash_bkt_size(hs); - cfs_hash_unlock(hs, 1); - /* can't refer to @hs anymore because it could be destroyed */ - if (bkts) - cfs_hash_buckets_free(bkts, bsize, new_size, old_size); - if (rc) - CDEBUG(D_INFO, "early quit of rehashing: %d\n", rc); -} - -/** - * Rehash the object referenced by @hnode in the libcfs hash @hs. The - * @old_key must be provided to locate the objects previous location - * in the hash, and the @new_key will be used to reinsert the object. - * Use this function instead of a cfs_hash_add() + cfs_hash_del() - * combo when it is critical that there is no window in time where the - * object is missing from the hash. When an object is being rehashed - * the registered cfs_hash_get() and cfs_hash_put() functions will - * not be called. - */ -void cfs_hash_rehash_key(struct cfs_hash *hs, const void *old_key, - void *new_key, struct hlist_node *hnode) -{ - struct cfs_hash_bd bds[3]; - struct cfs_hash_bd old_bds[2]; - struct cfs_hash_bd new_bd; - - LASSERT(!hlist_unhashed(hnode)); - - cfs_hash_lock(hs, 0); - - cfs_hash_dual_bd_get(hs, old_key, old_bds); - cfs_hash_bd_get(hs, new_key, &new_bd); - - bds[0] = old_bds[0]; - bds[1] = old_bds[1]; - bds[2] = new_bd; - - /* NB: bds[0] and bds[1] are ordered already */ - cfs_hash_bd_order(&bds[1], &bds[2]); - cfs_hash_bd_order(&bds[0], &bds[1]); - - cfs_hash_multi_bd_lock(hs, bds, 3, 1); - if (likely(!old_bds[1].bd_bucket)) { - cfs_hash_bd_move_locked(hs, &old_bds[0], &new_bd, hnode); - } else { - cfs_hash_dual_bd_finddel_locked(hs, old_bds, old_key, hnode); - cfs_hash_bd_add_locked(hs, &new_bd, hnode); - } - /* overwrite key inside locks, otherwise may screw up with - * other operations, i.e: rehash - */ - cfs_hash_keycpy(hs, hnode, new_key); - - cfs_hash_multi_bd_unlock(hs, bds, 3, 1); - cfs_hash_unlock(hs, 0); -} -EXPORT_SYMBOL(cfs_hash_rehash_key); - -void cfs_hash_debug_header(struct seq_file *m) -{ - seq_printf(m, "%-*s cur min max theta t-min t-max flags rehash count maxdep maxdepb distribution\n", - CFS_HASH_BIGNAME_LEN, "name"); -} -EXPORT_SYMBOL(cfs_hash_debug_header); - -static struct cfs_hash_bucket ** -cfs_hash_full_bkts(struct cfs_hash *hs) -{ - /* NB: caller should hold hs->hs_rwlock if REHASH is set */ - if (!hs->hs_rehash_buckets) - return hs->hs_buckets; - - LASSERT(hs->hs_rehash_bits); - return hs->hs_rehash_bits > hs->hs_cur_bits ? - hs->hs_rehash_buckets : hs->hs_buckets; -} - -static unsigned int -cfs_hash_full_nbkt(struct cfs_hash *hs) -{ - /* NB: caller should hold hs->hs_rwlock if REHASH is set */ - if (!hs->hs_rehash_buckets) - return CFS_HASH_NBKT(hs); - - LASSERT(hs->hs_rehash_bits); - return hs->hs_rehash_bits > hs->hs_cur_bits ? - CFS_HASH_RH_NBKT(hs) : CFS_HASH_NBKT(hs); -} - -void cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m) -{ - int dist[8] = { 0, }; - int maxdep = -1; - int maxdepb = -1; - int total = 0; - int theta; - int i; - - cfs_hash_lock(hs, 0); - theta = __cfs_hash_theta(hs); - - seq_printf(m, "%-*s %5d %5d %5d %d.%03d %d.%03d %d.%03d 0x%02x %6d ", - CFS_HASH_BIGNAME_LEN, hs->hs_name, - 1 << hs->hs_cur_bits, 1 << hs->hs_min_bits, - 1 << hs->hs_max_bits, - __cfs_hash_theta_int(theta), __cfs_hash_theta_frac(theta), - __cfs_hash_theta_int(hs->hs_min_theta), - __cfs_hash_theta_frac(hs->hs_min_theta), - __cfs_hash_theta_int(hs->hs_max_theta), - __cfs_hash_theta_frac(hs->hs_max_theta), - hs->hs_flags, hs->hs_rehash_count); - - /* - * The distribution is a summary of the chained hash depth in - * each of the libcfs hash buckets. Each buckets hsb_count is - * divided by the hash theta value and used to generate a - * histogram of the hash distribution. A uniform hash will - * result in all hash buckets being close to the average thus - * only the first few entries in the histogram will be non-zero. - * If you hash function results in a non-uniform hash the will - * be observable by outlier bucks in the distribution histogram. - * - * Uniform hash distribution: 128/128/0/0/0/0/0/0 - * Non-Uniform hash distribution: 128/125/0/0/0/0/2/1 - */ - for (i = 0; i < cfs_hash_full_nbkt(hs); i++) { - struct cfs_hash_bd bd; - - bd.bd_bucket = cfs_hash_full_bkts(hs)[i]; - cfs_hash_bd_lock(hs, &bd, 0); - if (maxdep < bd.bd_bucket->hsb_depmax) { - maxdep = bd.bd_bucket->hsb_depmax; - maxdepb = ffz(~maxdep); - } - total += bd.bd_bucket->hsb_count; - dist[min(fls(bd.bd_bucket->hsb_count / max(theta, 1)), 7)]++; - cfs_hash_bd_unlock(hs, &bd, 0); - } - - seq_printf(m, "%7d %7d %7d ", total, maxdep, maxdepb); - for (i = 0; i < 8; i++) - seq_printf(m, "%d%c", dist[i], (i == 7) ? '\n' : '/'); - - cfs_hash_unlock(hs, 0); -} -EXPORT_SYMBOL(cfs_hash_debug_str); diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index a03f924f1d7c..4b5a4c1b86c3 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -547,13 +547,6 @@ static int libcfs_init(void) goto cleanup_cpu; } - cfs_rehash_wq = alloc_workqueue("cfs_rh", WQ_SYSFS, 4); - if (!cfs_rehash_wq) { - CERROR("Failed to start rehash workqueue.\n"); - rc = -ENOMEM; - goto cleanup_deregister; - } - rc = cfs_crypto_register(); if (rc) { CERROR("cfs_crypto_register: error %d\n", rc); @@ -579,11 +572,6 @@ static void libcfs_exit(void) lustre_remove_debugfs(); - if (cfs_rehash_wq) { - destroy_workqueue(cfs_rehash_wq); - cfs_rehash_wq = NULL; - } - cfs_crypto_unregister(); misc_deregister(&libcfs_dev); From dinatale2 at llnl.gov Thu Apr 12 19:53:47 2018 From: dinatale2 at llnl.gov (Di Natale, Giuseppe) Date: Thu, 12 Apr 2018 19:53:47 +0000 Subject: [lustre-devel] LNET Configuration Update/Reconciliation Message-ID: Greetings Developers, We are currently using modprobe.conf to configure routes, but we are hoping to reach a point where we can push out new LNET configurations to nodes and have lnetctl apply configuration changes on the fly. It would be nice to have the ability to update or "reconcile" the difference between the loaded configuration and an updated configuration being imported. I was exploring how to implement such functionality in lnetctl. Would others find such functionality useful? My current thought is that I'd implement this as a new lnetctl subcommand (i.e. "update"). Does that seem reasonable or would you suggest another interface? Thanks, Giuseppe -------------- next part -------------- An HTML attachment was scrubbed... URL: From bevans at cray.com Fri Apr 13 14:01:15 2018 From: bevans at cray.com (Ben Evans) Date: Fri, 13 Apr 2018 14:01:15 +0000 Subject: [lustre-devel] LNET Configuration Update/Reconciliation Message-ID: In LU-4939, I'm working on exporting and importing the parameters set via lctl conf_param and set_param -P. The output is in yaml, and I've got an importer working in a separate patch that has yet to be accepted upstream. Would you consider having an exporter for the lnetctl and modprobe.conf settings into yaml so that you could migrate between the two methods of setting configuration? From: lustre-devel > on behalf of "Di Natale, Giuseppe" > Date: Thursday, April 12, 2018 at 3:53 PM To: "lustre-devel at lists.lustre.org" > Subject: [lustre-devel] LNET Configuration Update/Reconciliation Greetings Developers, We are currently using modprobe.conf to configure routes, but we are hoping to reach a point where we can push out new LNET configurations to nodes and have lnetctl apply configuration changes on the fly. It would be nice to have the ability to update or "reconcile" the difference between the loaded configuration and an updated configuration being imported. I was exploring how to implement such functionality in lnetctl. Would others find such functionality useful? My current thought is that I'd implement this as a new lnetctl subcommand (i.e. "update"). Does that seem reasonable or would you suggest another interface? Thanks, Giuseppe -------------- next part -------------- An HTML attachment was scrubbed... URL: From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 0/6] staging: lustre: code rearrangement Message-ID: <152383910760.23409.2327082725637657049.stgit@noble> This series rearranges some code and manages to delete four files in the process, all from directories called "linux". This results in drivers/staging/lustre/include/linux/libcfs/linux becoming empty, so it disappears too. These patches depend on [PATCH] staging: lustre: libcfs: use dynamic minors for /dev/{lnet,obd} which James posted on 30th March. Thanks, NeilBrown --- NeilBrown (6): staging: lustre: move stack-check macros to libcfs_debug.h staging: lustre: remove libcfs/linux/libcfs.h staging: lustre: remove include/linux/libcfs/linux/linux-cpu.h staging: lustre: rearrange placement of CPU partition management code. staging: lustre: move misc-device registration closer to related code. staging: lustre: move remaining code from linux-module.c to module.c .../staging/lustre/include/linux/libcfs/libcfs.h | 48 + .../lustre/include/linux/libcfs/libcfs_cpu.h | 206 +++- .../lustre/include/linux/libcfs/libcfs_debug.h | 32 + .../lustre/include/linux/libcfs/linux/libcfs.h | 114 -- .../lustre/include/linux/libcfs/linux/linux-cpu.h | 78 - drivers/staging/lustre/lnet/libcfs/Makefile | 2 drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 961 +++++++++++++++++- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 1079 -------------------- .../lustre/lnet/libcfs/linux/linux-module.c | 196 ---- drivers/staging/lustre/lnet/libcfs/module.c | 162 +++ 10 files changed, 1344 insertions(+), 1534 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h delete mode 100644 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c delete mode 100644 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c -- Signature From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: <152383910760.23409.2327082725637657049.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> Message-ID: <152383935730.23409.6748888065027051683.stgit@noble> CDEBUG_STACK() and CHECK_STACK() are macros to help with debugging, so move them from drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h to drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h This seems a more fitting location, and is a step towards removing linux/libcfs.h and simplifying the include file structure. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_debug.h | 32 ++++++++++++++++++++ .../lustre/include/linux/libcfs/linux/libcfs.h | 31 ------------------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h index 9290a19429e7..0dc7b91efe7c 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h @@ -62,6 +62,38 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); extern unsigned int libcfs_catastrophe; extern unsigned int libcfs_panic_on_lbug; +/* Enable debug-checks on stack size - except on x86_64 */ +#if !defined(__x86_64__) +# ifdef __ia64__ +# define CDEBUG_STACK() (THREAD_SIZE - \ + ((unsigned long)__builtin_dwarf_cfa() & \ + (THREAD_SIZE - 1))) +# else +# define CDEBUG_STACK() (THREAD_SIZE - \ + ((unsigned long)__builtin_frame_address(0) & \ + (THREAD_SIZE - 1))) +# endif /* __ia64__ */ + +#define __CHECK_STACK(msgdata, mask, cdls) \ +do { \ + if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ + LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ + libcfs_stack = CDEBUG_STACK(); \ + libcfs_debug_msg(msgdata, \ + "maximum lustre stack %lu\n", \ + CDEBUG_STACK()); \ + (msgdata)->msg_mask = mask; \ + (msgdata)->msg_cdls = cdls; \ + dump_stack(); \ + /*panic("LBUG");*/ \ + } \ +} while (0) +#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) +#else /* __x86_64__ */ +#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) +#define CDEBUG_STACK() (0L) +#endif /* __x86_64__ */ + #ifndef DEBUG_SUBSYSTEM # define DEBUG_SUBSYSTEM S_UNDEFINED #endif diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h index 07d3cb2217d1..83aec9c7698f 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h @@ -80,35 +80,4 @@ #include #include "linux-cpu.h" -#if !defined(__x86_64__) -# ifdef __ia64__ -# define CDEBUG_STACK() (THREAD_SIZE - \ - ((unsigned long)__builtin_dwarf_cfa() & \ - (THREAD_SIZE - 1))) -# else -# define CDEBUG_STACK() (THREAD_SIZE - \ - ((unsigned long)__builtin_frame_address(0) & \ - (THREAD_SIZE - 1))) -# endif /* __ia64__ */ - -#define __CHECK_STACK(msgdata, mask, cdls) \ -do { \ - if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ - LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ - libcfs_stack = CDEBUG_STACK(); \ - libcfs_debug_msg(msgdata, \ - "maximum lustre stack %lu\n", \ - CDEBUG_STACK()); \ - (msgdata)->msg_mask = mask; \ - (msgdata)->msg_cdls = cdls; \ - dump_stack(); \ - /*panic("LBUG");*/ \ - } \ -} while (0) -#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) -#else /* __x86_64__ */ -#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) -#define CDEBUG_STACK() (0L) -#endif /* __x86_64__ */ - #endif /* _LINUX_LIBCFS_H */ From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 2/6] staging: lustre: remove libcfs/linux/libcfs.h In-Reply-To: <152383910760.23409.2327082725637657049.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> Message-ID: <152383935734.23409.11654775387996961581.stgit@noble> This include file is only included in one place, and only contains a list of other include directives. So just move all those to the place where this file is included, and discard the file. One include directive uses a local name ("linux-cpu.h"), so that needs to be given a proper path. Probably many of these should be remove from here, and moved to just the files that need them. Signed-off-by: NeilBrown --- .../staging/lustre/include/linux/libcfs/libcfs.h | 43 ++++++++++ .../lustre/include/linux/libcfs/linux/libcfs.h | 83 -------------------- 2 files changed, 42 insertions(+), 84 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index 62e46aa3c554..e59d107d6482 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -38,7 +38,48 @@ #include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h deleted file mode 100644 index 83aec9c7698f..000000000000 --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#ifndef __LIBCFS_LINUX_LIBCFS_H__ -#define __LIBCFS_LINUX_LIBCFS_H__ - -#ifndef __LIBCFS_LIBCFS_H__ -#error Do not #include this file directly. #include instead -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "linux-cpu.h" - -#endif /* _LINUX_LIBCFS_H */ From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 3/6] staging: lustre: remove include/linux/libcfs/linux/linux-cpu.h In-Reply-To: <152383910760.23409.2327082725637657049.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> Message-ID: <152383935737.23409.2271901486597092772.stgit@noble> This include file contains definitions used when CONFIG_SMP is in effect. Other includes contain corresponding definitions for when it isn't. This can be hard to follow, so move the definitions to the one place. As HAVE_LIBCFS_CPT is defined precisely when CONFIG_SMP, we discard that macro and just use CONFIG_SMP when needed. --- .../staging/lustre/include/linux/libcfs/libcfs.h | 1 .../lustre/include/linux/libcfs/libcfs_cpu.h | 33 ++++++++ .../lustre/include/linux/libcfs/linux/linux-cpu.h | 78 -------------------- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 4 + 4 files changed, 35 insertions(+), 81 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index e59d107d6482..aca1f19c4977 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -78,7 +78,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 61bce77fddd6..829c35e68db8 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -72,10 +72,43 @@ #ifndef __LIBCFS_CPU_H__ #define __LIBCFS_CPU_H__ +#include +#include +#include + /* any CPU partition */ #define CFS_CPT_ANY (-1) #ifdef CONFIG_SMP +/** virtual processing unit */ +struct cfs_cpu_partition { + /* CPUs mask for this partition */ + cpumask_var_t cpt_cpumask; + /* nodes mask for this partition */ + nodemask_t *cpt_nodemask; + /* spread rotor for NUMA allocator */ + unsigned int cpt_spread_rotor; +}; + + +/** descriptor for CPU partitions */ +struct cfs_cpt_table { + /* version, reserved for hotplug */ + unsigned int ctb_version; + /* spread rotor for NUMA allocator */ + unsigned int ctb_spread_rotor; + /* # of CPU partitions */ + unsigned int ctb_nparts; + /* partitions tables */ + struct cfs_cpu_partition *ctb_parts; + /* shadow HW CPU to CPU partition ID */ + int *ctb_cpu2cpt; + /* all cpus in this partition table */ + cpumask_var_t ctb_cpumask; + /* all nodes in this partition table */ + nodemask_t *ctb_nodemask; +}; + /** * return cpumask of CPU partition \a cpt */ diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h deleted file mode 100644 index 6035376f2830..000000000000 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * GPL HEADER END - */ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * libcfs/include/libcfs/linux/linux-cpu.h - * - * Basic library routines. - * - * Author: liang at whamcloud.com - */ - -#ifndef __LIBCFS_LINUX_CPU_H__ -#define __LIBCFS_LINUX_CPU_H__ - -#ifndef __LIBCFS_LIBCFS_H__ -#error Do not #include this file directly. #include instead -#endif - -#include -#include -#include - -#ifdef CONFIG_SMP - -#define HAVE_LIBCFS_CPT - -/** virtual processing unit */ -struct cfs_cpu_partition { - /* CPUs mask for this partition */ - cpumask_var_t cpt_cpumask; - /* nodes mask for this partition */ - nodemask_t *cpt_nodemask; - /* spread rotor for NUMA allocator */ - unsigned int cpt_spread_rotor; -}; - -/** descriptor for CPU partitions */ -struct cfs_cpt_table { - /* version, reserved for hotplug */ - unsigned int ctb_version; - /* spread rotor for NUMA allocator */ - unsigned int ctb_spread_rotor; - /* # of CPU partitions */ - unsigned int ctb_nparts; - /* partitions tables */ - struct cfs_cpu_partition *ctb_parts; - /* shadow HW CPU to CPU partition ID */ - int *ctb_cpu2cpt; - /* all cpus in this partition table */ - cpumask_var_t ctb_cpumask; - /* all nodes in this partition table */ - nodemask_t *ctb_nodemask; -}; - -#endif /* CONFIG_SMP */ -#endif /* __LIBCFS_LINUX_CPU_H__ */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 76291a350406..5818f641455f 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -37,7 +37,7 @@ struct cfs_cpt_table *cfs_cpt_table __read_mostly; EXPORT_SYMBOL(cfs_cpt_table); -#ifndef HAVE_LIBCFS_CPT +#ifndef CONFIG_SMP #define CFS_CPU_VERSION_MAGIC 0xbabecafe @@ -225,4 +225,4 @@ cfs_cpu_init(void) return cfs_cpt_table ? 0 : -1; } -#endif /* HAVE_LIBCFS_CPT */ +#endif /* CONFIG_SMP */ From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 4/6] staging: lustre: rearrange placement of CPU partition management code. In-Reply-To: <152383910760.23409.2327082725637657049.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> Message-ID: <152383935741.23409.6012110568532986137.stgit@noble> Currently the code for cpu-partition tables lives in various places. The non-SMP code is partly in libcfs/libcfs_cpu.h as static inlines, and partly in lnet/libcfs/libcfs_cpu.c - some of the functions are tiny and could well be inlines. The SMP code is all in lnet/libcfs/linux/linux-cpu.c. This patch moves all the trivial non-SMP functions into libcfs_cpu.h as inlines, and all the SMP functions into libcfs_cpu.c with the non-trival !SMP code. Now when you go looking for some function, it is easier to find both versions together when neither is trivial. There is no code change here - just code movement. Signed-off-by: NeilBrown --- .../lustre/include/linux/libcfs/libcfs_cpu.h | 173 +++ drivers/staging/lustre/lnet/libcfs/Makefile | 1 drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 959 +++++++++++++++++- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 1079 -------------------- 4 files changed, 1076 insertions(+), 1136 deletions(-) delete mode 100644 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 829c35e68db8..813ba4564bb9 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -117,41 +117,6 @@ cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt); * print string information of cpt-table */ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); -#else /* !CONFIG_SMP */ -struct cfs_cpt_table { - /* # of CPU partitions */ - int ctb_nparts; - /* cpu mask */ - cpumask_t ctb_mask; - /* node mask */ - nodemask_t ctb_nodemask; - /* version */ - u64 ctb_version; -}; - -static inline cpumask_var_t * -cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) -{ - return NULL; -} - -static inline int -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) -{ - return 0; -} -#endif /* CONFIG_SMP */ - -extern struct cfs_cpt_table *cfs_cpt_table; - -/** - * destroy a CPU partition table - */ -void cfs_cpt_table_free(struct cfs_cpt_table *cptab); -/** - * create a cfs_cpt_table with \a ncpt number of partitions - */ -struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); /** * return total number of CPU partitions in \a cptab */ @@ -237,6 +202,144 @@ int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt); */ int cfs_cpu_ht_nsiblings(int cpu); +#else /* !CONFIG_SMP */ +struct cfs_cpt_table { + /* # of CPU partitions */ + int ctb_nparts; + /* cpu mask */ + cpumask_t ctb_mask; + /* node mask */ + nodemask_t ctb_nodemask; + /* version */ + u64 ctb_version; +}; + +static inline cpumask_var_t * +cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) +{ + return NULL; +} + +static inline int +cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) +{ + return 0; +} +static inline int +cfs_cpt_number(struct cfs_cpt_table *cptab) +{ + return 1; +} + +static inline int +cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) +{ + return 1; +} + +static inline int +cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) +{ + return 1; +} + +static inline nodemask_t * +cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) +{ + return &cptab->ctb_nodemask; +} + +static inline int +cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +{ + return 1; +} + +static inline void +cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +{ +} + +static inline int +cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) +{ + return 1; +} + +static inline void +cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) +{ +} + +static inline int +cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) +{ + return 1; +} + +static inline void +cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) +{ +} + +static inline int +cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) +{ + return 1; +} + +static inline void +cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) +{ +} + +static inline void +cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) +{ +} + +static inline int +cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) +{ + return 0; +} + +static inline int +cfs_cpu_ht_nsiblings(int cpu) +{ + return 1; +} + +static inline int +cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) +{ + return 0; +} + +static inline int +cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) +{ + return 0; +} + +static inline int +cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) +{ + return 0; +} +#endif /* CONFIG_SMP */ + +extern struct cfs_cpt_table *cfs_cpt_table; + +/** + * destroy a CPU partition table + */ +void cfs_cpt_table_free(struct cfs_cpt_table *cptab); +/** + * create a cfs_cpt_table with \a ncpt number of partitions + */ +struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); + /* * allocate per-cpu-partition data, returned value is an array of pointers, * variable can be indexed by CPU ID. diff --git a/drivers/staging/lustre/lnet/libcfs/Makefile b/drivers/staging/lustre/lnet/libcfs/Makefile index 36b49a6b7b88..673fe348c445 100644 --- a/drivers/staging/lustre/lnet/libcfs/Makefile +++ b/drivers/staging/lustre/lnet/libcfs/Makefile @@ -5,7 +5,6 @@ subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include obj-$(CONFIG_LNET) += libcfs.o libcfs-linux-objs := linux-tracefile.o linux-debug.o -libcfs-linux-objs += linux-cpu.o libcfs-linux-objs += linux-module.o libcfs-linux-objs += linux-crypto.o libcfs-linux-objs += linux-crypto-adler.o diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 5818f641455f..ac6fd11ae9d6 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -36,11 +36,110 @@ /** Global CPU partition table */ struct cfs_cpt_table *cfs_cpt_table __read_mostly; EXPORT_SYMBOL(cfs_cpt_table); +#define DEBUG_SUBSYSTEM S_LNET + +#include +#include +#include + +#ifdef CONFIG_SMP +/** + * modparam for setting number of partitions + * + * 0 : estimate best value based on cores or NUMA nodes + * 1 : disable multiple partitions + * >1 : specify number of partitions + */ +static int cpu_npartitions; +module_param(cpu_npartitions, int, 0444); +MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions"); + +/** + * modparam for setting CPU partitions patterns: + * + * i.e: "0[0,1,2,3] 1[4,5,6,7]", number before bracket is CPU partition ID, + * number in bracket is processor ID (core or HT) + * + * i.e: "N 0[0,1] 1[2,3]" the first character 'N' means numbers in bracket + * are NUMA node ID, number before bracket is CPU partition ID. + * + * i.e: "N", shortcut expression to create CPT from NUMA & CPU topology + * + * NB: If user specified cpu_pattern, cpu_npartitions will be ignored + */ +static char *cpu_pattern = "N"; +module_param(cpu_pattern, charp, 0444); +MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern"); -#ifndef CONFIG_SMP +static struct cfs_cpt_data { + /* serialize hotplug etc */ + spinlock_t cpt_lock; + /* reserved for hotplug */ + unsigned long cpt_version; + /* mutex to protect cpt_cpumask */ + struct mutex cpt_mutex; + /* scratch buffer for set/unset_node */ + cpumask_var_t cpt_cpumask; +} cpt_data; +#endif #define CFS_CPU_VERSION_MAGIC 0xbabecafe +#ifdef CONFIG_SMP +struct cfs_cpt_table * +cfs_cpt_table_alloc(unsigned int ncpt) +{ + struct cfs_cpt_table *cptab; + int i; + + cptab = kzalloc(sizeof(*cptab), GFP_NOFS); + if (!cptab) + return NULL; + + cptab->ctb_nparts = ncpt; + + cptab->ctb_nodemask = kzalloc(sizeof(*cptab->ctb_nodemask), + GFP_NOFS); + if (!zalloc_cpumask_var(&cptab->ctb_cpumask, GFP_NOFS) || + !cptab->ctb_nodemask) + goto failed; + + cptab->ctb_cpu2cpt = kvmalloc_array(num_possible_cpus(), + sizeof(cptab->ctb_cpu2cpt[0]), + GFP_KERNEL); + if (!cptab->ctb_cpu2cpt) + goto failed; + + memset(cptab->ctb_cpu2cpt, -1, + num_possible_cpus() * sizeof(cptab->ctb_cpu2cpt[0])); + + cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), + GFP_KERNEL); + if (!cptab->ctb_parts) + goto failed; + + for (i = 0; i < ncpt; i++) { + struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; + + part->cpt_nodemask = kzalloc(sizeof(*part->cpt_nodemask), + GFP_NOFS); + if (!zalloc_cpumask_var(&part->cpt_cpumask, GFP_NOFS) || + !part->cpt_nodemask) + goto failed; + } + + spin_lock(&cpt_data.cpt_lock); + /* Reserved for hotplug */ + cptab->ctb_version = cpt_data.cpt_version; + spin_unlock(&cpt_data.cpt_lock); + + return cptab; + + failed: + cfs_cpt_table_free(cptab); + return NULL; +} +#else /* ! CONFIG_SMP */ struct cfs_cpt_table * cfs_cpt_table_alloc(unsigned int ncpt) { @@ -60,8 +159,32 @@ cfs_cpt_table_alloc(unsigned int ncpt) return cptab; } +#endif /* CONFIG_SMP */ EXPORT_SYMBOL(cfs_cpt_table_alloc); +#ifdef CONFIG_SMP +void +cfs_cpt_table_free(struct cfs_cpt_table *cptab) +{ + int i; + + kvfree(cptab->ctb_cpu2cpt); + + for (i = 0; cptab->ctb_parts && i < cptab->ctb_nparts; i++) { + struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; + + kfree(part->cpt_nodemask); + free_cpumask_var(part->cpt_cpumask); + } + + kvfree(cptab->ctb_parts); + + kfree(cptab->ctb_nodemask); + free_cpumask_var(cptab->ctb_cpumask); + + kfree(cptab); +} +#else /* ! CONFIG_SMP */ void cfs_cpt_table_free(struct cfs_cpt_table *cptab) { @@ -69,55 +192,153 @@ cfs_cpt_table_free(struct cfs_cpt_table *cptab) kfree(cptab); } +#endif /* CONFIG_SMP */ EXPORT_SYMBOL(cfs_cpt_table_free); #ifdef CONFIG_SMP int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { - int rc; + char *tmp = buf; + int rc = 0; + int i; + int j; - rc = snprintf(buf, len, "%d\t: %d\n", 0, 0); - len -= rc; - if (len <= 0) - return -EFBIG; + for (i = 0; i < cptab->ctb_nparts; i++) { + if (len > 0) { + rc = snprintf(tmp, len, "%d\t: ", i); + len -= rc; + } - return rc; + if (len <= 0) { + rc = -EFBIG; + goto out; + } + + tmp += rc; + for_each_cpu(j, cptab->ctb_parts[i].cpt_cpumask) { + rc = snprintf(tmp, len, "%d ", j); + len -= rc; + if (len <= 0) { + rc = -EFBIG; + goto out; + } + tmp += rc; + } + + *tmp = '\n'; + tmp++; + len--; + } + + out: + if (rc < 0) + return rc; + + return tmp - buf; } EXPORT_SYMBOL(cfs_cpt_table_print); #endif /* CONFIG_SMP */ +#ifdef CONFIG_SMP +static void +cfs_node_to_cpumask(int node, cpumask_t *mask) +{ + const cpumask_t *tmp = cpumask_of_node(node); + + if (tmp) + cpumask_copy(mask, tmp); + else + cpumask_clear(mask); +} + int cfs_cpt_number(struct cfs_cpt_table *cptab) { - return 1; + return cptab->ctb_nparts; } EXPORT_SYMBOL(cfs_cpt_number); int cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) { - return 1; + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); + + return cpt == CFS_CPT_ANY ? + cpumask_weight(cptab->ctb_cpumask) : + cpumask_weight(cptab->ctb_parts[cpt].cpt_cpumask); } EXPORT_SYMBOL(cfs_cpt_weight); int cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) { - return 1; + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); + + return cpt == CFS_CPT_ANY ? + cpumask_any_and(cptab->ctb_cpumask, + cpu_online_mask) < nr_cpu_ids : + cpumask_any_and(cptab->ctb_parts[cpt].cpt_cpumask, + cpu_online_mask) < nr_cpu_ids; } EXPORT_SYMBOL(cfs_cpt_online); +cpumask_var_t * +cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) +{ + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); + + return cpt == CFS_CPT_ANY ? + &cptab->ctb_cpumask : &cptab->ctb_parts[cpt].cpt_cpumask; +} +EXPORT_SYMBOL(cfs_cpt_cpumask); + nodemask_t * cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) { - return &cptab->ctb_nodemask; + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); + + return cpt == CFS_CPT_ANY ? + cptab->ctb_nodemask : cptab->ctb_parts[cpt].cpt_nodemask; } EXPORT_SYMBOL(cfs_cpt_nodemask); int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { + int node; + + LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); + + if (cpu < 0 || cpu >= nr_cpu_ids || !cpu_online(cpu)) { + CDEBUG(D_INFO, "CPU %d is invalid or it's offline\n", cpu); + return 0; + } + + if (cptab->ctb_cpu2cpt[cpu] != -1) { + CDEBUG(D_INFO, "CPU %d is already in partition %d\n", + cpu, cptab->ctb_cpu2cpt[cpu]); + return 0; + } + + cptab->ctb_cpu2cpt[cpu] = cpt; + + LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); + LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); + + cpumask_set_cpu(cpu, cptab->ctb_cpumask); + cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); + + node = cpu_to_node(cpu); + + /* first CPU of @node in this CPT table */ + if (!node_isset(node, *cptab->ctb_nodemask)) + node_set(node, *cptab->ctb_nodemask); + + /* first CPU of @node in this partition */ + if (!node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)) + node_set(node, *cptab->ctb_parts[cpt].cpt_nodemask); + return 1; } EXPORT_SYMBOL(cfs_cpt_set_cpu); @@ -125,12 +346,80 @@ EXPORT_SYMBOL(cfs_cpt_set_cpu); void cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { + int node; + int i; + + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); + + if (cpu < 0 || cpu >= nr_cpu_ids) { + CDEBUG(D_INFO, "Invalid CPU id %d\n", cpu); + return; + } + + if (cpt == CFS_CPT_ANY) { + /* caller doesn't know the partition ID */ + cpt = cptab->ctb_cpu2cpt[cpu]; + if (cpt < 0) { /* not set in this CPT-table */ + CDEBUG(D_INFO, "Try to unset cpu %d which is not in CPT-table %p\n", + cpt, cptab); + return; + } + + } else if (cpt != cptab->ctb_cpu2cpt[cpu]) { + CDEBUG(D_INFO, + "CPU %d is not in cpu-partition %d\n", cpu, cpt); + return; + } + + LASSERT(cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); + LASSERT(cpumask_test_cpu(cpu, cptab->ctb_cpumask)); + + cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); + cpumask_clear_cpu(cpu, cptab->ctb_cpumask); + cptab->ctb_cpu2cpt[cpu] = -1; + + node = cpu_to_node(cpu); + + LASSERT(node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)); + LASSERT(node_isset(node, *cptab->ctb_nodemask)); + + for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) { + /* this CPT has other CPU belonging to this node? */ + if (cpu_to_node(i) == node) + break; + } + + if (i >= nr_cpu_ids) + node_clear(node, *cptab->ctb_parts[cpt].cpt_nodemask); + + for_each_cpu(i, cptab->ctb_cpumask) { + /* this CPT-table has other CPU belonging to this node? */ + if (cpu_to_node(i) == node) + break; + } + + if (i >= nr_cpu_ids) + node_clear(node, *cptab->ctb_nodemask); } EXPORT_SYMBOL(cfs_cpt_unset_cpu); int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) { + int i; + + if (!cpumask_weight(mask) || + cpumask_any_and(mask, cpu_online_mask) >= nr_cpu_ids) { + CDEBUG(D_INFO, "No online CPU is found in the CPU mask for CPU partition %d\n", + cpt); + return 0; + } + + for_each_cpu(i, mask) { + if (!cfs_cpt_set_cpu(cptab, cpt, i)) + return 0; + } + return 1; } EXPORT_SYMBOL(cfs_cpt_set_cpumask); @@ -138,25 +427,65 @@ EXPORT_SYMBOL(cfs_cpt_set_cpumask); void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) { + int i; + + for_each_cpu(i, mask) + cfs_cpt_unset_cpu(cptab, cpt, i); } EXPORT_SYMBOL(cfs_cpt_unset_cpumask); int cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) { - return 1; + int rc; + + if (node < 0 || node >= MAX_NUMNODES) { + CDEBUG(D_INFO, + "Invalid NUMA id %d for CPU partition %d\n", node, cpt); + return 0; + } + + mutex_lock(&cpt_data.cpt_mutex); + + cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); + + rc = cfs_cpt_set_cpumask(cptab, cpt, cpt_data.cpt_cpumask); + + mutex_unlock(&cpt_data.cpt_mutex); + + return rc; } EXPORT_SYMBOL(cfs_cpt_set_node); void cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) { + if (node < 0 || node >= MAX_NUMNODES) { + CDEBUG(D_INFO, + "Invalid NUMA id %d for CPU partition %d\n", node, cpt); + return; + } + + mutex_lock(&cpt_data.cpt_mutex); + + cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); + + cfs_cpt_unset_cpumask(cptab, cpt, cpt_data.cpt_cpumask); + + mutex_unlock(&cpt_data.cpt_mutex); } EXPORT_SYMBOL(cfs_cpt_unset_node); int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) { + int i; + + for_each_node_mask(i, *mask) { + if (!cfs_cpt_set_node(cptab, cpt, i)) + return 0; + } + return 1; } EXPORT_SYMBOL(cfs_cpt_set_nodemask); @@ -164,50 +493,638 @@ EXPORT_SYMBOL(cfs_cpt_set_nodemask); void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) { + int i; + + for_each_node_mask(i, *mask) + cfs_cpt_unset_node(cptab, cpt, i); } EXPORT_SYMBOL(cfs_cpt_unset_nodemask); void cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) { + int last; + int i; + + if (cpt == CFS_CPT_ANY) { + last = cptab->ctb_nparts - 1; + cpt = 0; + } else { + last = cpt; + } + + for (; cpt <= last; cpt++) { + for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) + cfs_cpt_unset_cpu(cptab, cpt, i); + } } EXPORT_SYMBOL(cfs_cpt_clear); int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) { + nodemask_t *mask; + int weight; + int rotor; + int node; + + /* convert CPU partition ID to HW node id */ + + if (cpt < 0 || cpt >= cptab->ctb_nparts) { + mask = cptab->ctb_nodemask; + rotor = cptab->ctb_spread_rotor++; + } else { + mask = cptab->ctb_parts[cpt].cpt_nodemask; + rotor = cptab->ctb_parts[cpt].cpt_spread_rotor++; + } + + weight = nodes_weight(*mask); + LASSERT(weight > 0); + + rotor %= weight; + + for_each_node_mask(node, *mask) { + if (!rotor--) + return node; + } + + LBUG(); return 0; } EXPORT_SYMBOL(cfs_cpt_spread_node); -int -cfs_cpu_ht_nsiblings(int cpu) -{ - return 1; -} -EXPORT_SYMBOL(cfs_cpu_ht_nsiblings); - int cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) { - return 0; + int cpu; + int cpt; + + preempt_disable(); + cpu = smp_processor_id(); + cpt = cptab->ctb_cpu2cpt[cpu]; + + if (cpt < 0 && remap) { + /* don't return negative value for safety of upper layer, + * instead we shadow the unknown cpu to a valid partition ID + */ + cpt = cpu % cptab->ctb_nparts; + } + preempt_enable(); + return cpt; } EXPORT_SYMBOL(cfs_cpt_current); int cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) { - return 0; + LASSERT(cpu >= 0 && cpu < nr_cpu_ids); + + return cptab->ctb_cpu2cpt[cpu]; } EXPORT_SYMBOL(cfs_cpt_of_cpu); int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) { + cpumask_var_t *cpumask; + nodemask_t *nodemask; + int rc; + int i; + + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); + + if (cpt == CFS_CPT_ANY) { + cpumask = &cptab->ctb_cpumask; + nodemask = cptab->ctb_nodemask; + } else { + cpumask = &cptab->ctb_parts[cpt].cpt_cpumask; + nodemask = cptab->ctb_parts[cpt].cpt_nodemask; + } + + if (cpumask_any_and(*cpumask, cpu_online_mask) >= nr_cpu_ids) { + CERROR("No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", + cpt); + return -EINVAL; + } + + for_each_online_cpu(i) { + if (cpumask_test_cpu(i, *cpumask)) + continue; + + rc = set_cpus_allowed_ptr(current, *cpumask); + set_mems_allowed(*nodemask); + if (!rc) + schedule(); /* switch to allowed CPU */ + + return rc; + } + + /* don't need to set affinity because all online CPUs are covered */ return 0; } EXPORT_SYMBOL(cfs_cpt_bind); +#endif + +#ifdef CONFIG_SMP + +/** + * Choose max to \a number CPUs from \a node and set them in \a cpt. + * We always prefer to choose CPU in the same core/socket. + */ +static int +cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, + cpumask_t *node, int number) +{ + cpumask_var_t socket; + cpumask_var_t core; + int rc = 0; + int cpu; + + LASSERT(number > 0); + + if (number >= cpumask_weight(node)) { + while (!cpumask_empty(node)) { + cpu = cpumask_first(node); + + rc = cfs_cpt_set_cpu(cptab, cpt, cpu); + if (!rc) + return -EINVAL; + cpumask_clear_cpu(cpu, node); + } + return 0; + } + + /* + * Allocate scratch buffers + * As we cannot initialize a cpumask_var_t, we need + * to alloc both before we can risk trying to free either + */ + if (!zalloc_cpumask_var(&socket, GFP_NOFS)) + rc = -ENOMEM; + if (!zalloc_cpumask_var(&core, GFP_NOFS)) + rc = -ENOMEM; + if (rc) + goto out; + + while (!cpumask_empty(node)) { + cpu = cpumask_first(node); + + /* get cpumask for cores in the same socket */ + cpumask_copy(socket, topology_core_cpumask(cpu)); + cpumask_and(socket, socket, node); + + LASSERT(!cpumask_empty(socket)); + + while (!cpumask_empty(socket)) { + int i; + + /* get cpumask for hts in the same core */ + cpumask_copy(core, topology_sibling_cpumask(cpu)); + cpumask_and(core, core, node); + + LASSERT(!cpumask_empty(core)); + + for_each_cpu(i, core) { + cpumask_clear_cpu(i, socket); + cpumask_clear_cpu(i, node); + + rc = cfs_cpt_set_cpu(cptab, cpt, i); + if (!rc) { + rc = -EINVAL; + goto out; + } + + if (!--number) + goto out; + } + cpu = cpumask_first(socket); + } + } + +out: + free_cpumask_var(socket); + free_cpumask_var(core); + return rc; +} + +#define CPT_WEIGHT_MIN 4u + +static unsigned int +cfs_cpt_num_estimate(void) +{ + unsigned int nnode = num_online_nodes(); + unsigned int ncpu = num_online_cpus(); + unsigned int ncpt; + + if (ncpu <= CPT_WEIGHT_MIN) { + ncpt = 1; + goto out; + } + + /* generate reasonable number of CPU partitions based on total number + * of CPUs, Preferred N should be power2 and match this condition: + * 2 * (N - 1)^2 < NCPUS <= 2 * N^2 + */ + for (ncpt = 2; ncpu > 2 * ncpt * ncpt; ncpt <<= 1) + ; + + if (ncpt <= nnode) { /* fat numa system */ + while (nnode > ncpt) + nnode >>= 1; + + } else { /* ncpt > nnode */ + while ((nnode << 1) <= ncpt) + nnode <<= 1; + } + + ncpt = nnode; + +out: +#if (BITS_PER_LONG == 32) + /* config many CPU partitions on 32-bit system could consume + * too much memory + */ + ncpt = min(2U, ncpt); +#endif + while (ncpu % ncpt) + ncpt--; /* worst case is 1 */ + + return ncpt; +} + +static struct cfs_cpt_table * +cfs_cpt_table_create(int ncpt) +{ + struct cfs_cpt_table *cptab = NULL; + cpumask_var_t mask; + int cpt = 0; + int num; + int rc; + int i; + + rc = cfs_cpt_num_estimate(); + if (ncpt <= 0) + ncpt = rc; + + if (ncpt > num_online_cpus() || ncpt > 4 * rc) { + CWARN("CPU partition number %d is larger than suggested value (%d), your system may have performance issue or run out of memory while under pressure\n", + ncpt, rc); + } + + if (num_online_cpus() % ncpt) { + CERROR("CPU number %d is not multiple of cpu_npartition %d, please try different cpu_npartitions value or set pattern string by cpu_pattern=STRING\n", + (int)num_online_cpus(), ncpt); + goto failed; + } + + cptab = cfs_cpt_table_alloc(ncpt); + if (!cptab) { + CERROR("Failed to allocate CPU map(%d)\n", ncpt); + goto failed; + } + + num = num_online_cpus() / ncpt; + if (!num) { + CERROR("CPU changed while setting CPU partition\n"); + goto failed; + } + + if (!zalloc_cpumask_var(&mask, GFP_NOFS)) { + CERROR("Failed to allocate scratch cpumask\n"); + goto failed; + } + + for_each_online_node(i) { + cfs_node_to_cpumask(i, mask); + + while (!cpumask_empty(mask)) { + struct cfs_cpu_partition *part; + int n; + + /* + * Each emulated NUMA node has all allowed CPUs in + * the mask. + * End loop when all partitions have assigned CPUs. + */ + if (cpt == ncpt) + break; + + part = &cptab->ctb_parts[cpt]; + + n = num - cpumask_weight(part->cpt_cpumask); + LASSERT(n > 0); + + rc = cfs_cpt_choose_ncpus(cptab, cpt, mask, n); + if (rc < 0) + goto failed_mask; + + LASSERT(num >= cpumask_weight(part->cpt_cpumask)); + if (num == cpumask_weight(part->cpt_cpumask)) + cpt++; + } + } + + if (cpt != ncpt || + num != cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)) { + CERROR("Expect %d(%d) CPU partitions but got %d(%d), CPU hotplug/unplug while setting?\n", + cptab->ctb_nparts, num, cpt, + cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)); + goto failed_mask; + } + + free_cpumask_var(mask); + + return cptab; + + failed_mask: + free_cpumask_var(mask); + failed: + CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", + ncpt, num_online_nodes(), num_online_cpus()); + + if (cptab) + cfs_cpt_table_free(cptab); + + return NULL; +} + +static struct cfs_cpt_table * +cfs_cpt_table_create_pattern(char *pattern) +{ + struct cfs_cpt_table *cptab; + char *str; + int node = 0; + int high; + int ncpt = 0; + int cpt; + int rc; + int c; + int i; + + str = strim(pattern); + if (*str == 'n' || *str == 'N') { + pattern = str + 1; + if (*pattern != '\0') { + node = 1; + } else { /* shortcut to create CPT from NUMA & CPU topology */ + node = -1; + ncpt = num_online_nodes(); + } + } + + if (!ncpt) { /* scanning bracket which is mark of partition */ + for (str = pattern;; str++, ncpt++) { + str = strchr(str, '['); + if (!str) + break; + } + } + + if (!ncpt || + (node && ncpt > num_online_nodes()) || + (!node && ncpt > num_online_cpus())) { + CERROR("Invalid pattern %s, or too many partitions %d\n", + pattern, ncpt); + return NULL; + } + + cptab = cfs_cpt_table_alloc(ncpt); + if (!cptab) { + CERROR("Failed to allocate cpu partition table\n"); + return NULL; + } + + if (node < 0) { /* shortcut to create CPT from NUMA & CPU topology */ + cpt = 0; + + for_each_online_node(i) { + if (cpt >= ncpt) { + CERROR("CPU changed while setting CPU partition table, %d/%d\n", + cpt, ncpt); + goto failed; + } + + rc = cfs_cpt_set_node(cptab, cpt++, i); + if (!rc) + goto failed; + } + return cptab; + } + + high = node ? MAX_NUMNODES - 1 : nr_cpu_ids - 1; + + for (str = strim(pattern), c = 0;; c++) { + struct cfs_range_expr *range; + struct cfs_expr_list *el; + char *bracket = strchr(str, '['); + int n; + + if (!bracket) { + if (*str) { + CERROR("Invalid pattern %s\n", str); + goto failed; + } + if (c != ncpt) { + CERROR("expect %d partitions but found %d\n", + ncpt, c); + goto failed; + } + break; + } + + if (sscanf(str, "%d%n", &cpt, &n) < 1) { + CERROR("Invalid cpu pattern %s\n", str); + goto failed; + } + + if (cpt < 0 || cpt >= ncpt) { + CERROR("Invalid partition id %d, total partitions %d\n", + cpt, ncpt); + goto failed; + } + + if (cfs_cpt_weight(cptab, cpt)) { + CERROR("Partition %d has already been set.\n", cpt); + goto failed; + } + + str = strim(str + n); + if (str != bracket) { + CERROR("Invalid pattern %s\n", str); + goto failed; + } + + bracket = strchr(str, ']'); + if (!bracket) { + CERROR("missing right bracket for cpt %d, %s\n", + cpt, str); + goto failed; + } + + if (cfs_expr_list_parse(str, (bracket - str) + 1, + 0, high, &el)) { + CERROR("Can't parse number range: %s\n", str); + goto failed; + } + + list_for_each_entry(range, &el->el_exprs, re_link) { + for (i = range->re_lo; i <= range->re_hi; i++) { + if ((i - range->re_lo) % range->re_stride) + continue; + + rc = node ? cfs_cpt_set_node(cptab, cpt, i) : + cfs_cpt_set_cpu(cptab, cpt, i); + if (!rc) { + cfs_expr_list_free(el); + goto failed; + } + } + } + + cfs_expr_list_free(el); + + if (!cfs_cpt_online(cptab, cpt)) { + CERROR("No online CPU is found on partition %d\n", cpt); + goto failed; + } + + str = strim(bracket + 1); + } + + return cptab; + + failed: + cfs_cpt_table_free(cptab); + return NULL; +} + +#ifdef CONFIG_HOTPLUG_CPU +static enum cpuhp_state lustre_cpu_online; + +static void cfs_cpu_incr_cpt_version(void) +{ + spin_lock(&cpt_data.cpt_lock); + cpt_data.cpt_version++; + spin_unlock(&cpt_data.cpt_lock); +} + +static int cfs_cpu_online(unsigned int cpu) +{ + cfs_cpu_incr_cpt_version(); + return 0; +} + +static int cfs_cpu_dead(unsigned int cpu) +{ + bool warn; + + cfs_cpu_incr_cpt_version(); + + mutex_lock(&cpt_data.cpt_mutex); + /* if all HTs in a core are offline, it may break affinity */ + cpumask_copy(cpt_data.cpt_cpumask, topology_sibling_cpumask(cpu)); + warn = cpumask_any_and(cpt_data.cpt_cpumask, + cpu_online_mask) >= nr_cpu_ids; + mutex_unlock(&cpt_data.cpt_mutex); + CDEBUG(warn ? D_WARNING : D_INFO, + "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u]\n", + cpu); + return 0; +} +#endif + +void +cfs_cpu_fini(void) +{ + if (cfs_cpt_table) + cfs_cpt_table_free(cfs_cpt_table); + +#ifdef CONFIG_HOTPLUG_CPU + if (lustre_cpu_online > 0) + cpuhp_remove_state_nocalls(lustre_cpu_online); + cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); +#endif + free_cpumask_var(cpt_data.cpt_cpumask); +} + +int +cfs_cpu_init(void) +{ + int ret = 0; + + LASSERT(!cfs_cpt_table); + + memset(&cpt_data, 0, sizeof(cpt_data)); + + if (!zalloc_cpumask_var(&cpt_data.cpt_cpumask, GFP_NOFS)) { + CERROR("Failed to allocate scratch buffer\n"); + return -1; + } + + spin_lock_init(&cpt_data.cpt_lock); + mutex_init(&cpt_data.cpt_mutex); + +#ifdef CONFIG_HOTPLUG_CPU + ret = cpuhp_setup_state_nocalls(CPUHP_LUSTRE_CFS_DEAD, + "staging/lustre/cfe:dead", NULL, + cfs_cpu_dead); + if (ret < 0) + goto failed; + ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, + "staging/lustre/cfe:online", + cfs_cpu_online, NULL); + if (ret < 0) + goto failed; + lustre_cpu_online = ret; +#endif + ret = -EINVAL; + + if (*cpu_pattern) { + char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); + + if (!cpu_pattern_dup) { + CERROR("Failed to duplicate cpu_pattern\n"); + goto failed; + } + + cfs_cpt_table = cfs_cpt_table_create_pattern(cpu_pattern_dup); + kfree(cpu_pattern_dup); + if (!cfs_cpt_table) { + CERROR("Failed to create cptab from pattern %s\n", + cpu_pattern); + goto failed; + } + + } else { + cfs_cpt_table = cfs_cpt_table_create(cpu_npartitions); + if (!cfs_cpt_table) { + CERROR("Failed to create ptable with npartitions %d\n", + cpu_npartitions); + goto failed; + } + } + + spin_lock(&cpt_data.cpt_lock); + if (cfs_cpt_table->ctb_version != cpt_data.cpt_version) { + spin_unlock(&cpt_data.cpt_lock); + CERROR("CPU hotplug/unplug during setup\n"); + goto failed; + } + spin_unlock(&cpt_data.cpt_lock); + + LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", + num_online_nodes(), num_online_cpus(), + cfs_cpt_number(cfs_cpt_table)); + return 0; + + failed: + cfs_cpu_fini(); + return ret; +} + +#else /* ! CONFIG_SMP */ + void cfs_cpu_fini(void) { diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c deleted file mode 100644 index 388521e4e354..000000000000 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ /dev/null @@ -1,1079 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * GPL HEADER END - */ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * - * Copyright (c) 2012, 2015 Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * Author: liang at whamcloud.com - */ - -#define DEBUG_SUBSYSTEM S_LNET - -#include -#include -#include - -#ifdef CONFIG_SMP - -/** - * modparam for setting number of partitions - * - * 0 : estimate best value based on cores or NUMA nodes - * 1 : disable multiple partitions - * >1 : specify number of partitions - */ -static int cpu_npartitions; -module_param(cpu_npartitions, int, 0444); -MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions"); - -/** - * modparam for setting CPU partitions patterns: - * - * i.e: "0[0,1,2,3] 1[4,5,6,7]", number before bracket is CPU partition ID, - * number in bracket is processor ID (core or HT) - * - * i.e: "N 0[0,1] 1[2,3]" the first character 'N' means numbers in bracket - * are NUMA node ID, number before bracket is CPU partition ID. - * - * i.e: "N", shortcut expression to create CPT from NUMA & CPU topology - * - * NB: If user specified cpu_pattern, cpu_npartitions will be ignored - */ -static char *cpu_pattern = "N"; -module_param(cpu_pattern, charp, 0444); -MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern"); - -struct cfs_cpt_data { - /* serialize hotplug etc */ - spinlock_t cpt_lock; - /* reserved for hotplug */ - unsigned long cpt_version; - /* mutex to protect cpt_cpumask */ - struct mutex cpt_mutex; - /* scratch buffer for set/unset_node */ - cpumask_var_t cpt_cpumask; -}; - -static struct cfs_cpt_data cpt_data; - -static void -cfs_node_to_cpumask(int node, cpumask_t *mask) -{ - const cpumask_t *tmp = cpumask_of_node(node); - - if (tmp) - cpumask_copy(mask, tmp); - else - cpumask_clear(mask); -} - -void -cfs_cpt_table_free(struct cfs_cpt_table *cptab) -{ - int i; - - kvfree(cptab->ctb_cpu2cpt); - - for (i = 0; cptab->ctb_parts && i < cptab->ctb_nparts; i++) { - struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; - - kfree(part->cpt_nodemask); - free_cpumask_var(part->cpt_cpumask); - } - - kvfree(cptab->ctb_parts); - - kfree(cptab->ctb_nodemask); - free_cpumask_var(cptab->ctb_cpumask); - - kfree(cptab); -} -EXPORT_SYMBOL(cfs_cpt_table_free); - -struct cfs_cpt_table * -cfs_cpt_table_alloc(unsigned int ncpt) -{ - struct cfs_cpt_table *cptab; - int i; - - cptab = kzalloc(sizeof(*cptab), GFP_NOFS); - if (!cptab) - return NULL; - - cptab->ctb_nparts = ncpt; - - cptab->ctb_nodemask = kzalloc(sizeof(*cptab->ctb_nodemask), - GFP_NOFS); - if (!zalloc_cpumask_var(&cptab->ctb_cpumask, GFP_NOFS) || - !cptab->ctb_nodemask) - goto failed; - - cptab->ctb_cpu2cpt = kvmalloc_array(num_possible_cpus(), - sizeof(cptab->ctb_cpu2cpt[0]), - GFP_KERNEL); - if (!cptab->ctb_cpu2cpt) - goto failed; - - memset(cptab->ctb_cpu2cpt, -1, - num_possible_cpus() * sizeof(cptab->ctb_cpu2cpt[0])); - - cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), - GFP_KERNEL); - if (!cptab->ctb_parts) - goto failed; - - for (i = 0; i < ncpt; i++) { - struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; - - part->cpt_nodemask = kzalloc(sizeof(*part->cpt_nodemask), - GFP_NOFS); - if (!zalloc_cpumask_var(&part->cpt_cpumask, GFP_NOFS) || - !part->cpt_nodemask) - goto failed; - } - - spin_lock(&cpt_data.cpt_lock); - /* Reserved for hotplug */ - cptab->ctb_version = cpt_data.cpt_version; - spin_unlock(&cpt_data.cpt_lock); - - return cptab; - - failed: - cfs_cpt_table_free(cptab); - return NULL; -} -EXPORT_SYMBOL(cfs_cpt_table_alloc); - -int -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) -{ - char *tmp = buf; - int rc = 0; - int i; - int j; - - for (i = 0; i < cptab->ctb_nparts; i++) { - if (len > 0) { - rc = snprintf(tmp, len, "%d\t: ", i); - len -= rc; - } - - if (len <= 0) { - rc = -EFBIG; - goto out; - } - - tmp += rc; - for_each_cpu(j, cptab->ctb_parts[i].cpt_cpumask) { - rc = snprintf(tmp, len, "%d ", j); - len -= rc; - if (len <= 0) { - rc = -EFBIG; - goto out; - } - tmp += rc; - } - - *tmp = '\n'; - tmp++; - len--; - } - - out: - if (rc < 0) - return rc; - - return tmp - buf; -} -EXPORT_SYMBOL(cfs_cpt_table_print); - -int -cfs_cpt_number(struct cfs_cpt_table *cptab) -{ - return cptab->ctb_nparts; -} -EXPORT_SYMBOL(cfs_cpt_number); - -int -cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) -{ - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - - return cpt == CFS_CPT_ANY ? - cpumask_weight(cptab->ctb_cpumask) : - cpumask_weight(cptab->ctb_parts[cpt].cpt_cpumask); -} -EXPORT_SYMBOL(cfs_cpt_weight); - -int -cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) -{ - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - - return cpt == CFS_CPT_ANY ? - cpumask_any_and(cptab->ctb_cpumask, - cpu_online_mask) < nr_cpu_ids : - cpumask_any_and(cptab->ctb_parts[cpt].cpt_cpumask, - cpu_online_mask) < nr_cpu_ids; -} -EXPORT_SYMBOL(cfs_cpt_online); - -cpumask_var_t * -cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) -{ - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - - return cpt == CFS_CPT_ANY ? - &cptab->ctb_cpumask : &cptab->ctb_parts[cpt].cpt_cpumask; -} -EXPORT_SYMBOL(cfs_cpt_cpumask); - -nodemask_t * -cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) -{ - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - - return cpt == CFS_CPT_ANY ? - cptab->ctb_nodemask : cptab->ctb_parts[cpt].cpt_nodemask; -} -EXPORT_SYMBOL(cfs_cpt_nodemask); - -int -cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) -{ - int node; - - LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); - - if (cpu < 0 || cpu >= nr_cpu_ids || !cpu_online(cpu)) { - CDEBUG(D_INFO, "CPU %d is invalid or it's offline\n", cpu); - return 0; - } - - if (cptab->ctb_cpu2cpt[cpu] != -1) { - CDEBUG(D_INFO, "CPU %d is already in partition %d\n", - cpu, cptab->ctb_cpu2cpt[cpu]); - return 0; - } - - cptab->ctb_cpu2cpt[cpu] = cpt; - - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); - - cpumask_set_cpu(cpu, cptab->ctb_cpumask); - cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); - - node = cpu_to_node(cpu); - - /* first CPU of @node in this CPT table */ - if (!node_isset(node, *cptab->ctb_nodemask)) - node_set(node, *cptab->ctb_nodemask); - - /* first CPU of @node in this partition */ - if (!node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)) - node_set(node, *cptab->ctb_parts[cpt].cpt_nodemask); - - return 1; -} -EXPORT_SYMBOL(cfs_cpt_set_cpu); - -void -cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) -{ - int node; - int i; - - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - - if (cpu < 0 || cpu >= nr_cpu_ids) { - CDEBUG(D_INFO, "Invalid CPU id %d\n", cpu); - return; - } - - if (cpt == CFS_CPT_ANY) { - /* caller doesn't know the partition ID */ - cpt = cptab->ctb_cpu2cpt[cpu]; - if (cpt < 0) { /* not set in this CPT-table */ - CDEBUG(D_INFO, "Try to unset cpu %d which is not in CPT-table %p\n", - cpt, cptab); - return; - } - - } else if (cpt != cptab->ctb_cpu2cpt[cpu]) { - CDEBUG(D_INFO, - "CPU %d is not in cpu-partition %d\n", cpu, cpt); - return; - } - - LASSERT(cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); - LASSERT(cpumask_test_cpu(cpu, cptab->ctb_cpumask)); - - cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); - cpumask_clear_cpu(cpu, cptab->ctb_cpumask); - cptab->ctb_cpu2cpt[cpu] = -1; - - node = cpu_to_node(cpu); - - LASSERT(node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)); - LASSERT(node_isset(node, *cptab->ctb_nodemask)); - - for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) { - /* this CPT has other CPU belonging to this node? */ - if (cpu_to_node(i) == node) - break; - } - - if (i >= nr_cpu_ids) - node_clear(node, *cptab->ctb_parts[cpt].cpt_nodemask); - - for_each_cpu(i, cptab->ctb_cpumask) { - /* this CPT-table has other CPU belonging to this node? */ - if (cpu_to_node(i) == node) - break; - } - - if (i >= nr_cpu_ids) - node_clear(node, *cptab->ctb_nodemask); -} -EXPORT_SYMBOL(cfs_cpt_unset_cpu); - -int -cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) -{ - int i; - - if (!cpumask_weight(mask) || - cpumask_any_and(mask, cpu_online_mask) >= nr_cpu_ids) { - CDEBUG(D_INFO, "No online CPU is found in the CPU mask for CPU partition %d\n", - cpt); - return 0; - } - - for_each_cpu(i, mask) { - if (!cfs_cpt_set_cpu(cptab, cpt, i)) - return 0; - } - - return 1; -} -EXPORT_SYMBOL(cfs_cpt_set_cpumask); - -void -cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) -{ - int i; - - for_each_cpu(i, mask) - cfs_cpt_unset_cpu(cptab, cpt, i); -} -EXPORT_SYMBOL(cfs_cpt_unset_cpumask); - -int -cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) -{ - int rc; - - if (node < 0 || node >= MAX_NUMNODES) { - CDEBUG(D_INFO, - "Invalid NUMA id %d for CPU partition %d\n", node, cpt); - return 0; - } - - mutex_lock(&cpt_data.cpt_mutex); - - cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); - - rc = cfs_cpt_set_cpumask(cptab, cpt, cpt_data.cpt_cpumask); - - mutex_unlock(&cpt_data.cpt_mutex); - - return rc; -} -EXPORT_SYMBOL(cfs_cpt_set_node); - -void -cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) -{ - if (node < 0 || node >= MAX_NUMNODES) { - CDEBUG(D_INFO, - "Invalid NUMA id %d for CPU partition %d\n", node, cpt); - return; - } - - mutex_lock(&cpt_data.cpt_mutex); - - cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); - - cfs_cpt_unset_cpumask(cptab, cpt, cpt_data.cpt_cpumask); - - mutex_unlock(&cpt_data.cpt_mutex); -} -EXPORT_SYMBOL(cfs_cpt_unset_node); - -int -cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) -{ - int i; - - for_each_node_mask(i, *mask) { - if (!cfs_cpt_set_node(cptab, cpt, i)) - return 0; - } - - return 1; -} -EXPORT_SYMBOL(cfs_cpt_set_nodemask); - -void -cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) -{ - int i; - - for_each_node_mask(i, *mask) - cfs_cpt_unset_node(cptab, cpt, i); -} -EXPORT_SYMBOL(cfs_cpt_unset_nodemask); - -void -cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) -{ - int last; - int i; - - if (cpt == CFS_CPT_ANY) { - last = cptab->ctb_nparts - 1; - cpt = 0; - } else { - last = cpt; - } - - for (; cpt <= last; cpt++) { - for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) - cfs_cpt_unset_cpu(cptab, cpt, i); - } -} -EXPORT_SYMBOL(cfs_cpt_clear); - -int -cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) -{ - nodemask_t *mask; - int weight; - int rotor; - int node; - - /* convert CPU partition ID to HW node id */ - - if (cpt < 0 || cpt >= cptab->ctb_nparts) { - mask = cptab->ctb_nodemask; - rotor = cptab->ctb_spread_rotor++; - } else { - mask = cptab->ctb_parts[cpt].cpt_nodemask; - rotor = cptab->ctb_parts[cpt].cpt_spread_rotor++; - } - - weight = nodes_weight(*mask); - LASSERT(weight > 0); - - rotor %= weight; - - for_each_node_mask(node, *mask) { - if (!rotor--) - return node; - } - - LBUG(); - return 0; -} -EXPORT_SYMBOL(cfs_cpt_spread_node); - -int -cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) -{ - int cpu; - int cpt; - - preempt_disable(); - cpu = smp_processor_id(); - cpt = cptab->ctb_cpu2cpt[cpu]; - - if (cpt < 0 && remap) { - /* don't return negative value for safety of upper layer, - * instead we shadow the unknown cpu to a valid partition ID - */ - cpt = cpu % cptab->ctb_nparts; - } - preempt_enable(); - return cpt; -} -EXPORT_SYMBOL(cfs_cpt_current); - -int -cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) -{ - LASSERT(cpu >= 0 && cpu < nr_cpu_ids); - - return cptab->ctb_cpu2cpt[cpu]; -} -EXPORT_SYMBOL(cfs_cpt_of_cpu); - -int -cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) -{ - cpumask_var_t *cpumask; - nodemask_t *nodemask; - int rc; - int i; - - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); - - if (cpt == CFS_CPT_ANY) { - cpumask = &cptab->ctb_cpumask; - nodemask = cptab->ctb_nodemask; - } else { - cpumask = &cptab->ctb_parts[cpt].cpt_cpumask; - nodemask = cptab->ctb_parts[cpt].cpt_nodemask; - } - - if (cpumask_any_and(*cpumask, cpu_online_mask) >= nr_cpu_ids) { - CERROR("No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", - cpt); - return -EINVAL; - } - - for_each_online_cpu(i) { - if (cpumask_test_cpu(i, *cpumask)) - continue; - - rc = set_cpus_allowed_ptr(current, *cpumask); - set_mems_allowed(*nodemask); - if (!rc) - schedule(); /* switch to allowed CPU */ - - return rc; - } - - /* don't need to set affinity because all online CPUs are covered */ - return 0; -} -EXPORT_SYMBOL(cfs_cpt_bind); - -/** - * Choose max to \a number CPUs from \a node and set them in \a cpt. - * We always prefer to choose CPU in the same core/socket. - */ -static int -cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, - cpumask_t *node, int number) -{ - cpumask_var_t socket; - cpumask_var_t core; - int rc = 0; - int cpu; - - LASSERT(number > 0); - - if (number >= cpumask_weight(node)) { - while (!cpumask_empty(node)) { - cpu = cpumask_first(node); - - rc = cfs_cpt_set_cpu(cptab, cpt, cpu); - if (!rc) - return -EINVAL; - cpumask_clear_cpu(cpu, node); - } - return 0; - } - - /* - * Allocate scratch buffers - * As we cannot initialize a cpumask_var_t, we need - * to alloc both before we can risk trying to free either - */ - if (!zalloc_cpumask_var(&socket, GFP_NOFS)) - rc = -ENOMEM; - if (!zalloc_cpumask_var(&core, GFP_NOFS)) - rc = -ENOMEM; - if (rc) - goto out; - - while (!cpumask_empty(node)) { - cpu = cpumask_first(node); - - /* get cpumask for cores in the same socket */ - cpumask_copy(socket, topology_core_cpumask(cpu)); - cpumask_and(socket, socket, node); - - LASSERT(!cpumask_empty(socket)); - - while (!cpumask_empty(socket)) { - int i; - - /* get cpumask for hts in the same core */ - cpumask_copy(core, topology_sibling_cpumask(cpu)); - cpumask_and(core, core, node); - - LASSERT(!cpumask_empty(core)); - - for_each_cpu(i, core) { - cpumask_clear_cpu(i, socket); - cpumask_clear_cpu(i, node); - - rc = cfs_cpt_set_cpu(cptab, cpt, i); - if (!rc) { - rc = -EINVAL; - goto out; - } - - if (!--number) - goto out; - } - cpu = cpumask_first(socket); - } - } - -out: - free_cpumask_var(socket); - free_cpumask_var(core); - return rc; -} - -#define CPT_WEIGHT_MIN 4u - -static unsigned int -cfs_cpt_num_estimate(void) -{ - unsigned int nnode = num_online_nodes(); - unsigned int ncpu = num_online_cpus(); - unsigned int ncpt; - - if (ncpu <= CPT_WEIGHT_MIN) { - ncpt = 1; - goto out; - } - - /* generate reasonable number of CPU partitions based on total number - * of CPUs, Preferred N should be power2 and match this condition: - * 2 * (N - 1)^2 < NCPUS <= 2 * N^2 - */ - for (ncpt = 2; ncpu > 2 * ncpt * ncpt; ncpt <<= 1) - ; - - if (ncpt <= nnode) { /* fat numa system */ - while (nnode > ncpt) - nnode >>= 1; - - } else { /* ncpt > nnode */ - while ((nnode << 1) <= ncpt) - nnode <<= 1; - } - - ncpt = nnode; - -out: -#if (BITS_PER_LONG == 32) - /* config many CPU partitions on 32-bit system could consume - * too much memory - */ - ncpt = min(2U, ncpt); -#endif - while (ncpu % ncpt) - ncpt--; /* worst case is 1 */ - - return ncpt; -} - -static struct cfs_cpt_table * -cfs_cpt_table_create(int ncpt) -{ - struct cfs_cpt_table *cptab = NULL; - cpumask_var_t mask; - int cpt = 0; - int num; - int rc; - int i; - - rc = cfs_cpt_num_estimate(); - if (ncpt <= 0) - ncpt = rc; - - if (ncpt > num_online_cpus() || ncpt > 4 * rc) { - CWARN("CPU partition number %d is larger than suggested value (%d), your system may have performance issue or run out of memory while under pressure\n", - ncpt, rc); - } - - if (num_online_cpus() % ncpt) { - CERROR("CPU number %d is not multiple of cpu_npartition %d, please try different cpu_npartitions value or set pattern string by cpu_pattern=STRING\n", - (int)num_online_cpus(), ncpt); - goto failed; - } - - cptab = cfs_cpt_table_alloc(ncpt); - if (!cptab) { - CERROR("Failed to allocate CPU map(%d)\n", ncpt); - goto failed; - } - - num = num_online_cpus() / ncpt; - if (!num) { - CERROR("CPU changed while setting CPU partition\n"); - goto failed; - } - - if (!zalloc_cpumask_var(&mask, GFP_NOFS)) { - CERROR("Failed to allocate scratch cpumask\n"); - goto failed; - } - - for_each_online_node(i) { - cfs_node_to_cpumask(i, mask); - - while (!cpumask_empty(mask)) { - struct cfs_cpu_partition *part; - int n; - - /* - * Each emulated NUMA node has all allowed CPUs in - * the mask. - * End loop when all partitions have assigned CPUs. - */ - if (cpt == ncpt) - break; - - part = &cptab->ctb_parts[cpt]; - - n = num - cpumask_weight(part->cpt_cpumask); - LASSERT(n > 0); - - rc = cfs_cpt_choose_ncpus(cptab, cpt, mask, n); - if (rc < 0) - goto failed_mask; - - LASSERT(num >= cpumask_weight(part->cpt_cpumask)); - if (num == cpumask_weight(part->cpt_cpumask)) - cpt++; - } - } - - if (cpt != ncpt || - num != cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)) { - CERROR("Expect %d(%d) CPU partitions but got %d(%d), CPU hotplug/unplug while setting?\n", - cptab->ctb_nparts, num, cpt, - cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)); - goto failed_mask; - } - - free_cpumask_var(mask); - - return cptab; - - failed_mask: - free_cpumask_var(mask); - failed: - CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", - ncpt, num_online_nodes(), num_online_cpus()); - - if (cptab) - cfs_cpt_table_free(cptab); - - return NULL; -} - -static struct cfs_cpt_table * -cfs_cpt_table_create_pattern(char *pattern) -{ - struct cfs_cpt_table *cptab; - char *str; - int node = 0; - int high; - int ncpt = 0; - int cpt; - int rc; - int c; - int i; - - str = strim(pattern); - if (*str == 'n' || *str == 'N') { - pattern = str + 1; - if (*pattern != '\0') { - node = 1; - } else { /* shortcut to create CPT from NUMA & CPU topology */ - node = -1; - ncpt = num_online_nodes(); - } - } - - if (!ncpt) { /* scanning bracket which is mark of partition */ - for (str = pattern;; str++, ncpt++) { - str = strchr(str, '['); - if (!str) - break; - } - } - - if (!ncpt || - (node && ncpt > num_online_nodes()) || - (!node && ncpt > num_online_cpus())) { - CERROR("Invalid pattern %s, or too many partitions %d\n", - pattern, ncpt); - return NULL; - } - - cptab = cfs_cpt_table_alloc(ncpt); - if (!cptab) { - CERROR("Failed to allocate cpu partition table\n"); - return NULL; - } - - if (node < 0) { /* shortcut to create CPT from NUMA & CPU topology */ - cpt = 0; - - for_each_online_node(i) { - if (cpt >= ncpt) { - CERROR("CPU changed while setting CPU partition table, %d/%d\n", - cpt, ncpt); - goto failed; - } - - rc = cfs_cpt_set_node(cptab, cpt++, i); - if (!rc) - goto failed; - } - return cptab; - } - - high = node ? MAX_NUMNODES - 1 : nr_cpu_ids - 1; - - for (str = strim(pattern), c = 0;; c++) { - struct cfs_range_expr *range; - struct cfs_expr_list *el; - char *bracket = strchr(str, '['); - int n; - - if (!bracket) { - if (*str) { - CERROR("Invalid pattern %s\n", str); - goto failed; - } - if (c != ncpt) { - CERROR("expect %d partitions but found %d\n", - ncpt, c); - goto failed; - } - break; - } - - if (sscanf(str, "%d%n", &cpt, &n) < 1) { - CERROR("Invalid cpu pattern %s\n", str); - goto failed; - } - - if (cpt < 0 || cpt >= ncpt) { - CERROR("Invalid partition id %d, total partitions %d\n", - cpt, ncpt); - goto failed; - } - - if (cfs_cpt_weight(cptab, cpt)) { - CERROR("Partition %d has already been set.\n", cpt); - goto failed; - } - - str = strim(str + n); - if (str != bracket) { - CERROR("Invalid pattern %s\n", str); - goto failed; - } - - bracket = strchr(str, ']'); - if (!bracket) { - CERROR("missing right bracket for cpt %d, %s\n", - cpt, str); - goto failed; - } - - if (cfs_expr_list_parse(str, (bracket - str) + 1, - 0, high, &el)) { - CERROR("Can't parse number range: %s\n", str); - goto failed; - } - - list_for_each_entry(range, &el->el_exprs, re_link) { - for (i = range->re_lo; i <= range->re_hi; i++) { - if ((i - range->re_lo) % range->re_stride) - continue; - - rc = node ? cfs_cpt_set_node(cptab, cpt, i) : - cfs_cpt_set_cpu(cptab, cpt, i); - if (!rc) { - cfs_expr_list_free(el); - goto failed; - } - } - } - - cfs_expr_list_free(el); - - if (!cfs_cpt_online(cptab, cpt)) { - CERROR("No online CPU is found on partition %d\n", cpt); - goto failed; - } - - str = strim(bracket + 1); - } - - return cptab; - - failed: - cfs_cpt_table_free(cptab); - return NULL; -} - -#ifdef CONFIG_HOTPLUG_CPU -static enum cpuhp_state lustre_cpu_online; - -static void cfs_cpu_incr_cpt_version(void) -{ - spin_lock(&cpt_data.cpt_lock); - cpt_data.cpt_version++; - spin_unlock(&cpt_data.cpt_lock); -} - -static int cfs_cpu_online(unsigned int cpu) -{ - cfs_cpu_incr_cpt_version(); - return 0; -} - -static int cfs_cpu_dead(unsigned int cpu) -{ - bool warn; - - cfs_cpu_incr_cpt_version(); - - mutex_lock(&cpt_data.cpt_mutex); - /* if all HTs in a core are offline, it may break affinity */ - cpumask_copy(cpt_data.cpt_cpumask, topology_sibling_cpumask(cpu)); - warn = cpumask_any_and(cpt_data.cpt_cpumask, - cpu_online_mask) >= nr_cpu_ids; - mutex_unlock(&cpt_data.cpt_mutex); - CDEBUG(warn ? D_WARNING : D_INFO, - "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u]\n", - cpu); - return 0; -} -#endif - -void -cfs_cpu_fini(void) -{ - if (cfs_cpt_table) - cfs_cpt_table_free(cfs_cpt_table); - -#ifdef CONFIG_HOTPLUG_CPU - if (lustre_cpu_online > 0) - cpuhp_remove_state_nocalls(lustre_cpu_online); - cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); -#endif - free_cpumask_var(cpt_data.cpt_cpumask); -} - -int -cfs_cpu_init(void) -{ - int ret = 0; - - LASSERT(!cfs_cpt_table); - - memset(&cpt_data, 0, sizeof(cpt_data)); - - if (!zalloc_cpumask_var(&cpt_data.cpt_cpumask, GFP_NOFS)) { - CERROR("Failed to allocate scratch buffer\n"); - return -1; - } - - spin_lock_init(&cpt_data.cpt_lock); - mutex_init(&cpt_data.cpt_mutex); - -#ifdef CONFIG_HOTPLUG_CPU - ret = cpuhp_setup_state_nocalls(CPUHP_LUSTRE_CFS_DEAD, - "staging/lustre/cfe:dead", NULL, - cfs_cpu_dead); - if (ret < 0) - goto failed; - ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, - "staging/lustre/cfe:online", - cfs_cpu_online, NULL); - if (ret < 0) - goto failed; - lustre_cpu_online = ret; -#endif - ret = -EINVAL; - - if (*cpu_pattern) { - char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); - - if (!cpu_pattern_dup) { - CERROR("Failed to duplicate cpu_pattern\n"); - goto failed; - } - - cfs_cpt_table = cfs_cpt_table_create_pattern(cpu_pattern_dup); - kfree(cpu_pattern_dup); - if (!cfs_cpt_table) { - CERROR("Failed to create cptab from pattern %s\n", - cpu_pattern); - goto failed; - } - - } else { - cfs_cpt_table = cfs_cpt_table_create(cpu_npartitions); - if (!cfs_cpt_table) { - CERROR("Failed to create ptable with npartitions %d\n", - cpu_npartitions); - goto failed; - } - } - - spin_lock(&cpt_data.cpt_lock); - if (cfs_cpt_table->ctb_version != cpt_data.cpt_version) { - spin_unlock(&cpt_data.cpt_lock); - CERROR("CPU hotplug/unplug during setup\n"); - goto failed; - } - spin_unlock(&cpt_data.cpt_lock); - - LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", - num_online_nodes(), num_online_cpus(), - cfs_cpt_number(cfs_cpt_table)); - return 0; - - failed: - cfs_cpu_fini(); - return ret; -} - -#endif From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 5/6] staging: lustre: move misc-device registration closer to related code. In-Reply-To: <152383910760.23409.2327082725637657049.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> Message-ID: <152383935745.23409.17743342143483291145.stgit@noble> The ioctl handler for the misc device is in lnet/libcfs/module.c but is it registered in lnet/libcfs/linux/linux-module.c. Keeping related code together make maintenance easier, so move the code. Signed-off-by: NeilBrown --- .../staging/lustre/include/linux/libcfs/libcfs.h | 2 - .../lustre/lnet/libcfs/linux/linux-module.c | 28 ------------------ drivers/staging/lustre/lnet/libcfs/module.c | 31 +++++++++++++++++++- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index aca1f19c4977..19dae42b9a94 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -140,11 +140,9 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand); int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, const struct libcfs_ioctl_hdr __user *uparam); int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data); -int libcfs_ioctl(unsigned long cmd, void __user *arg); #define _LIBCFS_H -extern struct miscdevice libcfs_dev; /** * The path of debug log dump upcall script. */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c index c8908e816c4c..954b681f9db7 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c @@ -166,31 +166,3 @@ int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, kvfree(*hdr_pp); return err; } - -static long -libcfs_psdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -{ - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; - - if (_IOC_TYPE(cmd) != IOC_LIBCFS_TYPE || - _IOC_NR(cmd) < IOC_LIBCFS_MIN_NR || - _IOC_NR(cmd) > IOC_LIBCFS_MAX_NR) { - CDEBUG(D_IOCTL, "invalid ioctl ( type %d, nr %d, size %d )\n", - _IOC_TYPE(cmd), _IOC_NR(cmd), _IOC_SIZE(cmd)); - return -EINVAL; - } - - return libcfs_ioctl(cmd, (void __user *)arg); -} - -static const struct file_operations libcfs_fops = { - .owner = THIS_MODULE, - .unlocked_ioctl = libcfs_psdev_ioctl, -}; - -struct miscdevice libcfs_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "lnet", - .fops = &libcfs_fops, -}; diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index f93f3cf58127..aab0eb7b7632 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -95,7 +95,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand) } EXPORT_SYMBOL(libcfs_deregister_ioctl); -int libcfs_ioctl(unsigned long cmd, void __user *uparam) +static int libcfs_ioctl(unsigned long cmd, void __user *uparam) { struct libcfs_ioctl_data *data = NULL; struct libcfs_ioctl_hdr *hdr; @@ -161,6 +161,35 @@ int libcfs_ioctl(unsigned long cmd, void __user *uparam) return err; } + +static long +libcfs_psdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + + if (_IOC_TYPE(cmd) != IOC_LIBCFS_TYPE || + _IOC_NR(cmd) < IOC_LIBCFS_MIN_NR || + _IOC_NR(cmd) > IOC_LIBCFS_MAX_NR) { + CDEBUG(D_IOCTL, "invalid ioctl ( type %d, nr %d, size %d )\n", + _IOC_TYPE(cmd), _IOC_NR(cmd), _IOC_SIZE(cmd)); + return -EINVAL; + } + + return libcfs_ioctl(cmd, (void __user *)arg); +} + +static const struct file_operations libcfs_fops = { + .owner = THIS_MODULE, + .unlocked_ioctl = libcfs_psdev_ioctl, +}; + +struct miscdevice libcfs_dev = { + .minor = MISC_DYNAMIC_MINOR, + .name = "lnet", + .fops = &libcfs_fops, +}; + int lprocfs_call_handler(void *data, int write, loff_t *ppos, void __user *buffer, size_t *lenp, int (*handler)(void *data, int write, loff_t pos, From neilb at suse.com Mon Apr 16 00:42:37 2018 From: neilb at suse.com (NeilBrown) Date: Mon, 16 Apr 2018 10:42:37 +1000 Subject: [lustre-devel] [PATCH 6/6] staging: lustre: move remaining code from linux-module.c to module.c In-Reply-To: <152383910760.23409.2327082725637657049.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> Message-ID: <152383935748.23409.9702188886687449086.stgit@noble> There is no longer any need to keep this code separate, and now we can remove linux-module.c Signed-off-by: NeilBrown --- .../staging/lustre/include/linux/libcfs/libcfs.h | 4 drivers/staging/lustre/lnet/libcfs/Makefile | 1 .../lustre/lnet/libcfs/linux/linux-module.c | 168 -------------------- drivers/staging/lustre/lnet/libcfs/module.c | 131 ++++++++++++++++ 4 files changed, 131 insertions(+), 173 deletions(-) delete mode 100644 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index 19dae42b9a94..3ce0cccc0c61 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -137,10 +137,6 @@ struct libcfs_ioctl_handler { int libcfs_register_ioctl(struct libcfs_ioctl_handler *hand); int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand); -int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, - const struct libcfs_ioctl_hdr __user *uparam); -int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data); - #define _LIBCFS_H /** diff --git a/drivers/staging/lustre/lnet/libcfs/Makefile b/drivers/staging/lustre/lnet/libcfs/Makefile index 673fe348c445..f3781c511a04 100644 --- a/drivers/staging/lustre/lnet/libcfs/Makefile +++ b/drivers/staging/lustre/lnet/libcfs/Makefile @@ -5,7 +5,6 @@ subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include obj-$(CONFIG_LNET) += libcfs.o libcfs-linux-objs := linux-tracefile.o linux-debug.o -libcfs-linux-objs += linux-module.o libcfs-linux-objs += linux-crypto.o libcfs-linux-objs += linux-crypto-adler.o diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c deleted file mode 100644 index 954b681f9db7..000000000000 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c +++ /dev/null @@ -1,168 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -#define DEBUG_SUBSYSTEM S_LNET - -#include -#include - -static inline size_t libcfs_ioctl_packlen(struct libcfs_ioctl_data *data) -{ - size_t len = sizeof(*data); - - len += cfs_size_round(data->ioc_inllen1); - len += cfs_size_round(data->ioc_inllen2); - return len; -} - -static inline bool libcfs_ioctl_is_invalid(struct libcfs_ioctl_data *data) -{ - if (data->ioc_hdr.ioc_len > BIT(30)) { - CERROR("LIBCFS ioctl: ioc_len larger than 1<<30\n"); - return true; - } - if (data->ioc_inllen1 > BIT(30)) { - CERROR("LIBCFS ioctl: ioc_inllen1 larger than 1<<30\n"); - return true; - } - if (data->ioc_inllen2 > BIT(30)) { - CERROR("LIBCFS ioctl: ioc_inllen2 larger than 1<<30\n"); - return true; - } - if (data->ioc_inlbuf1 && !data->ioc_inllen1) { - CERROR("LIBCFS ioctl: inlbuf1 pointer but 0 length\n"); - return true; - } - if (data->ioc_inlbuf2 && !data->ioc_inllen2) { - CERROR("LIBCFS ioctl: inlbuf2 pointer but 0 length\n"); - return true; - } - if (data->ioc_pbuf1 && !data->ioc_plen1) { - CERROR("LIBCFS ioctl: pbuf1 pointer but 0 length\n"); - return true; - } - if (data->ioc_pbuf2 && !data->ioc_plen2) { - CERROR("LIBCFS ioctl: pbuf2 pointer but 0 length\n"); - return true; - } - if (data->ioc_plen1 && !data->ioc_pbuf1) { - CERROR("LIBCFS ioctl: plen1 nonzero but no pbuf1 pointer\n"); - return true; - } - if (data->ioc_plen2 && !data->ioc_pbuf2) { - CERROR("LIBCFS ioctl: plen2 nonzero but no pbuf2 pointer\n"); - return true; - } - if ((u32)libcfs_ioctl_packlen(data) != data->ioc_hdr.ioc_len) { - CERROR("LIBCFS ioctl: packlen != ioc_len\n"); - return true; - } - if (data->ioc_inllen1 && - data->ioc_bulk[data->ioc_inllen1 - 1] != '\0') { - CERROR("LIBCFS ioctl: inlbuf1 not 0 terminated\n"); - return true; - } - if (data->ioc_inllen2 && - data->ioc_bulk[cfs_size_round(data->ioc_inllen1) + - data->ioc_inllen2 - 1] != '\0') { - CERROR("LIBCFS ioctl: inlbuf2 not 0 terminated\n"); - return true; - } - return false; -} - -int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data) -{ - if (libcfs_ioctl_is_invalid(data)) { - CERROR("libcfs ioctl: parameter not correctly formatted\n"); - return -EINVAL; - } - - if (data->ioc_inllen1) - data->ioc_inlbuf1 = &data->ioc_bulk[0]; - - if (data->ioc_inllen2) - data->ioc_inlbuf2 = &data->ioc_bulk[0] + - cfs_size_round(data->ioc_inllen1); - - return 0; -} - -int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, - const struct libcfs_ioctl_hdr __user *uhdr) -{ - struct libcfs_ioctl_hdr hdr; - int err; - - if (copy_from_user(&hdr, uhdr, sizeof(hdr))) - return -EFAULT; - - if (hdr.ioc_version != LIBCFS_IOCTL_VERSION && - hdr.ioc_version != LIBCFS_IOCTL_VERSION2) { - CERROR("libcfs ioctl: version mismatch expected %#x, got %#x\n", - LIBCFS_IOCTL_VERSION, hdr.ioc_version); - return -EINVAL; - } - - if (hdr.ioc_len < sizeof(hdr)) { - CERROR("libcfs ioctl: user buffer too small for ioctl\n"); - return -EINVAL; - } - - if (hdr.ioc_len > LIBCFS_IOC_DATA_MAX) { - CERROR("libcfs ioctl: user buffer is too large %d/%d\n", - hdr.ioc_len, LIBCFS_IOC_DATA_MAX); - return -EINVAL; - } - - *hdr_pp = kvmalloc(hdr.ioc_len, GFP_KERNEL); - if (!*hdr_pp) - return -ENOMEM; - - if (copy_from_user(*hdr_pp, uhdr, hdr.ioc_len)) { - err = -EFAULT; - goto free; - } - - if ((*hdr_pp)->ioc_version != hdr.ioc_version || - (*hdr_pp)->ioc_len != hdr.ioc_len) { - err = -EINVAL; - goto free; - } - - return 0; - -free: - kvfree(*hdr_pp); - return err; -} diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index aab0eb7b7632..d1ba210deb25 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -95,6 +95,137 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand) } EXPORT_SYMBOL(libcfs_deregister_ioctl); +static inline size_t libcfs_ioctl_packlen(struct libcfs_ioctl_data *data) +{ + size_t len = sizeof(*data); + + len += cfs_size_round(data->ioc_inllen1); + len += cfs_size_round(data->ioc_inllen2); + return len; +} + +static inline bool libcfs_ioctl_is_invalid(struct libcfs_ioctl_data *data) +{ + if (data->ioc_hdr.ioc_len > BIT(30)) { + CERROR("LIBCFS ioctl: ioc_len larger than 1<<30\n"); + return true; + } + if (data->ioc_inllen1 > BIT(30)) { + CERROR("LIBCFS ioctl: ioc_inllen1 larger than 1<<30\n"); + return true; + } + if (data->ioc_inllen2 > BIT(30)) { + CERROR("LIBCFS ioctl: ioc_inllen2 larger than 1<<30\n"); + return true; + } + if (data->ioc_inlbuf1 && !data->ioc_inllen1) { + CERROR("LIBCFS ioctl: inlbuf1 pointer but 0 length\n"); + return true; + } + if (data->ioc_inlbuf2 && !data->ioc_inllen2) { + CERROR("LIBCFS ioctl: inlbuf2 pointer but 0 length\n"); + return true; + } + if (data->ioc_pbuf1 && !data->ioc_plen1) { + CERROR("LIBCFS ioctl: pbuf1 pointer but 0 length\n"); + return true; + } + if (data->ioc_pbuf2 && !data->ioc_plen2) { + CERROR("LIBCFS ioctl: pbuf2 pointer but 0 length\n"); + return true; + } + if (data->ioc_plen1 && !data->ioc_pbuf1) { + CERROR("LIBCFS ioctl: plen1 nonzero but no pbuf1 pointer\n"); + return true; + } + if (data->ioc_plen2 && !data->ioc_pbuf2) { + CERROR("LIBCFS ioctl: plen2 nonzero but no pbuf2 pointer\n"); + return true; + } + if ((u32)libcfs_ioctl_packlen(data) != data->ioc_hdr.ioc_len) { + CERROR("LIBCFS ioctl: packlen != ioc_len\n"); + return true; + } + if (data->ioc_inllen1 && + data->ioc_bulk[data->ioc_inllen1 - 1] != '\0') { + CERROR("LIBCFS ioctl: inlbuf1 not 0 terminated\n"); + return true; + } + if (data->ioc_inllen2 && + data->ioc_bulk[cfs_size_round(data->ioc_inllen1) + + data->ioc_inllen2 - 1] != '\0') { + CERROR("LIBCFS ioctl: inlbuf2 not 0 terminated\n"); + return true; + } + return false; +} + +static int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data) +{ + if (libcfs_ioctl_is_invalid(data)) { + CERROR("libcfs ioctl: parameter not correctly formatted\n"); + return -EINVAL; + } + + if (data->ioc_inllen1) + data->ioc_inlbuf1 = &data->ioc_bulk[0]; + + if (data->ioc_inllen2) + data->ioc_inlbuf2 = &data->ioc_bulk[0] + + cfs_size_round(data->ioc_inllen1); + + return 0; +} + +static int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp, + const struct libcfs_ioctl_hdr __user *uhdr) +{ + struct libcfs_ioctl_hdr hdr; + int err; + + if (copy_from_user(&hdr, uhdr, sizeof(hdr))) + return -EFAULT; + + if (hdr.ioc_version != LIBCFS_IOCTL_VERSION && + hdr.ioc_version != LIBCFS_IOCTL_VERSION2) { + CERROR("libcfs ioctl: version mismatch expected %#x, got %#x\n", + LIBCFS_IOCTL_VERSION, hdr.ioc_version); + return -EINVAL; + } + + if (hdr.ioc_len < sizeof(hdr)) { + CERROR("libcfs ioctl: user buffer too small for ioctl\n"); + return -EINVAL; + } + + if (hdr.ioc_len > LIBCFS_IOC_DATA_MAX) { + CERROR("libcfs ioctl: user buffer is too large %d/%d\n", + hdr.ioc_len, LIBCFS_IOC_DATA_MAX); + return -EINVAL; + } + + *hdr_pp = kvmalloc(hdr.ioc_len, GFP_KERNEL); + if (!*hdr_pp) + return -ENOMEM; + + if (copy_from_user(*hdr_pp, uhdr, hdr.ioc_len)) { + err = -EFAULT; + goto free; + } + + if ((*hdr_pp)->ioc_version != hdr.ioc_version || + (*hdr_pp)->ioc_len != hdr.ioc_len) { + err = -EINVAL; + goto free; + } + + return 0; + +free: + kvfree(*hdr_pp); + return err; +} + static int libcfs_ioctl(unsigned long cmd, void __user *uparam) { struct libcfs_ioctl_data *data = NULL; From jsimmons at infradead.org Mon Apr 16 03:35:38 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 04:35:38 +0100 (BST) Subject: [lustre-devel] [PATCH 2/6] staging: lustre: remove libcfs/linux/libcfs.h In-Reply-To: <152383935734.23409.11654775387996961581.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935734.23409.11654775387996961581.stgit@noble> Message-ID: > This include file is only included in one place, > and only contains a list of other include directives. > So just move all those to the place where this file > is included, and discard the file. > > One include directive uses a local name ("linux-cpu.h"), so > that needs to be given a proper path. > > Probably many of these should be remove from here, and moved to > just the files that need them. Nak. Dumping all the extra headers from linux/libcfs.h to libcfs.h is the wrong approach. The one header, libcfs.h, to be the only header in all lustre files is the wrong approach. I have been looking to unroll that mess. I have patch that I need to polish you that I can submit. > Signed-off-by: NeilBrown > --- > .../staging/lustre/include/linux/libcfs/libcfs.h | 43 ++++++++++ > .../lustre/include/linux/libcfs/linux/libcfs.h | 83 -------------------- > 2 files changed, 42 insertions(+), 84 deletions(-) > delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > index 62e46aa3c554..e59d107d6482 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > @@ -38,7 +38,48 @@ > #include > > #include > -#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > #include > #include > #include > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > deleted file mode 100644 > index 83aec9c7698f..000000000000 > --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > +++ /dev/null > @@ -1,83 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * You should have received a copy of the GNU General Public License > - * version 2 along with this program; If not, see > - * http://www.gnu.org/licenses/gpl-2.0.html > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. > - * Use is subject to license terms. > - * > - * Copyright (c) 2012, Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - */ > - > -#ifndef __LIBCFS_LINUX_LIBCFS_H__ > -#define __LIBCFS_LINUX_LIBCFS_H__ > - > -#ifndef __LIBCFS_LIBCFS_H__ > -#error Do not #include this file directly. #include instead > -#endif > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include "linux-cpu.h" > - > -#endif /* _LINUX_LIBCFS_H */ > > > From jsimmons at infradead.org Mon Apr 16 03:48:26 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 04:48:26 +0100 (BST) Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: <152383935730.23409.6748888065027051683.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> Message-ID: > CDEBUG_STACK() and CHECK_STACK() are macros to help with > debugging, so move them from > drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > to > drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > > This seems a more fitting location, and is a step towards > removing linux/libcfs.h and simplifying the include file structure. Nak. Currently the lustre client always enables debugging but that shouldn't be the case. What we do need is the able to turn off the crazy debugging stuff. In the development branch of lustre it is done with CDEBUG_ENABLED. We need something like that in Kconfig much like we have CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK. Since we like to be able to turn that off this should be moved to just after LIBCFS_DEBUG_MSG_DATA_DECL. Then from CHECK_STACK down to CWARN() it can be build out. When CDEBUG_ENABLED is disabled CDEBUG_LIMIT would be empty. > Signed-off-by: NeilBrown > --- > .../lustre/include/linux/libcfs/libcfs_debug.h | 32 ++++++++++++++++++++ > .../lustre/include/linux/libcfs/linux/libcfs.h | 31 ------------------- > 2 files changed, 32 insertions(+), 31 deletions(-) > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > index 9290a19429e7..0dc7b91efe7c 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > @@ -62,6 +62,38 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); > extern unsigned int libcfs_catastrophe; > extern unsigned int libcfs_panic_on_lbug; > > +/* Enable debug-checks on stack size - except on x86_64 */ > +#if !defined(__x86_64__) > +# ifdef __ia64__ > +# define CDEBUG_STACK() (THREAD_SIZE - \ > + ((unsigned long)__builtin_dwarf_cfa() & \ > + (THREAD_SIZE - 1))) > +# else > +# define CDEBUG_STACK() (THREAD_SIZE - \ > + ((unsigned long)__builtin_frame_address(0) & \ > + (THREAD_SIZE - 1))) > +# endif /* __ia64__ */ > + > +#define __CHECK_STACK(msgdata, mask, cdls) \ > +do { \ > + if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ > + LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ > + libcfs_stack = CDEBUG_STACK(); \ > + libcfs_debug_msg(msgdata, \ > + "maximum lustre stack %lu\n", \ > + CDEBUG_STACK()); \ > + (msgdata)->msg_mask = mask; \ > + (msgdata)->msg_cdls = cdls; \ > + dump_stack(); \ > + /*panic("LBUG");*/ \ > + } \ > +} while (0) > +#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) > +#else /* __x86_64__ */ > +#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) > +#define CDEBUG_STACK() (0L) > +#endif /* __x86_64__ */ > + > #ifndef DEBUG_SUBSYSTEM > # define DEBUG_SUBSYSTEM S_UNDEFINED > #endif > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > index 07d3cb2217d1..83aec9c7698f 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > @@ -80,35 +80,4 @@ > #include > #include "linux-cpu.h" > > -#if !defined(__x86_64__) > -# ifdef __ia64__ > -# define CDEBUG_STACK() (THREAD_SIZE - \ > - ((unsigned long)__builtin_dwarf_cfa() & \ > - (THREAD_SIZE - 1))) > -# else > -# define CDEBUG_STACK() (THREAD_SIZE - \ > - ((unsigned long)__builtin_frame_address(0) & \ > - (THREAD_SIZE - 1))) > -# endif /* __ia64__ */ > - > -#define __CHECK_STACK(msgdata, mask, cdls) \ > -do { \ > - if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ > - LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ > - libcfs_stack = CDEBUG_STACK(); \ > - libcfs_debug_msg(msgdata, \ > - "maximum lustre stack %lu\n", \ > - CDEBUG_STACK()); \ > - (msgdata)->msg_mask = mask; \ > - (msgdata)->msg_cdls = cdls; \ > - dump_stack(); \ > - /*panic("LBUG");*/ \ > - } \ > -} while (0) > -#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) > -#else /* __x86_64__ */ > -#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) > -#define CDEBUG_STACK() (0L) > -#endif /* __x86_64__ */ > - > #endif /* _LINUX_LIBCFS_H */ > > > From jsimmons at infradead.org Mon Apr 16 03:52:55 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 04:52:55 +0100 (BST) Subject: [lustre-devel] [PATCH 3/6] staging: lustre: remove include/linux/libcfs/linux/linux-cpu.h In-Reply-To: <152383935737.23409.2271901486597092772.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935737.23409.2271901486597092772.stgit@noble> Message-ID: > This include file contains definitions used when CONFIG_SMP > is in effect. Other includes contain corresponding definitions > for when it isn't. > This can be hard to follow, so move the definitions to the one place. > > As HAVE_LIBCFS_CPT is defined precisely when CONFIG_SMP, we discard > that macro and just use CONFIG_SMP when needed. Nak. The lustre SMP is broken and needed to badly be reworked. I have it ready and can push it. I was waiting to see if I had to rebase it once the rc1 stuff but since their is a push to get everything out their I will push it. > --- > .../staging/lustre/include/linux/libcfs/libcfs.h | 1 > .../lustre/include/linux/libcfs/libcfs_cpu.h | 33 ++++++++ > .../lustre/include/linux/libcfs/linux/linux-cpu.h | 78 -------------------- > drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 4 + > 4 files changed, 35 insertions(+), 81 deletions(-) > delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > index e59d107d6482..aca1f19c4977 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > @@ -78,7 +78,6 @@ > #include > #include > #include > -#include > > #include > #include > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > index 61bce77fddd6..829c35e68db8 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > @@ -72,10 +72,43 @@ > #ifndef __LIBCFS_CPU_H__ > #define __LIBCFS_CPU_H__ > > +#include > +#include > +#include > + > /* any CPU partition */ > #define CFS_CPT_ANY (-1) > > #ifdef CONFIG_SMP > +/** virtual processing unit */ > +struct cfs_cpu_partition { > + /* CPUs mask for this partition */ > + cpumask_var_t cpt_cpumask; > + /* nodes mask for this partition */ > + nodemask_t *cpt_nodemask; > + /* spread rotor for NUMA allocator */ > + unsigned int cpt_spread_rotor; > +}; > + > + > +/** descriptor for CPU partitions */ > +struct cfs_cpt_table { > + /* version, reserved for hotplug */ > + unsigned int ctb_version; > + /* spread rotor for NUMA allocator */ > + unsigned int ctb_spread_rotor; > + /* # of CPU partitions */ > + unsigned int ctb_nparts; > + /* partitions tables */ > + struct cfs_cpu_partition *ctb_parts; > + /* shadow HW CPU to CPU partition ID */ > + int *ctb_cpu2cpt; > + /* all cpus in this partition table */ > + cpumask_var_t ctb_cpumask; > + /* all nodes in this partition table */ > + nodemask_t *ctb_nodemask; > +}; > + > /** > * return cpumask of CPU partition \a cpt > */ > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h > deleted file mode 100644 > index 6035376f2830..000000000000 > --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h > +++ /dev/null > @@ -1,78 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. > - * Copyright (c) 2012, Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * libcfs/include/libcfs/linux/linux-cpu.h > - * > - * Basic library routines. > - * > - * Author: liang at whamcloud.com > - */ > - > -#ifndef __LIBCFS_LINUX_CPU_H__ > -#define __LIBCFS_LINUX_CPU_H__ > - > -#ifndef __LIBCFS_LIBCFS_H__ > -#error Do not #include this file directly. #include instead > -#endif > - > -#include > -#include > -#include > - > -#ifdef CONFIG_SMP > - > -#define HAVE_LIBCFS_CPT > - > -/** virtual processing unit */ > -struct cfs_cpu_partition { > - /* CPUs mask for this partition */ > - cpumask_var_t cpt_cpumask; > - /* nodes mask for this partition */ > - nodemask_t *cpt_nodemask; > - /* spread rotor for NUMA allocator */ > - unsigned int cpt_spread_rotor; > -}; > - > -/** descriptor for CPU partitions */ > -struct cfs_cpt_table { > - /* version, reserved for hotplug */ > - unsigned int ctb_version; > - /* spread rotor for NUMA allocator */ > - unsigned int ctb_spread_rotor; > - /* # of CPU partitions */ > - unsigned int ctb_nparts; > - /* partitions tables */ > - struct cfs_cpu_partition *ctb_parts; > - /* shadow HW CPU to CPU partition ID */ > - int *ctb_cpu2cpt; > - /* all cpus in this partition table */ > - cpumask_var_t ctb_cpumask; > - /* all nodes in this partition table */ > - nodemask_t *ctb_nodemask; > -}; > - > -#endif /* CONFIG_SMP */ > -#endif /* __LIBCFS_LINUX_CPU_H__ */ > diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > index 76291a350406..5818f641455f 100644 > --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > @@ -37,7 +37,7 @@ > struct cfs_cpt_table *cfs_cpt_table __read_mostly; > EXPORT_SYMBOL(cfs_cpt_table); > > -#ifndef HAVE_LIBCFS_CPT > +#ifndef CONFIG_SMP > > #define CFS_CPU_VERSION_MAGIC 0xbabecafe > > @@ -225,4 +225,4 @@ cfs_cpu_init(void) > return cfs_cpt_table ? 0 : -1; > } > > -#endif /* HAVE_LIBCFS_CPT */ > +#endif /* CONFIG_SMP */ > > > From jsimmons at infradead.org Mon Apr 16 03:53:28 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 04:53:28 +0100 (BST) Subject: [lustre-devel] [PATCH 4/6] staging: lustre: rearrange placement of CPU partition management code. In-Reply-To: <152383935741.23409.6012110568532986137.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935741.23409.6012110568532986137.stgit@noble> Message-ID: > Currently the code for cpu-partition tables lives in various places. > The non-SMP code is partly in libcfs/libcfs_cpu.h as static inlines, > and partly in lnet/libcfs/libcfs_cpu.c - some of the functions are > tiny and could well be inlines. > > The SMP code is all in lnet/libcfs/linux/linux-cpu.c. > > This patch moves all the trivial non-SMP functions into > libcfs_cpu.h as inlines, and all the SMP functions into libcfs_cpu.c > with the non-trival !SMP code. > > Now when you go looking for some function, it is easier to find both > versions together when neither is trivial. > > There is no code change here - just code movement. > > Signed-off-by: NeilBrown Nak. SMP will be reworked. > --- > .../lustre/include/linux/libcfs/libcfs_cpu.h | 173 +++ > drivers/staging/lustre/lnet/libcfs/Makefile | 1 > drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 959 +++++++++++++++++- > .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 1079 -------------------- > 4 files changed, 1076 insertions(+), 1136 deletions(-) > delete mode 100644 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > index 829c35e68db8..813ba4564bb9 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > @@ -117,41 +117,6 @@ cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt); > * print string information of cpt-table > */ > int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); > -#else /* !CONFIG_SMP */ > -struct cfs_cpt_table { > - /* # of CPU partitions */ > - int ctb_nparts; > - /* cpu mask */ > - cpumask_t ctb_mask; > - /* node mask */ > - nodemask_t ctb_nodemask; > - /* version */ > - u64 ctb_version; > -}; > - > -static inline cpumask_var_t * > -cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) > -{ > - return NULL; > -} > - > -static inline int > -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) > -{ > - return 0; > -} > -#endif /* CONFIG_SMP */ > - > -extern struct cfs_cpt_table *cfs_cpt_table; > - > -/** > - * destroy a CPU partition table > - */ > -void cfs_cpt_table_free(struct cfs_cpt_table *cptab); > -/** > - * create a cfs_cpt_table with \a ncpt number of partitions > - */ > -struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); > /** > * return total number of CPU partitions in \a cptab > */ > @@ -237,6 +202,144 @@ int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt); > */ > int cfs_cpu_ht_nsiblings(int cpu); > > +#else /* !CONFIG_SMP */ > +struct cfs_cpt_table { > + /* # of CPU partitions */ > + int ctb_nparts; > + /* cpu mask */ > + cpumask_t ctb_mask; > + /* node mask */ > + nodemask_t ctb_nodemask; > + /* version */ > + u64 ctb_version; > +}; > + > +static inline cpumask_var_t * > +cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) > +{ > + return NULL; > +} > + > +static inline int > +cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) > +{ > + return 0; > +} > +static inline int > +cfs_cpt_number(struct cfs_cpt_table *cptab) > +{ > + return 1; > +} > + > +static inline int > +cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) > +{ > + return 1; > +} > + > +static inline int > +cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) > +{ > + return 1; > +} > + > +static inline nodemask_t * > +cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) > +{ > + return &cptab->ctb_nodemask; > +} > + > +static inline int > +cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) > +{ > + return 1; > +} > + > +static inline void > +cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) > +{ > +} > + > +static inline int > +cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) > +{ > + return 1; > +} > + > +static inline void > +cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) > +{ > +} > + > +static inline int > +cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) > +{ > + return 1; > +} > + > +static inline void > +cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) > +{ > +} > + > +static inline int > +cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) > +{ > + return 1; > +} > + > +static inline void > +cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) > +{ > +} > + > +static inline void > +cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) > +{ > +} > + > +static inline int > +cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) > +{ > + return 0; > +} > + > +static inline int > +cfs_cpu_ht_nsiblings(int cpu) > +{ > + return 1; > +} > + > +static inline int > +cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) > +{ > + return 0; > +} > + > +static inline int > +cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) > +{ > + return 0; > +} > + > +static inline int > +cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) > +{ > + return 0; > +} > +#endif /* CONFIG_SMP */ > + > +extern struct cfs_cpt_table *cfs_cpt_table; > + > +/** > + * destroy a CPU partition table > + */ > +void cfs_cpt_table_free(struct cfs_cpt_table *cptab); > +/** > + * create a cfs_cpt_table with \a ncpt number of partitions > + */ > +struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); > + > /* > * allocate per-cpu-partition data, returned value is an array of pointers, > * variable can be indexed by CPU ID. > diff --git a/drivers/staging/lustre/lnet/libcfs/Makefile b/drivers/staging/lustre/lnet/libcfs/Makefile > index 36b49a6b7b88..673fe348c445 100644 > --- a/drivers/staging/lustre/lnet/libcfs/Makefile > +++ b/drivers/staging/lustre/lnet/libcfs/Makefile > @@ -5,7 +5,6 @@ subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include > obj-$(CONFIG_LNET) += libcfs.o > > libcfs-linux-objs := linux-tracefile.o linux-debug.o > -libcfs-linux-objs += linux-cpu.o > libcfs-linux-objs += linux-module.o > libcfs-linux-objs += linux-crypto.o > libcfs-linux-objs += linux-crypto-adler.o > diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > index 5818f641455f..ac6fd11ae9d6 100644 > --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > @@ -36,11 +36,110 @@ > /** Global CPU partition table */ > struct cfs_cpt_table *cfs_cpt_table __read_mostly; > EXPORT_SYMBOL(cfs_cpt_table); > +#define DEBUG_SUBSYSTEM S_LNET > + > +#include > +#include > +#include > + > +#ifdef CONFIG_SMP > +/** > + * modparam for setting number of partitions > + * > + * 0 : estimate best value based on cores or NUMA nodes > + * 1 : disable multiple partitions > + * >1 : specify number of partitions > + */ > +static int cpu_npartitions; > +module_param(cpu_npartitions, int, 0444); > +MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions"); > + > +/** > + * modparam for setting CPU partitions patterns: > + * > + * i.e: "0[0,1,2,3] 1[4,5,6,7]", number before bracket is CPU partition ID, > + * number in bracket is processor ID (core or HT) > + * > + * i.e: "N 0[0,1] 1[2,3]" the first character 'N' means numbers in bracket > + * are NUMA node ID, number before bracket is CPU partition ID. > + * > + * i.e: "N", shortcut expression to create CPT from NUMA & CPU topology > + * > + * NB: If user specified cpu_pattern, cpu_npartitions will be ignored > + */ > +static char *cpu_pattern = "N"; > +module_param(cpu_pattern, charp, 0444); > +MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern"); > > -#ifndef CONFIG_SMP > +static struct cfs_cpt_data { > + /* serialize hotplug etc */ > + spinlock_t cpt_lock; > + /* reserved for hotplug */ > + unsigned long cpt_version; > + /* mutex to protect cpt_cpumask */ > + struct mutex cpt_mutex; > + /* scratch buffer for set/unset_node */ > + cpumask_var_t cpt_cpumask; > +} cpt_data; > +#endif > > #define CFS_CPU_VERSION_MAGIC 0xbabecafe > > +#ifdef CONFIG_SMP > +struct cfs_cpt_table * > +cfs_cpt_table_alloc(unsigned int ncpt) > +{ > + struct cfs_cpt_table *cptab; > + int i; > + > + cptab = kzalloc(sizeof(*cptab), GFP_NOFS); > + if (!cptab) > + return NULL; > + > + cptab->ctb_nparts = ncpt; > + > + cptab->ctb_nodemask = kzalloc(sizeof(*cptab->ctb_nodemask), > + GFP_NOFS); > + if (!zalloc_cpumask_var(&cptab->ctb_cpumask, GFP_NOFS) || > + !cptab->ctb_nodemask) > + goto failed; > + > + cptab->ctb_cpu2cpt = kvmalloc_array(num_possible_cpus(), > + sizeof(cptab->ctb_cpu2cpt[0]), > + GFP_KERNEL); > + if (!cptab->ctb_cpu2cpt) > + goto failed; > + > + memset(cptab->ctb_cpu2cpt, -1, > + num_possible_cpus() * sizeof(cptab->ctb_cpu2cpt[0])); > + > + cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), > + GFP_KERNEL); > + if (!cptab->ctb_parts) > + goto failed; > + > + for (i = 0; i < ncpt; i++) { > + struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; > + > + part->cpt_nodemask = kzalloc(sizeof(*part->cpt_nodemask), > + GFP_NOFS); > + if (!zalloc_cpumask_var(&part->cpt_cpumask, GFP_NOFS) || > + !part->cpt_nodemask) > + goto failed; > + } > + > + spin_lock(&cpt_data.cpt_lock); > + /* Reserved for hotplug */ > + cptab->ctb_version = cpt_data.cpt_version; > + spin_unlock(&cpt_data.cpt_lock); > + > + return cptab; > + > + failed: > + cfs_cpt_table_free(cptab); > + return NULL; > +} > +#else /* ! CONFIG_SMP */ > struct cfs_cpt_table * > cfs_cpt_table_alloc(unsigned int ncpt) > { > @@ -60,8 +159,32 @@ cfs_cpt_table_alloc(unsigned int ncpt) > > return cptab; > } > +#endif /* CONFIG_SMP */ > EXPORT_SYMBOL(cfs_cpt_table_alloc); > > +#ifdef CONFIG_SMP > +void > +cfs_cpt_table_free(struct cfs_cpt_table *cptab) > +{ > + int i; > + > + kvfree(cptab->ctb_cpu2cpt); > + > + for (i = 0; cptab->ctb_parts && i < cptab->ctb_nparts; i++) { > + struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; > + > + kfree(part->cpt_nodemask); > + free_cpumask_var(part->cpt_cpumask); > + } > + > + kvfree(cptab->ctb_parts); > + > + kfree(cptab->ctb_nodemask); > + free_cpumask_var(cptab->ctb_cpumask); > + > + kfree(cptab); > +} > +#else /* ! CONFIG_SMP */ > void > cfs_cpt_table_free(struct cfs_cpt_table *cptab) > { > @@ -69,55 +192,153 @@ cfs_cpt_table_free(struct cfs_cpt_table *cptab) > > kfree(cptab); > } > +#endif /* CONFIG_SMP */ > EXPORT_SYMBOL(cfs_cpt_table_free); > > #ifdef CONFIG_SMP > int > cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) > { > - int rc; > + char *tmp = buf; > + int rc = 0; > + int i; > + int j; > > - rc = snprintf(buf, len, "%d\t: %d\n", 0, 0); > - len -= rc; > - if (len <= 0) > - return -EFBIG; > + for (i = 0; i < cptab->ctb_nparts; i++) { > + if (len > 0) { > + rc = snprintf(tmp, len, "%d\t: ", i); > + len -= rc; > + } > > - return rc; > + if (len <= 0) { > + rc = -EFBIG; > + goto out; > + } > + > + tmp += rc; > + for_each_cpu(j, cptab->ctb_parts[i].cpt_cpumask) { > + rc = snprintf(tmp, len, "%d ", j); > + len -= rc; > + if (len <= 0) { > + rc = -EFBIG; > + goto out; > + } > + tmp += rc; > + } > + > + *tmp = '\n'; > + tmp++; > + len--; > + } > + > + out: > + if (rc < 0) > + return rc; > + > + return tmp - buf; > } > EXPORT_SYMBOL(cfs_cpt_table_print); > #endif /* CONFIG_SMP */ > > +#ifdef CONFIG_SMP > +static void > +cfs_node_to_cpumask(int node, cpumask_t *mask) > +{ > + const cpumask_t *tmp = cpumask_of_node(node); > + > + if (tmp) > + cpumask_copy(mask, tmp); > + else > + cpumask_clear(mask); > +} > + > int > cfs_cpt_number(struct cfs_cpt_table *cptab) > { > - return 1; > + return cptab->ctb_nparts; > } > EXPORT_SYMBOL(cfs_cpt_number); > > int > cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) > { > - return 1; > + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > + > + return cpt == CFS_CPT_ANY ? > + cpumask_weight(cptab->ctb_cpumask) : > + cpumask_weight(cptab->ctb_parts[cpt].cpt_cpumask); > } > EXPORT_SYMBOL(cfs_cpt_weight); > > int > cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) > { > - return 1; > + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > + > + return cpt == CFS_CPT_ANY ? > + cpumask_any_and(cptab->ctb_cpumask, > + cpu_online_mask) < nr_cpu_ids : > + cpumask_any_and(cptab->ctb_parts[cpt].cpt_cpumask, > + cpu_online_mask) < nr_cpu_ids; > } > EXPORT_SYMBOL(cfs_cpt_online); > > +cpumask_var_t * > +cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) > +{ > + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > + > + return cpt == CFS_CPT_ANY ? > + &cptab->ctb_cpumask : &cptab->ctb_parts[cpt].cpt_cpumask; > +} > +EXPORT_SYMBOL(cfs_cpt_cpumask); > + > nodemask_t * > cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) > { > - return &cptab->ctb_nodemask; > + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > + > + return cpt == CFS_CPT_ANY ? > + cptab->ctb_nodemask : cptab->ctb_parts[cpt].cpt_nodemask; > } > EXPORT_SYMBOL(cfs_cpt_nodemask); > > int > cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) > { > + int node; > + > + LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); > + > + if (cpu < 0 || cpu >= nr_cpu_ids || !cpu_online(cpu)) { > + CDEBUG(D_INFO, "CPU %d is invalid or it's offline\n", cpu); > + return 0; > + } > + > + if (cptab->ctb_cpu2cpt[cpu] != -1) { > + CDEBUG(D_INFO, "CPU %d is already in partition %d\n", > + cpu, cptab->ctb_cpu2cpt[cpu]); > + return 0; > + } > + > + cptab->ctb_cpu2cpt[cpu] = cpt; > + > + LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); > + LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); > + > + cpumask_set_cpu(cpu, cptab->ctb_cpumask); > + cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); > + > + node = cpu_to_node(cpu); > + > + /* first CPU of @node in this CPT table */ > + if (!node_isset(node, *cptab->ctb_nodemask)) > + node_set(node, *cptab->ctb_nodemask); > + > + /* first CPU of @node in this partition */ > + if (!node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)) > + node_set(node, *cptab->ctb_parts[cpt].cpt_nodemask); > + > return 1; > } > EXPORT_SYMBOL(cfs_cpt_set_cpu); > @@ -125,12 +346,80 @@ EXPORT_SYMBOL(cfs_cpt_set_cpu); > void > cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) > { > + int node; > + int i; > + > + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > + > + if (cpu < 0 || cpu >= nr_cpu_ids) { > + CDEBUG(D_INFO, "Invalid CPU id %d\n", cpu); > + return; > + } > + > + if (cpt == CFS_CPT_ANY) { > + /* caller doesn't know the partition ID */ > + cpt = cptab->ctb_cpu2cpt[cpu]; > + if (cpt < 0) { /* not set in this CPT-table */ > + CDEBUG(D_INFO, "Try to unset cpu %d which is not in CPT-table %p\n", > + cpt, cptab); > + return; > + } > + > + } else if (cpt != cptab->ctb_cpu2cpt[cpu]) { > + CDEBUG(D_INFO, > + "CPU %d is not in cpu-partition %d\n", cpu, cpt); > + return; > + } > + > + LASSERT(cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); > + LASSERT(cpumask_test_cpu(cpu, cptab->ctb_cpumask)); > + > + cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); > + cpumask_clear_cpu(cpu, cptab->ctb_cpumask); > + cptab->ctb_cpu2cpt[cpu] = -1; > + > + node = cpu_to_node(cpu); > + > + LASSERT(node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)); > + LASSERT(node_isset(node, *cptab->ctb_nodemask)); > + > + for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) { > + /* this CPT has other CPU belonging to this node? */ > + if (cpu_to_node(i) == node) > + break; > + } > + > + if (i >= nr_cpu_ids) > + node_clear(node, *cptab->ctb_parts[cpt].cpt_nodemask); > + > + for_each_cpu(i, cptab->ctb_cpumask) { > + /* this CPT-table has other CPU belonging to this node? */ > + if (cpu_to_node(i) == node) > + break; > + } > + > + if (i >= nr_cpu_ids) > + node_clear(node, *cptab->ctb_nodemask); > } > EXPORT_SYMBOL(cfs_cpt_unset_cpu); > > int > cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) > { > + int i; > + > + if (!cpumask_weight(mask) || > + cpumask_any_and(mask, cpu_online_mask) >= nr_cpu_ids) { > + CDEBUG(D_INFO, "No online CPU is found in the CPU mask for CPU partition %d\n", > + cpt); > + return 0; > + } > + > + for_each_cpu(i, mask) { > + if (!cfs_cpt_set_cpu(cptab, cpt, i)) > + return 0; > + } > + > return 1; > } > EXPORT_SYMBOL(cfs_cpt_set_cpumask); > @@ -138,25 +427,65 @@ EXPORT_SYMBOL(cfs_cpt_set_cpumask); > void > cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) > { > + int i; > + > + for_each_cpu(i, mask) > + cfs_cpt_unset_cpu(cptab, cpt, i); > } > EXPORT_SYMBOL(cfs_cpt_unset_cpumask); > > int > cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) > { > - return 1; > + int rc; > + > + if (node < 0 || node >= MAX_NUMNODES) { > + CDEBUG(D_INFO, > + "Invalid NUMA id %d for CPU partition %d\n", node, cpt); > + return 0; > + } > + > + mutex_lock(&cpt_data.cpt_mutex); > + > + cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); > + > + rc = cfs_cpt_set_cpumask(cptab, cpt, cpt_data.cpt_cpumask); > + > + mutex_unlock(&cpt_data.cpt_mutex); > + > + return rc; > } > EXPORT_SYMBOL(cfs_cpt_set_node); > > void > cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) > { > + if (node < 0 || node >= MAX_NUMNODES) { > + CDEBUG(D_INFO, > + "Invalid NUMA id %d for CPU partition %d\n", node, cpt); > + return; > + } > + > + mutex_lock(&cpt_data.cpt_mutex); > + > + cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); > + > + cfs_cpt_unset_cpumask(cptab, cpt, cpt_data.cpt_cpumask); > + > + mutex_unlock(&cpt_data.cpt_mutex); > } > EXPORT_SYMBOL(cfs_cpt_unset_node); > > int > cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) > { > + int i; > + > + for_each_node_mask(i, *mask) { > + if (!cfs_cpt_set_node(cptab, cpt, i)) > + return 0; > + } > + > return 1; > } > EXPORT_SYMBOL(cfs_cpt_set_nodemask); > @@ -164,50 +493,638 @@ EXPORT_SYMBOL(cfs_cpt_set_nodemask); > void > cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) > { > + int i; > + > + for_each_node_mask(i, *mask) > + cfs_cpt_unset_node(cptab, cpt, i); > } > EXPORT_SYMBOL(cfs_cpt_unset_nodemask); > > void > cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) > { > + int last; > + int i; > + > + if (cpt == CFS_CPT_ANY) { > + last = cptab->ctb_nparts - 1; > + cpt = 0; > + } else { > + last = cpt; > + } > + > + for (; cpt <= last; cpt++) { > + for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) > + cfs_cpt_unset_cpu(cptab, cpt, i); > + } > } > EXPORT_SYMBOL(cfs_cpt_clear); > > int > cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) > { > + nodemask_t *mask; > + int weight; > + int rotor; > + int node; > + > + /* convert CPU partition ID to HW node id */ > + > + if (cpt < 0 || cpt >= cptab->ctb_nparts) { > + mask = cptab->ctb_nodemask; > + rotor = cptab->ctb_spread_rotor++; > + } else { > + mask = cptab->ctb_parts[cpt].cpt_nodemask; > + rotor = cptab->ctb_parts[cpt].cpt_spread_rotor++; > + } > + > + weight = nodes_weight(*mask); > + LASSERT(weight > 0); > + > + rotor %= weight; > + > + for_each_node_mask(node, *mask) { > + if (!rotor--) > + return node; > + } > + > + LBUG(); > return 0; > } > EXPORT_SYMBOL(cfs_cpt_spread_node); > > -int > -cfs_cpu_ht_nsiblings(int cpu) > -{ > - return 1; > -} > -EXPORT_SYMBOL(cfs_cpu_ht_nsiblings); > - > int > cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) > { > - return 0; > + int cpu; > + int cpt; > + > + preempt_disable(); > + cpu = smp_processor_id(); > + cpt = cptab->ctb_cpu2cpt[cpu]; > + > + if (cpt < 0 && remap) { > + /* don't return negative value for safety of upper layer, > + * instead we shadow the unknown cpu to a valid partition ID > + */ > + cpt = cpu % cptab->ctb_nparts; > + } > + preempt_enable(); > + return cpt; > } > EXPORT_SYMBOL(cfs_cpt_current); > > int > cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) > { > - return 0; > + LASSERT(cpu >= 0 && cpu < nr_cpu_ids); > + > + return cptab->ctb_cpu2cpt[cpu]; > } > EXPORT_SYMBOL(cfs_cpt_of_cpu); > > int > cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) > { > + cpumask_var_t *cpumask; > + nodemask_t *nodemask; > + int rc; > + int i; > + > + LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > + > + if (cpt == CFS_CPT_ANY) { > + cpumask = &cptab->ctb_cpumask; > + nodemask = cptab->ctb_nodemask; > + } else { > + cpumask = &cptab->ctb_parts[cpt].cpt_cpumask; > + nodemask = cptab->ctb_parts[cpt].cpt_nodemask; > + } > + > + if (cpumask_any_and(*cpumask, cpu_online_mask) >= nr_cpu_ids) { > + CERROR("No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", > + cpt); > + return -EINVAL; > + } > + > + for_each_online_cpu(i) { > + if (cpumask_test_cpu(i, *cpumask)) > + continue; > + > + rc = set_cpus_allowed_ptr(current, *cpumask); > + set_mems_allowed(*nodemask); > + if (!rc) > + schedule(); /* switch to allowed CPU */ > + > + return rc; > + } > + > + /* don't need to set affinity because all online CPUs are covered */ > return 0; > } > EXPORT_SYMBOL(cfs_cpt_bind); > > +#endif > + > +#ifdef CONFIG_SMP > + > +/** > + * Choose max to \a number CPUs from \a node and set them in \a cpt. > + * We always prefer to choose CPU in the same core/socket. > + */ > +static int > +cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, > + cpumask_t *node, int number) > +{ > + cpumask_var_t socket; > + cpumask_var_t core; > + int rc = 0; > + int cpu; > + > + LASSERT(number > 0); > + > + if (number >= cpumask_weight(node)) { > + while (!cpumask_empty(node)) { > + cpu = cpumask_first(node); > + > + rc = cfs_cpt_set_cpu(cptab, cpt, cpu); > + if (!rc) > + return -EINVAL; > + cpumask_clear_cpu(cpu, node); > + } > + return 0; > + } > + > + /* > + * Allocate scratch buffers > + * As we cannot initialize a cpumask_var_t, we need > + * to alloc both before we can risk trying to free either > + */ > + if (!zalloc_cpumask_var(&socket, GFP_NOFS)) > + rc = -ENOMEM; > + if (!zalloc_cpumask_var(&core, GFP_NOFS)) > + rc = -ENOMEM; > + if (rc) > + goto out; > + > + while (!cpumask_empty(node)) { > + cpu = cpumask_first(node); > + > + /* get cpumask for cores in the same socket */ > + cpumask_copy(socket, topology_core_cpumask(cpu)); > + cpumask_and(socket, socket, node); > + > + LASSERT(!cpumask_empty(socket)); > + > + while (!cpumask_empty(socket)) { > + int i; > + > + /* get cpumask for hts in the same core */ > + cpumask_copy(core, topology_sibling_cpumask(cpu)); > + cpumask_and(core, core, node); > + > + LASSERT(!cpumask_empty(core)); > + > + for_each_cpu(i, core) { > + cpumask_clear_cpu(i, socket); > + cpumask_clear_cpu(i, node); > + > + rc = cfs_cpt_set_cpu(cptab, cpt, i); > + if (!rc) { > + rc = -EINVAL; > + goto out; > + } > + > + if (!--number) > + goto out; > + } > + cpu = cpumask_first(socket); > + } > + } > + > +out: > + free_cpumask_var(socket); > + free_cpumask_var(core); > + return rc; > +} > + > +#define CPT_WEIGHT_MIN 4u > + > +static unsigned int > +cfs_cpt_num_estimate(void) > +{ > + unsigned int nnode = num_online_nodes(); > + unsigned int ncpu = num_online_cpus(); > + unsigned int ncpt; > + > + if (ncpu <= CPT_WEIGHT_MIN) { > + ncpt = 1; > + goto out; > + } > + > + /* generate reasonable number of CPU partitions based on total number > + * of CPUs, Preferred N should be power2 and match this condition: > + * 2 * (N - 1)^2 < NCPUS <= 2 * N^2 > + */ > + for (ncpt = 2; ncpu > 2 * ncpt * ncpt; ncpt <<= 1) > + ; > + > + if (ncpt <= nnode) { /* fat numa system */ > + while (nnode > ncpt) > + nnode >>= 1; > + > + } else { /* ncpt > nnode */ > + while ((nnode << 1) <= ncpt) > + nnode <<= 1; > + } > + > + ncpt = nnode; > + > +out: > +#if (BITS_PER_LONG == 32) > + /* config many CPU partitions on 32-bit system could consume > + * too much memory > + */ > + ncpt = min(2U, ncpt); > +#endif > + while (ncpu % ncpt) > + ncpt--; /* worst case is 1 */ > + > + return ncpt; > +} > + > +static struct cfs_cpt_table * > +cfs_cpt_table_create(int ncpt) > +{ > + struct cfs_cpt_table *cptab = NULL; > + cpumask_var_t mask; > + int cpt = 0; > + int num; > + int rc; > + int i; > + > + rc = cfs_cpt_num_estimate(); > + if (ncpt <= 0) > + ncpt = rc; > + > + if (ncpt > num_online_cpus() || ncpt > 4 * rc) { > + CWARN("CPU partition number %d is larger than suggested value (%d), your system may have performance issue or run out of memory while under pressure\n", > + ncpt, rc); > + } > + > + if (num_online_cpus() % ncpt) { > + CERROR("CPU number %d is not multiple of cpu_npartition %d, please try different cpu_npartitions value or set pattern string by cpu_pattern=STRING\n", > + (int)num_online_cpus(), ncpt); > + goto failed; > + } > + > + cptab = cfs_cpt_table_alloc(ncpt); > + if (!cptab) { > + CERROR("Failed to allocate CPU map(%d)\n", ncpt); > + goto failed; > + } > + > + num = num_online_cpus() / ncpt; > + if (!num) { > + CERROR("CPU changed while setting CPU partition\n"); > + goto failed; > + } > + > + if (!zalloc_cpumask_var(&mask, GFP_NOFS)) { > + CERROR("Failed to allocate scratch cpumask\n"); > + goto failed; > + } > + > + for_each_online_node(i) { > + cfs_node_to_cpumask(i, mask); > + > + while (!cpumask_empty(mask)) { > + struct cfs_cpu_partition *part; > + int n; > + > + /* > + * Each emulated NUMA node has all allowed CPUs in > + * the mask. > + * End loop when all partitions have assigned CPUs. > + */ > + if (cpt == ncpt) > + break; > + > + part = &cptab->ctb_parts[cpt]; > + > + n = num - cpumask_weight(part->cpt_cpumask); > + LASSERT(n > 0); > + > + rc = cfs_cpt_choose_ncpus(cptab, cpt, mask, n); > + if (rc < 0) > + goto failed_mask; > + > + LASSERT(num >= cpumask_weight(part->cpt_cpumask)); > + if (num == cpumask_weight(part->cpt_cpumask)) > + cpt++; > + } > + } > + > + if (cpt != ncpt || > + num != cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)) { > + CERROR("Expect %d(%d) CPU partitions but got %d(%d), CPU hotplug/unplug while setting?\n", > + cptab->ctb_nparts, num, cpt, > + cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)); > + goto failed_mask; > + } > + > + free_cpumask_var(mask); > + > + return cptab; > + > + failed_mask: > + free_cpumask_var(mask); > + failed: > + CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", > + ncpt, num_online_nodes(), num_online_cpus()); > + > + if (cptab) > + cfs_cpt_table_free(cptab); > + > + return NULL; > +} > + > +static struct cfs_cpt_table * > +cfs_cpt_table_create_pattern(char *pattern) > +{ > + struct cfs_cpt_table *cptab; > + char *str; > + int node = 0; > + int high; > + int ncpt = 0; > + int cpt; > + int rc; > + int c; > + int i; > + > + str = strim(pattern); > + if (*str == 'n' || *str == 'N') { > + pattern = str + 1; > + if (*pattern != '\0') { > + node = 1; > + } else { /* shortcut to create CPT from NUMA & CPU topology */ > + node = -1; > + ncpt = num_online_nodes(); > + } > + } > + > + if (!ncpt) { /* scanning bracket which is mark of partition */ > + for (str = pattern;; str++, ncpt++) { > + str = strchr(str, '['); > + if (!str) > + break; > + } > + } > + > + if (!ncpt || > + (node && ncpt > num_online_nodes()) || > + (!node && ncpt > num_online_cpus())) { > + CERROR("Invalid pattern %s, or too many partitions %d\n", > + pattern, ncpt); > + return NULL; > + } > + > + cptab = cfs_cpt_table_alloc(ncpt); > + if (!cptab) { > + CERROR("Failed to allocate cpu partition table\n"); > + return NULL; > + } > + > + if (node < 0) { /* shortcut to create CPT from NUMA & CPU topology */ > + cpt = 0; > + > + for_each_online_node(i) { > + if (cpt >= ncpt) { > + CERROR("CPU changed while setting CPU partition table, %d/%d\n", > + cpt, ncpt); > + goto failed; > + } > + > + rc = cfs_cpt_set_node(cptab, cpt++, i); > + if (!rc) > + goto failed; > + } > + return cptab; > + } > + > + high = node ? MAX_NUMNODES - 1 : nr_cpu_ids - 1; > + > + for (str = strim(pattern), c = 0;; c++) { > + struct cfs_range_expr *range; > + struct cfs_expr_list *el; > + char *bracket = strchr(str, '['); > + int n; > + > + if (!bracket) { > + if (*str) { > + CERROR("Invalid pattern %s\n", str); > + goto failed; > + } > + if (c != ncpt) { > + CERROR("expect %d partitions but found %d\n", > + ncpt, c); > + goto failed; > + } > + break; > + } > + > + if (sscanf(str, "%d%n", &cpt, &n) < 1) { > + CERROR("Invalid cpu pattern %s\n", str); > + goto failed; > + } > + > + if (cpt < 0 || cpt >= ncpt) { > + CERROR("Invalid partition id %d, total partitions %d\n", > + cpt, ncpt); > + goto failed; > + } > + > + if (cfs_cpt_weight(cptab, cpt)) { > + CERROR("Partition %d has already been set.\n", cpt); > + goto failed; > + } > + > + str = strim(str + n); > + if (str != bracket) { > + CERROR("Invalid pattern %s\n", str); > + goto failed; > + } > + > + bracket = strchr(str, ']'); > + if (!bracket) { > + CERROR("missing right bracket for cpt %d, %s\n", > + cpt, str); > + goto failed; > + } > + > + if (cfs_expr_list_parse(str, (bracket - str) + 1, > + 0, high, &el)) { > + CERROR("Can't parse number range: %s\n", str); > + goto failed; > + } > + > + list_for_each_entry(range, &el->el_exprs, re_link) { > + for (i = range->re_lo; i <= range->re_hi; i++) { > + if ((i - range->re_lo) % range->re_stride) > + continue; > + > + rc = node ? cfs_cpt_set_node(cptab, cpt, i) : > + cfs_cpt_set_cpu(cptab, cpt, i); > + if (!rc) { > + cfs_expr_list_free(el); > + goto failed; > + } > + } > + } > + > + cfs_expr_list_free(el); > + > + if (!cfs_cpt_online(cptab, cpt)) { > + CERROR("No online CPU is found on partition %d\n", cpt); > + goto failed; > + } > + > + str = strim(bracket + 1); > + } > + > + return cptab; > + > + failed: > + cfs_cpt_table_free(cptab); > + return NULL; > +} > + > +#ifdef CONFIG_HOTPLUG_CPU > +static enum cpuhp_state lustre_cpu_online; > + > +static void cfs_cpu_incr_cpt_version(void) > +{ > + spin_lock(&cpt_data.cpt_lock); > + cpt_data.cpt_version++; > + spin_unlock(&cpt_data.cpt_lock); > +} > + > +static int cfs_cpu_online(unsigned int cpu) > +{ > + cfs_cpu_incr_cpt_version(); > + return 0; > +} > + > +static int cfs_cpu_dead(unsigned int cpu) > +{ > + bool warn; > + > + cfs_cpu_incr_cpt_version(); > + > + mutex_lock(&cpt_data.cpt_mutex); > + /* if all HTs in a core are offline, it may break affinity */ > + cpumask_copy(cpt_data.cpt_cpumask, topology_sibling_cpumask(cpu)); > + warn = cpumask_any_and(cpt_data.cpt_cpumask, > + cpu_online_mask) >= nr_cpu_ids; > + mutex_unlock(&cpt_data.cpt_mutex); > + CDEBUG(warn ? D_WARNING : D_INFO, > + "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u]\n", > + cpu); > + return 0; > +} > +#endif > + > +void > +cfs_cpu_fini(void) > +{ > + if (cfs_cpt_table) > + cfs_cpt_table_free(cfs_cpt_table); > + > +#ifdef CONFIG_HOTPLUG_CPU > + if (lustre_cpu_online > 0) > + cpuhp_remove_state_nocalls(lustre_cpu_online); > + cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); > +#endif > + free_cpumask_var(cpt_data.cpt_cpumask); > +} > + > +int > +cfs_cpu_init(void) > +{ > + int ret = 0; > + > + LASSERT(!cfs_cpt_table); > + > + memset(&cpt_data, 0, sizeof(cpt_data)); > + > + if (!zalloc_cpumask_var(&cpt_data.cpt_cpumask, GFP_NOFS)) { > + CERROR("Failed to allocate scratch buffer\n"); > + return -1; > + } > + > + spin_lock_init(&cpt_data.cpt_lock); > + mutex_init(&cpt_data.cpt_mutex); > + > +#ifdef CONFIG_HOTPLUG_CPU > + ret = cpuhp_setup_state_nocalls(CPUHP_LUSTRE_CFS_DEAD, > + "staging/lustre/cfe:dead", NULL, > + cfs_cpu_dead); > + if (ret < 0) > + goto failed; > + ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, > + "staging/lustre/cfe:online", > + cfs_cpu_online, NULL); > + if (ret < 0) > + goto failed; > + lustre_cpu_online = ret; > +#endif > + ret = -EINVAL; > + > + if (*cpu_pattern) { > + char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); > + > + if (!cpu_pattern_dup) { > + CERROR("Failed to duplicate cpu_pattern\n"); > + goto failed; > + } > + > + cfs_cpt_table = cfs_cpt_table_create_pattern(cpu_pattern_dup); > + kfree(cpu_pattern_dup); > + if (!cfs_cpt_table) { > + CERROR("Failed to create cptab from pattern %s\n", > + cpu_pattern); > + goto failed; > + } > + > + } else { > + cfs_cpt_table = cfs_cpt_table_create(cpu_npartitions); > + if (!cfs_cpt_table) { > + CERROR("Failed to create ptable with npartitions %d\n", > + cpu_npartitions); > + goto failed; > + } > + } > + > + spin_lock(&cpt_data.cpt_lock); > + if (cfs_cpt_table->ctb_version != cpt_data.cpt_version) { > + spin_unlock(&cpt_data.cpt_lock); > + CERROR("CPU hotplug/unplug during setup\n"); > + goto failed; > + } > + spin_unlock(&cpt_data.cpt_lock); > + > + LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", > + num_online_nodes(), num_online_cpus(), > + cfs_cpt_number(cfs_cpt_table)); > + return 0; > + > + failed: > + cfs_cpu_fini(); > + return ret; > +} > + > +#else /* ! CONFIG_SMP */ > + > void > cfs_cpu_fini(void) > { > diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > deleted file mode 100644 > index 388521e4e354..000000000000 > --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > +++ /dev/null > @@ -1,1079 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. > - * > - * Copyright (c) 2012, 2015 Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * Author: liang at whamcloud.com > - */ > - > -#define DEBUG_SUBSYSTEM S_LNET > - > -#include > -#include > -#include > - > -#ifdef CONFIG_SMP > - > -/** > - * modparam for setting number of partitions > - * > - * 0 : estimate best value based on cores or NUMA nodes > - * 1 : disable multiple partitions > - * >1 : specify number of partitions > - */ > -static int cpu_npartitions; > -module_param(cpu_npartitions, int, 0444); > -MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions"); > - > -/** > - * modparam for setting CPU partitions patterns: > - * > - * i.e: "0[0,1,2,3] 1[4,5,6,7]", number before bracket is CPU partition ID, > - * number in bracket is processor ID (core or HT) > - * > - * i.e: "N 0[0,1] 1[2,3]" the first character 'N' means numbers in bracket > - * are NUMA node ID, number before bracket is CPU partition ID. > - * > - * i.e: "N", shortcut expression to create CPT from NUMA & CPU topology > - * > - * NB: If user specified cpu_pattern, cpu_npartitions will be ignored > - */ > -static char *cpu_pattern = "N"; > -module_param(cpu_pattern, charp, 0444); > -MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern"); > - > -struct cfs_cpt_data { > - /* serialize hotplug etc */ > - spinlock_t cpt_lock; > - /* reserved for hotplug */ > - unsigned long cpt_version; > - /* mutex to protect cpt_cpumask */ > - struct mutex cpt_mutex; > - /* scratch buffer for set/unset_node */ > - cpumask_var_t cpt_cpumask; > -}; > - > -static struct cfs_cpt_data cpt_data; > - > -static void > -cfs_node_to_cpumask(int node, cpumask_t *mask) > -{ > - const cpumask_t *tmp = cpumask_of_node(node); > - > - if (tmp) > - cpumask_copy(mask, tmp); > - else > - cpumask_clear(mask); > -} > - > -void > -cfs_cpt_table_free(struct cfs_cpt_table *cptab) > -{ > - int i; > - > - kvfree(cptab->ctb_cpu2cpt); > - > - for (i = 0; cptab->ctb_parts && i < cptab->ctb_nparts; i++) { > - struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; > - > - kfree(part->cpt_nodemask); > - free_cpumask_var(part->cpt_cpumask); > - } > - > - kvfree(cptab->ctb_parts); > - > - kfree(cptab->ctb_nodemask); > - free_cpumask_var(cptab->ctb_cpumask); > - > - kfree(cptab); > -} > -EXPORT_SYMBOL(cfs_cpt_table_free); > - > -struct cfs_cpt_table * > -cfs_cpt_table_alloc(unsigned int ncpt) > -{ > - struct cfs_cpt_table *cptab; > - int i; > - > - cptab = kzalloc(sizeof(*cptab), GFP_NOFS); > - if (!cptab) > - return NULL; > - > - cptab->ctb_nparts = ncpt; > - > - cptab->ctb_nodemask = kzalloc(sizeof(*cptab->ctb_nodemask), > - GFP_NOFS); > - if (!zalloc_cpumask_var(&cptab->ctb_cpumask, GFP_NOFS) || > - !cptab->ctb_nodemask) > - goto failed; > - > - cptab->ctb_cpu2cpt = kvmalloc_array(num_possible_cpus(), > - sizeof(cptab->ctb_cpu2cpt[0]), > - GFP_KERNEL); > - if (!cptab->ctb_cpu2cpt) > - goto failed; > - > - memset(cptab->ctb_cpu2cpt, -1, > - num_possible_cpus() * sizeof(cptab->ctb_cpu2cpt[0])); > - > - cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), > - GFP_KERNEL); > - if (!cptab->ctb_parts) > - goto failed; > - > - for (i = 0; i < ncpt; i++) { > - struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; > - > - part->cpt_nodemask = kzalloc(sizeof(*part->cpt_nodemask), > - GFP_NOFS); > - if (!zalloc_cpumask_var(&part->cpt_cpumask, GFP_NOFS) || > - !part->cpt_nodemask) > - goto failed; > - } > - > - spin_lock(&cpt_data.cpt_lock); > - /* Reserved for hotplug */ > - cptab->ctb_version = cpt_data.cpt_version; > - spin_unlock(&cpt_data.cpt_lock); > - > - return cptab; > - > - failed: > - cfs_cpt_table_free(cptab); > - return NULL; > -} > -EXPORT_SYMBOL(cfs_cpt_table_alloc); > - > -int > -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) > -{ > - char *tmp = buf; > - int rc = 0; > - int i; > - int j; > - > - for (i = 0; i < cptab->ctb_nparts; i++) { > - if (len > 0) { > - rc = snprintf(tmp, len, "%d\t: ", i); > - len -= rc; > - } > - > - if (len <= 0) { > - rc = -EFBIG; > - goto out; > - } > - > - tmp += rc; > - for_each_cpu(j, cptab->ctb_parts[i].cpt_cpumask) { > - rc = snprintf(tmp, len, "%d ", j); > - len -= rc; > - if (len <= 0) { > - rc = -EFBIG; > - goto out; > - } > - tmp += rc; > - } > - > - *tmp = '\n'; > - tmp++; > - len--; > - } > - > - out: > - if (rc < 0) > - return rc; > - > - return tmp - buf; > -} > -EXPORT_SYMBOL(cfs_cpt_table_print); > - > -int > -cfs_cpt_number(struct cfs_cpt_table *cptab) > -{ > - return cptab->ctb_nparts; > -} > -EXPORT_SYMBOL(cfs_cpt_number); > - > -int > -cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) > -{ > - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > - > - return cpt == CFS_CPT_ANY ? > - cpumask_weight(cptab->ctb_cpumask) : > - cpumask_weight(cptab->ctb_parts[cpt].cpt_cpumask); > -} > -EXPORT_SYMBOL(cfs_cpt_weight); > - > -int > -cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) > -{ > - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > - > - return cpt == CFS_CPT_ANY ? > - cpumask_any_and(cptab->ctb_cpumask, > - cpu_online_mask) < nr_cpu_ids : > - cpumask_any_and(cptab->ctb_parts[cpt].cpt_cpumask, > - cpu_online_mask) < nr_cpu_ids; > -} > -EXPORT_SYMBOL(cfs_cpt_online); > - > -cpumask_var_t * > -cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) > -{ > - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > - > - return cpt == CFS_CPT_ANY ? > - &cptab->ctb_cpumask : &cptab->ctb_parts[cpt].cpt_cpumask; > -} > -EXPORT_SYMBOL(cfs_cpt_cpumask); > - > -nodemask_t * > -cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) > -{ > - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > - > - return cpt == CFS_CPT_ANY ? > - cptab->ctb_nodemask : cptab->ctb_parts[cpt].cpt_nodemask; > -} > -EXPORT_SYMBOL(cfs_cpt_nodemask); > - > -int > -cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) > -{ > - int node; > - > - LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); > - > - if (cpu < 0 || cpu >= nr_cpu_ids || !cpu_online(cpu)) { > - CDEBUG(D_INFO, "CPU %d is invalid or it's offline\n", cpu); > - return 0; > - } > - > - if (cptab->ctb_cpu2cpt[cpu] != -1) { > - CDEBUG(D_INFO, "CPU %d is already in partition %d\n", > - cpu, cptab->ctb_cpu2cpt[cpu]); > - return 0; > - } > - > - cptab->ctb_cpu2cpt[cpu] = cpt; > - > - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); > - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); > - > - cpumask_set_cpu(cpu, cptab->ctb_cpumask); > - cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); > - > - node = cpu_to_node(cpu); > - > - /* first CPU of @node in this CPT table */ > - if (!node_isset(node, *cptab->ctb_nodemask)) > - node_set(node, *cptab->ctb_nodemask); > - > - /* first CPU of @node in this partition */ > - if (!node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)) > - node_set(node, *cptab->ctb_parts[cpt].cpt_nodemask); > - > - return 1; > -} > -EXPORT_SYMBOL(cfs_cpt_set_cpu); > - > -void > -cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) > -{ > - int node; > - int i; > - > - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > - > - if (cpu < 0 || cpu >= nr_cpu_ids) { > - CDEBUG(D_INFO, "Invalid CPU id %d\n", cpu); > - return; > - } > - > - if (cpt == CFS_CPT_ANY) { > - /* caller doesn't know the partition ID */ > - cpt = cptab->ctb_cpu2cpt[cpu]; > - if (cpt < 0) { /* not set in this CPT-table */ > - CDEBUG(D_INFO, "Try to unset cpu %d which is not in CPT-table %p\n", > - cpt, cptab); > - return; > - } > - > - } else if (cpt != cptab->ctb_cpu2cpt[cpu]) { > - CDEBUG(D_INFO, > - "CPU %d is not in cpu-partition %d\n", cpu, cpt); > - return; > - } > - > - LASSERT(cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); > - LASSERT(cpumask_test_cpu(cpu, cptab->ctb_cpumask)); > - > - cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); > - cpumask_clear_cpu(cpu, cptab->ctb_cpumask); > - cptab->ctb_cpu2cpt[cpu] = -1; > - > - node = cpu_to_node(cpu); > - > - LASSERT(node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)); > - LASSERT(node_isset(node, *cptab->ctb_nodemask)); > - > - for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) { > - /* this CPT has other CPU belonging to this node? */ > - if (cpu_to_node(i) == node) > - break; > - } > - > - if (i >= nr_cpu_ids) > - node_clear(node, *cptab->ctb_parts[cpt].cpt_nodemask); > - > - for_each_cpu(i, cptab->ctb_cpumask) { > - /* this CPT-table has other CPU belonging to this node? */ > - if (cpu_to_node(i) == node) > - break; > - } > - > - if (i >= nr_cpu_ids) > - node_clear(node, *cptab->ctb_nodemask); > -} > -EXPORT_SYMBOL(cfs_cpt_unset_cpu); > - > -int > -cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) > -{ > - int i; > - > - if (!cpumask_weight(mask) || > - cpumask_any_and(mask, cpu_online_mask) >= nr_cpu_ids) { > - CDEBUG(D_INFO, "No online CPU is found in the CPU mask for CPU partition %d\n", > - cpt); > - return 0; > - } > - > - for_each_cpu(i, mask) { > - if (!cfs_cpt_set_cpu(cptab, cpt, i)) > - return 0; > - } > - > - return 1; > -} > -EXPORT_SYMBOL(cfs_cpt_set_cpumask); > - > -void > -cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) > -{ > - int i; > - > - for_each_cpu(i, mask) > - cfs_cpt_unset_cpu(cptab, cpt, i); > -} > -EXPORT_SYMBOL(cfs_cpt_unset_cpumask); > - > -int > -cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) > -{ > - int rc; > - > - if (node < 0 || node >= MAX_NUMNODES) { > - CDEBUG(D_INFO, > - "Invalid NUMA id %d for CPU partition %d\n", node, cpt); > - return 0; > - } > - > - mutex_lock(&cpt_data.cpt_mutex); > - > - cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); > - > - rc = cfs_cpt_set_cpumask(cptab, cpt, cpt_data.cpt_cpumask); > - > - mutex_unlock(&cpt_data.cpt_mutex); > - > - return rc; > -} > -EXPORT_SYMBOL(cfs_cpt_set_node); > - > -void > -cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) > -{ > - if (node < 0 || node >= MAX_NUMNODES) { > - CDEBUG(D_INFO, > - "Invalid NUMA id %d for CPU partition %d\n", node, cpt); > - return; > - } > - > - mutex_lock(&cpt_data.cpt_mutex); > - > - cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); > - > - cfs_cpt_unset_cpumask(cptab, cpt, cpt_data.cpt_cpumask); > - > - mutex_unlock(&cpt_data.cpt_mutex); > -} > -EXPORT_SYMBOL(cfs_cpt_unset_node); > - > -int > -cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) > -{ > - int i; > - > - for_each_node_mask(i, *mask) { > - if (!cfs_cpt_set_node(cptab, cpt, i)) > - return 0; > - } > - > - return 1; > -} > -EXPORT_SYMBOL(cfs_cpt_set_nodemask); > - > -void > -cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) > -{ > - int i; > - > - for_each_node_mask(i, *mask) > - cfs_cpt_unset_node(cptab, cpt, i); > -} > -EXPORT_SYMBOL(cfs_cpt_unset_nodemask); > - > -void > -cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) > -{ > - int last; > - int i; > - > - if (cpt == CFS_CPT_ANY) { > - last = cptab->ctb_nparts - 1; > - cpt = 0; > - } else { > - last = cpt; > - } > - > - for (; cpt <= last; cpt++) { > - for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) > - cfs_cpt_unset_cpu(cptab, cpt, i); > - } > -} > -EXPORT_SYMBOL(cfs_cpt_clear); > - > -int > -cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) > -{ > - nodemask_t *mask; > - int weight; > - int rotor; > - int node; > - > - /* convert CPU partition ID to HW node id */ > - > - if (cpt < 0 || cpt >= cptab->ctb_nparts) { > - mask = cptab->ctb_nodemask; > - rotor = cptab->ctb_spread_rotor++; > - } else { > - mask = cptab->ctb_parts[cpt].cpt_nodemask; > - rotor = cptab->ctb_parts[cpt].cpt_spread_rotor++; > - } > - > - weight = nodes_weight(*mask); > - LASSERT(weight > 0); > - > - rotor %= weight; > - > - for_each_node_mask(node, *mask) { > - if (!rotor--) > - return node; > - } > - > - LBUG(); > - return 0; > -} > -EXPORT_SYMBOL(cfs_cpt_spread_node); > - > -int > -cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) > -{ > - int cpu; > - int cpt; > - > - preempt_disable(); > - cpu = smp_processor_id(); > - cpt = cptab->ctb_cpu2cpt[cpu]; > - > - if (cpt < 0 && remap) { > - /* don't return negative value for safety of upper layer, > - * instead we shadow the unknown cpu to a valid partition ID > - */ > - cpt = cpu % cptab->ctb_nparts; > - } > - preempt_enable(); > - return cpt; > -} > -EXPORT_SYMBOL(cfs_cpt_current); > - > -int > -cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) > -{ > - LASSERT(cpu >= 0 && cpu < nr_cpu_ids); > - > - return cptab->ctb_cpu2cpt[cpu]; > -} > -EXPORT_SYMBOL(cfs_cpt_of_cpu); > - > -int > -cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) > -{ > - cpumask_var_t *cpumask; > - nodemask_t *nodemask; > - int rc; > - int i; > - > - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); > - > - if (cpt == CFS_CPT_ANY) { > - cpumask = &cptab->ctb_cpumask; > - nodemask = cptab->ctb_nodemask; > - } else { > - cpumask = &cptab->ctb_parts[cpt].cpt_cpumask; > - nodemask = cptab->ctb_parts[cpt].cpt_nodemask; > - } > - > - if (cpumask_any_and(*cpumask, cpu_online_mask) >= nr_cpu_ids) { > - CERROR("No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", > - cpt); > - return -EINVAL; > - } > - > - for_each_online_cpu(i) { > - if (cpumask_test_cpu(i, *cpumask)) > - continue; > - > - rc = set_cpus_allowed_ptr(current, *cpumask); > - set_mems_allowed(*nodemask); > - if (!rc) > - schedule(); /* switch to allowed CPU */ > - > - return rc; > - } > - > - /* don't need to set affinity because all online CPUs are covered */ > - return 0; > -} > -EXPORT_SYMBOL(cfs_cpt_bind); > - > -/** > - * Choose max to \a number CPUs from \a node and set them in \a cpt. > - * We always prefer to choose CPU in the same core/socket. > - */ > -static int > -cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, > - cpumask_t *node, int number) > -{ > - cpumask_var_t socket; > - cpumask_var_t core; > - int rc = 0; > - int cpu; > - > - LASSERT(number > 0); > - > - if (number >= cpumask_weight(node)) { > - while (!cpumask_empty(node)) { > - cpu = cpumask_first(node); > - > - rc = cfs_cpt_set_cpu(cptab, cpt, cpu); > - if (!rc) > - return -EINVAL; > - cpumask_clear_cpu(cpu, node); > - } > - return 0; > - } > - > - /* > - * Allocate scratch buffers > - * As we cannot initialize a cpumask_var_t, we need > - * to alloc both before we can risk trying to free either > - */ > - if (!zalloc_cpumask_var(&socket, GFP_NOFS)) > - rc = -ENOMEM; > - if (!zalloc_cpumask_var(&core, GFP_NOFS)) > - rc = -ENOMEM; > - if (rc) > - goto out; > - > - while (!cpumask_empty(node)) { > - cpu = cpumask_first(node); > - > - /* get cpumask for cores in the same socket */ > - cpumask_copy(socket, topology_core_cpumask(cpu)); > - cpumask_and(socket, socket, node); > - > - LASSERT(!cpumask_empty(socket)); > - > - while (!cpumask_empty(socket)) { > - int i; > - > - /* get cpumask for hts in the same core */ > - cpumask_copy(core, topology_sibling_cpumask(cpu)); > - cpumask_and(core, core, node); > - > - LASSERT(!cpumask_empty(core)); > - > - for_each_cpu(i, core) { > - cpumask_clear_cpu(i, socket); > - cpumask_clear_cpu(i, node); > - > - rc = cfs_cpt_set_cpu(cptab, cpt, i); > - if (!rc) { > - rc = -EINVAL; > - goto out; > - } > - > - if (!--number) > - goto out; > - } > - cpu = cpumask_first(socket); > - } > - } > - > -out: > - free_cpumask_var(socket); > - free_cpumask_var(core); > - return rc; > -} > - > -#define CPT_WEIGHT_MIN 4u > - > -static unsigned int > -cfs_cpt_num_estimate(void) > -{ > - unsigned int nnode = num_online_nodes(); > - unsigned int ncpu = num_online_cpus(); > - unsigned int ncpt; > - > - if (ncpu <= CPT_WEIGHT_MIN) { > - ncpt = 1; > - goto out; > - } > - > - /* generate reasonable number of CPU partitions based on total number > - * of CPUs, Preferred N should be power2 and match this condition: > - * 2 * (N - 1)^2 < NCPUS <= 2 * N^2 > - */ > - for (ncpt = 2; ncpu > 2 * ncpt * ncpt; ncpt <<= 1) > - ; > - > - if (ncpt <= nnode) { /* fat numa system */ > - while (nnode > ncpt) > - nnode >>= 1; > - > - } else { /* ncpt > nnode */ > - while ((nnode << 1) <= ncpt) > - nnode <<= 1; > - } > - > - ncpt = nnode; > - > -out: > -#if (BITS_PER_LONG == 32) > - /* config many CPU partitions on 32-bit system could consume > - * too much memory > - */ > - ncpt = min(2U, ncpt); > -#endif > - while (ncpu % ncpt) > - ncpt--; /* worst case is 1 */ > - > - return ncpt; > -} > - > -static struct cfs_cpt_table * > -cfs_cpt_table_create(int ncpt) > -{ > - struct cfs_cpt_table *cptab = NULL; > - cpumask_var_t mask; > - int cpt = 0; > - int num; > - int rc; > - int i; > - > - rc = cfs_cpt_num_estimate(); > - if (ncpt <= 0) > - ncpt = rc; > - > - if (ncpt > num_online_cpus() || ncpt > 4 * rc) { > - CWARN("CPU partition number %d is larger than suggested value (%d), your system may have performance issue or run out of memory while under pressure\n", > - ncpt, rc); > - } > - > - if (num_online_cpus() % ncpt) { > - CERROR("CPU number %d is not multiple of cpu_npartition %d, please try different cpu_npartitions value or set pattern string by cpu_pattern=STRING\n", > - (int)num_online_cpus(), ncpt); > - goto failed; > - } > - > - cptab = cfs_cpt_table_alloc(ncpt); > - if (!cptab) { > - CERROR("Failed to allocate CPU map(%d)\n", ncpt); > - goto failed; > - } > - > - num = num_online_cpus() / ncpt; > - if (!num) { > - CERROR("CPU changed while setting CPU partition\n"); > - goto failed; > - } > - > - if (!zalloc_cpumask_var(&mask, GFP_NOFS)) { > - CERROR("Failed to allocate scratch cpumask\n"); > - goto failed; > - } > - > - for_each_online_node(i) { > - cfs_node_to_cpumask(i, mask); > - > - while (!cpumask_empty(mask)) { > - struct cfs_cpu_partition *part; > - int n; > - > - /* > - * Each emulated NUMA node has all allowed CPUs in > - * the mask. > - * End loop when all partitions have assigned CPUs. > - */ > - if (cpt == ncpt) > - break; > - > - part = &cptab->ctb_parts[cpt]; > - > - n = num - cpumask_weight(part->cpt_cpumask); > - LASSERT(n > 0); > - > - rc = cfs_cpt_choose_ncpus(cptab, cpt, mask, n); > - if (rc < 0) > - goto failed_mask; > - > - LASSERT(num >= cpumask_weight(part->cpt_cpumask)); > - if (num == cpumask_weight(part->cpt_cpumask)) > - cpt++; > - } > - } > - > - if (cpt != ncpt || > - num != cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)) { > - CERROR("Expect %d(%d) CPU partitions but got %d(%d), CPU hotplug/unplug while setting?\n", > - cptab->ctb_nparts, num, cpt, > - cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)); > - goto failed_mask; > - } > - > - free_cpumask_var(mask); > - > - return cptab; > - > - failed_mask: > - free_cpumask_var(mask); > - failed: > - CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", > - ncpt, num_online_nodes(), num_online_cpus()); > - > - if (cptab) > - cfs_cpt_table_free(cptab); > - > - return NULL; > -} > - > -static struct cfs_cpt_table * > -cfs_cpt_table_create_pattern(char *pattern) > -{ > - struct cfs_cpt_table *cptab; > - char *str; > - int node = 0; > - int high; > - int ncpt = 0; > - int cpt; > - int rc; > - int c; > - int i; > - > - str = strim(pattern); > - if (*str == 'n' || *str == 'N') { > - pattern = str + 1; > - if (*pattern != '\0') { > - node = 1; > - } else { /* shortcut to create CPT from NUMA & CPU topology */ > - node = -1; > - ncpt = num_online_nodes(); > - } > - } > - > - if (!ncpt) { /* scanning bracket which is mark of partition */ > - for (str = pattern;; str++, ncpt++) { > - str = strchr(str, '['); > - if (!str) > - break; > - } > - } > - > - if (!ncpt || > - (node && ncpt > num_online_nodes()) || > - (!node && ncpt > num_online_cpus())) { > - CERROR("Invalid pattern %s, or too many partitions %d\n", > - pattern, ncpt); > - return NULL; > - } > - > - cptab = cfs_cpt_table_alloc(ncpt); > - if (!cptab) { > - CERROR("Failed to allocate cpu partition table\n"); > - return NULL; > - } > - > - if (node < 0) { /* shortcut to create CPT from NUMA & CPU topology */ > - cpt = 0; > - > - for_each_online_node(i) { > - if (cpt >= ncpt) { > - CERROR("CPU changed while setting CPU partition table, %d/%d\n", > - cpt, ncpt); > - goto failed; > - } > - > - rc = cfs_cpt_set_node(cptab, cpt++, i); > - if (!rc) > - goto failed; > - } > - return cptab; > - } > - > - high = node ? MAX_NUMNODES - 1 : nr_cpu_ids - 1; > - > - for (str = strim(pattern), c = 0;; c++) { > - struct cfs_range_expr *range; > - struct cfs_expr_list *el; > - char *bracket = strchr(str, '['); > - int n; > - > - if (!bracket) { > - if (*str) { > - CERROR("Invalid pattern %s\n", str); > - goto failed; > - } > - if (c != ncpt) { > - CERROR("expect %d partitions but found %d\n", > - ncpt, c); > - goto failed; > - } > - break; > - } > - > - if (sscanf(str, "%d%n", &cpt, &n) < 1) { > - CERROR("Invalid cpu pattern %s\n", str); > - goto failed; > - } > - > - if (cpt < 0 || cpt >= ncpt) { > - CERROR("Invalid partition id %d, total partitions %d\n", > - cpt, ncpt); > - goto failed; > - } > - > - if (cfs_cpt_weight(cptab, cpt)) { > - CERROR("Partition %d has already been set.\n", cpt); > - goto failed; > - } > - > - str = strim(str + n); > - if (str != bracket) { > - CERROR("Invalid pattern %s\n", str); > - goto failed; > - } > - > - bracket = strchr(str, ']'); > - if (!bracket) { > - CERROR("missing right bracket for cpt %d, %s\n", > - cpt, str); > - goto failed; > - } > - > - if (cfs_expr_list_parse(str, (bracket - str) + 1, > - 0, high, &el)) { > - CERROR("Can't parse number range: %s\n", str); > - goto failed; > - } > - > - list_for_each_entry(range, &el->el_exprs, re_link) { > - for (i = range->re_lo; i <= range->re_hi; i++) { > - if ((i - range->re_lo) % range->re_stride) > - continue; > - > - rc = node ? cfs_cpt_set_node(cptab, cpt, i) : > - cfs_cpt_set_cpu(cptab, cpt, i); > - if (!rc) { > - cfs_expr_list_free(el); > - goto failed; > - } > - } > - } > - > - cfs_expr_list_free(el); > - > - if (!cfs_cpt_online(cptab, cpt)) { > - CERROR("No online CPU is found on partition %d\n", cpt); > - goto failed; > - } > - > - str = strim(bracket + 1); > - } > - > - return cptab; > - > - failed: > - cfs_cpt_table_free(cptab); > - return NULL; > -} > - > -#ifdef CONFIG_HOTPLUG_CPU > -static enum cpuhp_state lustre_cpu_online; > - > -static void cfs_cpu_incr_cpt_version(void) > -{ > - spin_lock(&cpt_data.cpt_lock); > - cpt_data.cpt_version++; > - spin_unlock(&cpt_data.cpt_lock); > -} > - > -static int cfs_cpu_online(unsigned int cpu) > -{ > - cfs_cpu_incr_cpt_version(); > - return 0; > -} > - > -static int cfs_cpu_dead(unsigned int cpu) > -{ > - bool warn; > - > - cfs_cpu_incr_cpt_version(); > - > - mutex_lock(&cpt_data.cpt_mutex); > - /* if all HTs in a core are offline, it may break affinity */ > - cpumask_copy(cpt_data.cpt_cpumask, topology_sibling_cpumask(cpu)); > - warn = cpumask_any_and(cpt_data.cpt_cpumask, > - cpu_online_mask) >= nr_cpu_ids; > - mutex_unlock(&cpt_data.cpt_mutex); > - CDEBUG(warn ? D_WARNING : D_INFO, > - "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u]\n", > - cpu); > - return 0; > -} > -#endif > - > -void > -cfs_cpu_fini(void) > -{ > - if (cfs_cpt_table) > - cfs_cpt_table_free(cfs_cpt_table); > - > -#ifdef CONFIG_HOTPLUG_CPU > - if (lustre_cpu_online > 0) > - cpuhp_remove_state_nocalls(lustre_cpu_online); > - cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); > -#endif > - free_cpumask_var(cpt_data.cpt_cpumask); > -} > - > -int > -cfs_cpu_init(void) > -{ > - int ret = 0; > - > - LASSERT(!cfs_cpt_table); > - > - memset(&cpt_data, 0, sizeof(cpt_data)); > - > - if (!zalloc_cpumask_var(&cpt_data.cpt_cpumask, GFP_NOFS)) { > - CERROR("Failed to allocate scratch buffer\n"); > - return -1; > - } > - > - spin_lock_init(&cpt_data.cpt_lock); > - mutex_init(&cpt_data.cpt_mutex); > - > -#ifdef CONFIG_HOTPLUG_CPU > - ret = cpuhp_setup_state_nocalls(CPUHP_LUSTRE_CFS_DEAD, > - "staging/lustre/cfe:dead", NULL, > - cfs_cpu_dead); > - if (ret < 0) > - goto failed; > - ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, > - "staging/lustre/cfe:online", > - cfs_cpu_online, NULL); > - if (ret < 0) > - goto failed; > - lustre_cpu_online = ret; > -#endif > - ret = -EINVAL; > - > - if (*cpu_pattern) { > - char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); > - > - if (!cpu_pattern_dup) { > - CERROR("Failed to duplicate cpu_pattern\n"); > - goto failed; > - } > - > - cfs_cpt_table = cfs_cpt_table_create_pattern(cpu_pattern_dup); > - kfree(cpu_pattern_dup); > - if (!cfs_cpt_table) { > - CERROR("Failed to create cptab from pattern %s\n", > - cpu_pattern); > - goto failed; > - } > - > - } else { > - cfs_cpt_table = cfs_cpt_table_create(cpu_npartitions); > - if (!cfs_cpt_table) { > - CERROR("Failed to create ptable with npartitions %d\n", > - cpu_npartitions); > - goto failed; > - } > - } > - > - spin_lock(&cpt_data.cpt_lock); > - if (cfs_cpt_table->ctb_version != cpt_data.cpt_version) { > - spin_unlock(&cpt_data.cpt_lock); > - CERROR("CPU hotplug/unplug during setup\n"); > - goto failed; > - } > - spin_unlock(&cpt_data.cpt_lock); > - > - LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", > - num_online_nodes(), num_online_cpus(), > - cfs_cpt_number(cfs_cpt_table)); > - return 0; > - > - failed: > - cfs_cpu_fini(); > - return ret; > -} > - > -#endif > > > From jsimmons at infradead.org Mon Apr 16 04:09:42 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:42 -0400 Subject: [lustre-devel] [PATCH 00/25] staging: lustre: libcfs: SMP rework Message-ID: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Recently lustre support has been expanded to extreme machines with as many as a 1000+ cores. On the other end lustre also has been ported to platforms like ARM and KNL which have uniquie NUMA and core setup. For example some devices exist that have NUMA nodes with no cores. With these new platforms the limitations of the Lustre's SMP code came to light so a lot of work was needed. This resulted in this patch set which has been tested on these platforms. Amir Shehata (9): staging: lustre: libcfs: implement cfs_cpt_cpumask for UMP case staging: lustre: libcfs: replace MAX_NUMNODES with nr_node_ids staging: lustre: libcfs: remove excess space staging: lustre: libcfs: replace num_possible_cpus() with nr_cpu_ids staging: lustre: libcfs: NUMA support staging: lustre: libcfs: add cpu distance handling staging: lustre: libcfs: use distance in cpu and node handling staging: lustre: libcfs: provide debugfs files for distance handling staging: lustre: libcfs: invert error handling for cfs_cpt_table_print Dmitry Eremin (15): staging: lustre: libcfs: remove useless CPU partition code staging: lustre: libcfs: rename variable i to cpu staging: lustre: libcfs: fix libcfs_cpu coding style staging: lustre: libcfs: use int type for CPT identification. staging: lustre: libcfs: rename i to node for cfs_cpt_set_nodemask staging: lustre: libcfs: rename i to cpu for cfs_cpt_bind staging: lustre: libcfs: rename cpumask_var_t variables to *_mask staging: lustre: libcfs: rename goto label in cfs_cpt_table_print staging: lustre: libcfs: clear up failure patch in cfs_cpt_*_print staging: lustre: libcfs: update debug messages staging: lustre: libcfs: make tolerant to offline CPUs and empty NUMA nodes staging: lustre: libcfs: report NUMA node instead of just node staging: lustre: libcfs: update debug messages in CPT creation code staging: lustre: libcfs: rework CPU pattern parsing code staging: lustre: libcfs: change CPT estimate algorithm James Simmons (1): staging: lustre: libcfs: merge UMP and SMP libcfs cpu header code .../lustre/include/linux/libcfs/libcfs_cpu.h | 135 +-- .../lustre/include/linux/libcfs/linux/libcfs.h | 1 - .../lustre/include/linux/libcfs/linux/linux-cpu.h | 78 -- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 126 ++- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 912 +++++++++++---------- drivers/staging/lustre/lnet/libcfs/module.c | 53 ++ drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 + 7 files changed, 676 insertions(+), 631 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:44 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:44 -0400 Subject: [lustre-devel] [PATCH 02/25] staging: lustre: libcfs: rename variable i to cpu In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-3-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Change the name of the variable i used for for_each_cpu() to cpu for code readability. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23303 Reviewed-by: James Simmons Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 134b239..d8c190c 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -334,7 +334,7 @@ struct cfs_cpt_table * int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, const cpumask_t *mask) { - int i; + int cpu; if (!cpumask_weight(mask) || cpumask_any_and(mask, cpu_online_mask) >= nr_cpu_ids) { @@ -343,8 +343,8 @@ struct cfs_cpt_table * return 0; } - for_each_cpu(i, mask) { - if (!cfs_cpt_set_cpu(cptab, cpt, i)) + for_each_cpu(cpu, mask) { + if (!cfs_cpt_set_cpu(cptab, cpt, cpu)) return 0; } @@ -356,10 +356,10 @@ struct cfs_cpt_table * cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, const cpumask_t *mask) { - int i; + int cpu; - for_each_cpu(i, mask) - cfs_cpt_unset_cpu(cptab, cpt, i); + for_each_cpu(cpu, mask) + cfs_cpt_unset_cpu(cptab, cpt, cpu); } EXPORT_SYMBOL(cfs_cpt_unset_cpumask); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:46 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:46 -0400 Subject: [lustre-devel] [PATCH 04/25] staging: lustre: libcfs: replace MAX_NUMNODES with nr_node_ids In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-5-git-send-email-jsimmons@infradead.org> From: Amir Shehata Replace depricated MAX_NUMNODES with nr_node_ids. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index d8c190c..d207ae5 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -368,7 +368,7 @@ struct cfs_cpt_table * { const cpumask_t *mask; - if (node < 0 || node >= MAX_NUMNODES) { + if (node < 0 || node >= nr_node_ids) { CDEBUG(D_INFO, "Invalid NUMA id %d for CPU partition %d\n", node, cpt); return 0; @@ -385,7 +385,7 @@ struct cfs_cpt_table * { const cpumask_t *mask; - if (node < 0 || node >= MAX_NUMNODES) { + if (node < 0 || node >= nr_node_ids) { CDEBUG(D_INFO, "Invalid NUMA id %d for CPU partition %d\n", node, cpt); return; @@ -809,7 +809,7 @@ struct cfs_cpt_table * return cptab; } - high = node ? MAX_NUMNODES - 1 : nr_cpu_ids - 1; + high = node ? nr_node_ids - 1 : nr_cpu_ids - 1; for (str = strim(pattern), c = 0;; c++) { struct cfs_range_expr *range; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:45 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:45 -0400 Subject: [lustre-devel] [PATCH 03/25] staging: lustre: libcfs: implement cfs_cpt_cpumask for UMP case In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-4-git-send-email-jsimmons@infradead.org> From: Amir Shehata The function cfs_cpt_cpumask() exist for SMP systems but when CONFIG_SMP is disabled it only returns NULL. Fill in this missing function. Also properly initialize ctb_mask for the UMP case. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h | 16 +++++----------- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 9 +++++++++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 1f2cd78..070f8fe 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -77,10 +77,6 @@ #ifdef CONFIG_SMP /** - * return cpumask of CPU partition \a cpt - */ -cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt); -/** * print string information of cpt-table */ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); @@ -89,19 +85,13 @@ struct cfs_cpt_table { /* # of CPU partitions */ int ctb_nparts; /* cpu mask */ - cpumask_t ctb_mask; + cpumask_var_t ctb_mask; /* node mask */ nodemask_t ctb_nodemask; /* version */ u64 ctb_version; }; -static inline cpumask_var_t * -cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) -{ - return NULL; -} - static inline int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { @@ -133,6 +123,10 @@ struct cfs_cpt_table { */ int cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt); /** + * return cpumask of CPU partition \a cpt + */ +cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt); +/** * return nodemask of CPU partition \a cpt */ nodemask_t *cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt); diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 705abf2..5ea294f 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -54,6 +54,9 @@ struct cfs_cpt_table * cptab = kzalloc(sizeof(*cptab), GFP_NOFS); if (cptab) { cptab->ctb_version = CFS_CPU_VERSION_MAGIC; + if (!zalloc_cpumask_var(&cptab->ctb_mask, GFP_NOFS)) + return NULL; + cpumask_set_cpu(0, cptab->ctb_mask); node_set(0, cptab->ctb_nodemask); cptab->ctb_nparts = ncpt; } @@ -108,6 +111,12 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_online); +cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) +{ + return &cptab->ctb_mask; +} +EXPORT_SYMBOL(cfs_cpt_cpumask); + nodemask_t * cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) { -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:47 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:47 -0400 Subject: [lustre-devel] [PATCH 05/25] staging: lustre: libcfs: remove excess space In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-6-git-send-email-jsimmons@infradead.org> From: Amir Shehata The function cfs_cpt_table_print() was adding two spaces to the string buffer. Just add it once. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index d207ae5..b2a88ef 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -147,7 +147,7 @@ struct cfs_cpt_table * for (i = 0; i < cptab->ctb_nparts; i++) { if (len > 0) { - rc = snprintf(tmp, len, "%d\t: ", i); + rc = snprintf(tmp, len, "%d\t:", i); len -= rc; } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:49 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:49 -0400 Subject: [lustre-devel] [PATCH 07/25] staging: lustre: libcfs: NUMA support In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-8-git-send-email-jsimmons@infradead.org> From: Amir Shehata This patch adds NUMA node support. NUMA node information is stored in the CPT table. A NUMA node mask is maintained for the entire table as well as for each CPT to track the NUMA nodes related to each of the CPTs. Add new function cfs_cpt_of_node() which returns the CPT of a particular NUMA node. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- .../staging/lustre/include/linux/libcfs/libcfs_cpu.h | 4 ++++ .../lustre/include/linux/libcfs/linux/linux-cpu.h | 2 ++ drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 6 ++++++ drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 070f8fe..839ec02 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -139,6 +139,10 @@ struct cfs_cpt_table { */ int cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu); /** + * shadow HW node ID \a NODE to CPU-partition ID by \a cptab + */ +int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node); +/** * bind current thread on a CPU-partition \a cpt of \a cptab */ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt); diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index e8bbbaa..1bed0ba 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -68,6 +68,8 @@ struct cfs_cpt_table { int *ctb_cpu2cpt; /* all cpus in this partition table */ cpumask_var_t ctb_cpumask; + /* shadow HW node to CPU partition ID */ + int *ctb_node2cpt; /* all nodes in this partition table */ nodemask_t *ctb_nodemask; }; diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 5ea294f..e6d1512 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -198,6 +198,12 @@ cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) } EXPORT_SYMBOL(cfs_cpt_of_cpu); +int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) +{ + return 0; +} +EXPORT_SYMBOL(cfs_cpt_of_node); + int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) { diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 741db69..fd0c451 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -70,6 +70,7 @@ int i; kvfree(cptab->ctb_cpu2cpt); + kvfree(cptab->ctb_node2cpt); for (i = 0; cptab->ctb_parts && i < cptab->ctb_nparts; i++) { struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; @@ -114,6 +115,15 @@ struct cfs_cpt_table * memset(cptab->ctb_cpu2cpt, -1, nr_cpu_ids * sizeof(cptab->ctb_cpu2cpt[0])); + cptab->ctb_node2cpt = kvmalloc_array(nr_node_ids, + sizeof(cptab->ctb_node2cpt[0]), + GFP_KERNEL); + if (!cptab->ctb_node2cpt) + goto failed; + + memset(cptab->ctb_node2cpt, -1, + nr_node_ids * sizeof(cptab->ctb_node2cpt[0])); + cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), GFP_KERNEL); if (!cptab->ctb_parts) @@ -484,6 +494,15 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_of_cpu); +int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) +{ + if (node < 0 || node > nr_node_ids) + return CFS_CPT_ANY; + + return cptab->ctb_node2cpt[node]; +} +EXPORT_SYMBOL(cfs_cpt_of_node); + int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) { -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:54 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:54 -0400 Subject: [lustre-devel] [PATCH 12/25] staging: lustre: libcfs: fix libcfs_cpu coding style In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-13-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin This patch bring the lustre CPT code into alignment with the Linux kernel coding style. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23304 Reviewed-by: James Simmons Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../lustre/include/linux/libcfs/libcfs_cpu.h | 35 ++++--- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 70 +++++--------- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 107 +++++++++------------ 3 files changed, 86 insertions(+), 126 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index c0922fc..bda81ab 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -43,16 +43,16 @@ * * Example: if there are 8 cores on the system, while creating a CPT * with cpu_npartitions=4: - * core[0, 1] = partition[0], core[2, 3] = partition[1] - * core[4, 5] = partition[2], core[6, 7] = partition[3] + * core[0, 1] = partition[0], core[2, 3] = partition[1] + * core[4, 5] = partition[2], core[6, 7] = partition[3] * - * cpu_npartitions=1: - * core[0, 1, ... 7] = partition[0] + * cpu_npartitions=1: + * core[0, 1, ... 7] = partition[0] * * . User can also specify CPU partitions by string pattern * * Examples: cpu_partitions="0[0,1], 1[2,3]" - * cpu_partitions="N 0[0-3], 1[4-8]" + * cpu_partitions="N 0[0-3], 1[4-8]" * * The first character "N" means following numbers are numa ID * @@ -92,8 +92,8 @@ struct cfs_cpt_table { u64 ctb_version; }; -static inline int -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) +static inline int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, + int len) { return 0; } @@ -116,8 +116,7 @@ struct cfs_cpt_table { /** * return total number of CPU partitions in \a cptab */ -int -cfs_cpt_number(struct cfs_cpt_table *cptab); +int cfs_cpt_number(struct cfs_cpt_table *cptab); /** * return number of HW cores or hyper-threadings in a CPU partition \a cpt */ @@ -167,13 +166,13 @@ struct cfs_cpt_table { * add all cpus in \a mask to CPU partition \a cpt * return 1 if successfully set all CPUs, otherwise return 0 */ -int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, - int cpt, const cpumask_t *mask); +int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask); /** * remove all cpus in \a mask from CPU partition \a cpt */ -void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, - int cpt, const cpumask_t *mask); +void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask); /** * add all cpus in NUMA node \a node to CPU partition \a cpt * return 1 if successfully set all CPUs, otherwise return 0 @@ -188,13 +187,13 @@ void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, * add all cpus in node mask \a mask to CPU partition \a cpt * return 1 if successfully set all CPUs, otherwise return 0 */ -int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, - int cpt, nodemask_t *mask); +int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, + const nodemask_t *mask); /** * remove all cpus in node mask \a mask from CPU partition \a cpt */ -void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, - int cpt, nodemask_t *mask); +void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, + const nodemask_t *mask); /** * convert partition id \a cpt to numa node id, if there are more than one * nodes in this partition, it might return a different node id each time. @@ -240,7 +239,7 @@ enum { struct cfs_percpt_lock { /* cpu-partition-table for this lock */ - struct cfs_cpt_table *pcl_cptab; + struct cfs_cpt_table *pcl_cptab; /* exclusively locked */ unsigned int pcl_locked; /* private lock table */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 7ac2796..f9fcbb1 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -34,7 +34,7 @@ #include /** Global CPU partition table */ -struct cfs_cpt_table *cfs_cpt_table __read_mostly; +struct cfs_cpt_table *cfs_cpt_table __read_mostly; EXPORT_SYMBOL(cfs_cpt_table); #ifndef HAVE_LIBCFS_CPT @@ -43,8 +43,7 @@ #define CFS_CPT_DISTANCE 1 /* Arbitrary positive value */ -struct cfs_cpt_table * -cfs_cpt_table_alloc(unsigned int ncpt) +struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt) { struct cfs_cpt_table *cptab; @@ -67,8 +66,7 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_table_alloc); -void -cfs_cpt_table_free(struct cfs_cpt_table *cptab) +void cfs_cpt_table_free(struct cfs_cpt_table *cptab) { LASSERT(cptab->ctb_version == CFS_CPU_VERSION_MAGIC); @@ -77,8 +75,7 @@ struct cfs_cpt_table * EXPORT_SYMBOL(cfs_cpt_table_free); #ifdef CONFIG_SMP -int -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) +int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { int rc; @@ -105,22 +102,19 @@ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) } EXPORT_SYMBOL(cfs_cpt_distance_print); -int -cfs_cpt_number(struct cfs_cpt_table *cptab) +int cfs_cpt_number(struct cfs_cpt_table *cptab) { return 1; } EXPORT_SYMBOL(cfs_cpt_number); -int -cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) { return 1; } EXPORT_SYMBOL(cfs_cpt_weight); -int -cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) { return 1; } @@ -132,8 +126,7 @@ cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) } EXPORT_SYMBOL(cfs_cpt_cpumask); -nodemask_t * -cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) +nodemask_t *cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) { return &cptab->ctb_nodemask; } @@ -145,75 +138,67 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) } EXPORT_SYMBOL(cfs_cpt_distance); -int -cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { return 1; } EXPORT_SYMBOL(cfs_cpt_set_cpu); -void -cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +void cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { } EXPORT_SYMBOL(cfs_cpt_unset_cpu); -int -cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, const cpumask_t *mask) +int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask) { return 1; } EXPORT_SYMBOL(cfs_cpt_set_cpumask); -void -cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, - const cpumask_t *mask) +void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask) { } EXPORT_SYMBOL(cfs_cpt_unset_cpumask); -int -cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) +int cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) { return 1; } EXPORT_SYMBOL(cfs_cpt_set_node); -void -cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) +void cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) { } EXPORT_SYMBOL(cfs_cpt_unset_node); -int -cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) +int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, + const nodemask_t *mask) { return 1; } EXPORT_SYMBOL(cfs_cpt_set_nodemask); -void -cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) +void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, + const nodemask_t *mask) { } EXPORT_SYMBOL(cfs_cpt_unset_nodemask); -int -cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) { return 0; } EXPORT_SYMBOL(cfs_cpt_spread_node); -int -cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) +int cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) { return 0; } EXPORT_SYMBOL(cfs_cpt_current); -int -cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) +int cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) { return 0; } @@ -225,15 +210,13 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) } EXPORT_SYMBOL(cfs_cpt_of_node); -int -cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) { return 0; } EXPORT_SYMBOL(cfs_cpt_bind); -void -cfs_cpu_fini(void) +void cfs_cpu_fini(void) { if (cfs_cpt_table) { cfs_cpt_table_free(cfs_cpt_table); @@ -241,8 +224,7 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) } } -int -cfs_cpu_init(void) +int cfs_cpu_init(void) { cfs_cpt_table = cfs_cpt_table_alloc(1); diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 6d8dcd3..5c9cdf4 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -43,7 +43,7 @@ * 1 : disable multiple partitions * >1 : specify number of partitions */ -static int cpu_npartitions; +static int cpu_npartitions; module_param(cpu_npartitions, int, 0444); MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions"); @@ -60,12 +60,11 @@ * * NB: If user specified cpu_pattern, cpu_npartitions will be ignored */ -static char *cpu_pattern = "N"; +static char *cpu_pattern = "N"; module_param(cpu_pattern, charp, 0444); MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern"); -void -cfs_cpt_table_free(struct cfs_cpt_table *cptab) +void cfs_cpt_table_free(struct cfs_cpt_table *cptab) { int i; @@ -89,8 +88,7 @@ } EXPORT_SYMBOL(cfs_cpt_table_free); -struct cfs_cpt_table * -cfs_cpt_table_alloc(unsigned int ncpt) +struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt) { struct cfs_cpt_table *cptab; int i; @@ -148,14 +146,13 @@ struct cfs_cpt_table * return cptab; - failed: +failed: cfs_cpt_table_free(cptab); return NULL; } EXPORT_SYMBOL(cfs_cpt_table_alloc); -int -cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) +int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { char *tmp = buf; int rc = -EFBIG; @@ -187,7 +184,7 @@ struct cfs_cpt_table * } rc = 0; - out: +out: if (rc < 0) return rc; @@ -235,15 +232,13 @@ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) } EXPORT_SYMBOL(cfs_cpt_distance_print); -int -cfs_cpt_number(struct cfs_cpt_table *cptab) +int cfs_cpt_number(struct cfs_cpt_table *cptab) { return cptab->ctb_nparts; } EXPORT_SYMBOL(cfs_cpt_number); -int -cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt) { LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); @@ -253,8 +248,7 @@ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) } EXPORT_SYMBOL(cfs_cpt_weight); -int -cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) { LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); @@ -266,8 +260,7 @@ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) } EXPORT_SYMBOL(cfs_cpt_online); -cpumask_var_t * -cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) +cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) { LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); @@ -276,8 +269,7 @@ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) } EXPORT_SYMBOL(cfs_cpt_cpumask); -nodemask_t * -cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) +nodemask_t *cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) { LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); @@ -423,8 +415,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } } -int -cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); @@ -449,8 +440,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_set_cpu); -void -cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +void cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); @@ -463,7 +453,8 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) /* caller doesn't know the partition ID */ cpt = cptab->ctb_cpu2cpt[cpu]; if (cpt < 0) { /* not set in this CPT-table */ - CDEBUG(D_INFO, "Try to unset cpu %d which is not in CPT-table %p\n", + CDEBUG(D_INFO, + "Try to unset cpu %d which is not in CPT-table %p\n", cpt, cptab); return; } @@ -482,14 +473,15 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_unset_cpu); -int -cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, const cpumask_t *mask) +int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask) { int cpu; if (!cpumask_weight(mask) || cpumask_any_and(mask, cpu_online_mask) >= nr_cpu_ids) { - CDEBUG(D_INFO, "No online CPU is found in the CPU mask for CPU partition %d\n", + CDEBUG(D_INFO, + "No online CPU is found in the CPU mask for CPU partition %d\n", cpt); return 0; } @@ -503,9 +495,8 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_set_cpumask); -void -cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, - const cpumask_t *mask) +void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask) { int cpu; @@ -514,8 +505,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_unset_cpumask); -int -cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) +int cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) { const cpumask_t *mask; int cpu; @@ -537,8 +527,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_set_node); -void -cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) +void cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) { const cpumask_t *mask; int cpu; @@ -558,8 +547,8 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_unset_node); -int -cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) +int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, + const nodemask_t *mask) { int i; @@ -572,8 +561,8 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_set_nodemask); -void -cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask) +void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, + const nodemask_t *mask) { int i; @@ -582,8 +571,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_unset_nodemask); -int -cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) { nodemask_t *mask; int weight; @@ -615,8 +603,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_spread_node); -int -cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) +int cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) { int cpu; int cpt; @@ -636,8 +623,7 @@ static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) } EXPORT_SYMBOL(cfs_cpt_current); -int -cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) +int cfs_cpt_of_cpu(struct cfs_cpt_table *cptab, int cpu) { LASSERT(cpu >= 0 && cpu < nr_cpu_ids); @@ -654,8 +640,7 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) } EXPORT_SYMBOL(cfs_cpt_of_node); -int -cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) +int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) { cpumask_var_t *cpumask; nodemask_t *nodemask; @@ -699,9 +684,8 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) * Choose max to \a number CPUs from \a node and set them in \a cpt. * We always prefer to choose CPU in the same core/socket. */ -static int -cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, - cpumask_t *node, int number) +static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, + cpumask_t *node, int number) { cpumask_var_t socket; cpumask_var_t core; @@ -777,8 +761,7 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) #define CPT_WEIGHT_MIN 4u -static unsigned int -cfs_cpt_num_estimate(void) +static unsigned int cfs_cpt_num_estimate(void) { unsigned int nnode = num_online_nodes(); unsigned int ncpu = num_online_cpus(); @@ -820,8 +803,7 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) return ncpt; } -static struct cfs_cpt_table * -cfs_cpt_table_create(int ncpt) +static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) { struct cfs_cpt_table *cptab = NULL; cpumask_var_t mask; @@ -904,9 +886,9 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) return cptab; - failed_mask: +failed_mask: free_cpumask_var(mask); - failed: +failed: CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", ncpt, num_online_nodes(), num_online_cpus()); @@ -916,8 +898,7 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) return NULL; } -static struct cfs_cpt_table * -cfs_cpt_table_create_pattern(char *pattern) +static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) { struct cfs_cpt_table *cptab; char *str; @@ -1061,7 +1042,7 @@ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node) return cptab; - failed: +failed: cfs_cpt_table_free(cptab); return NULL; } @@ -1088,8 +1069,7 @@ static int cfs_cpu_dead(unsigned int cpu) } #endif -void -cfs_cpu_fini(void) +void cfs_cpu_fini(void) { if (cfs_cpt_table) cfs_cpt_table_free(cfs_cpt_table); @@ -1101,8 +1081,7 @@ static int cfs_cpu_dead(unsigned int cpu) #endif } -int -cfs_cpu_init(void) +int cfs_cpu_init(void) { int ret = 0; @@ -1156,7 +1135,7 @@ static int cfs_cpu_dead(unsigned int cpu) cfs_cpt_number(cfs_cpt_table)); return 0; - failed: +failed: put_online_cpus(); cfs_cpu_fini(); return ret; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:48 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:48 -0400 Subject: [lustre-devel] [PATCH 06/25] staging: lustre: libcfs: replace num_possible_cpus() with nr_cpu_ids In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-7-git-send-email-jsimmons@infradead.org> From: Amir Shehata Move from num_possible_cpus() to nr_cpu_ids. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index b2a88ef..741db69 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -105,14 +105,14 @@ struct cfs_cpt_table * !cptab->ctb_nodemask) goto failed; - cptab->ctb_cpu2cpt = kvmalloc_array(num_possible_cpus(), + cptab->ctb_cpu2cpt = kvmalloc_array(nr_cpu_ids, sizeof(cptab->ctb_cpu2cpt[0]), GFP_KERNEL); if (!cptab->ctb_cpu2cpt) goto failed; memset(cptab->ctb_cpu2cpt, -1, - num_possible_cpus() * sizeof(cptab->ctb_cpu2cpt[0])); + nr_cpu_ids * sizeof(cptab->ctb_cpu2cpt[0])); cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), GFP_KERNEL); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:43 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:43 -0400 Subject: [lustre-devel] [PATCH 01/25] staging: lustre: libcfs: remove useless CPU partition code In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-2-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin * remove scratch buffer and mutex which guard it. * remove global cpumask and spinlock which guard it. * remove cpt_version for checking CPUs state change during setup because of just disable CPUs state change during setup. * remove whole global struct cfs_cpt_data cpt_data. * remove few unused APIs. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23303 Reviewed-on: https://review.whamcloud.com/25048 Reviewed-by: James Simmons Reviewed-by: Doug Oucharek Reviewed-by: Andreas Dilger Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../lustre/include/linux/libcfs/libcfs_cpu.h | 13 +-- .../lustre/include/linux/libcfs/linux/linux-cpu.h | 2 - drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 18 +--- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 114 +++------------------ 4 files changed, 20 insertions(+), 127 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 61bce77..1f2cd78 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -162,12 +162,12 @@ struct cfs_cpt_table { * return 1 if successfully set all CPUs, otherwise return 0 */ int cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, - int cpt, cpumask_t *mask); + int cpt, const cpumask_t *mask); /** * remove all cpus in \a mask from CPU partition \a cpt */ void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, - int cpt, cpumask_t *mask); + int cpt, const cpumask_t *mask); /** * add all cpus in NUMA node \a node to CPU partition \a cpt * return 1 if successfully set all CPUs, otherwise return 0 @@ -190,20 +190,11 @@ int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, nodemask_t *mask); /** - * unset all cpus for CPU partition \a cpt - */ -void cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt); -/** * convert partition id \a cpt to numa node id, if there are more than one * nodes in this partition, it might return a different node id each time. */ int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt); -/** - * return number of HTs in the same core of \a cpu - */ -int cfs_cpu_ht_nsiblings(int cpu); - /* * allocate per-cpu-partition data, returned value is an array of pointers, * variable can be indexed by CPU ID. diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index 6035376..e8bbbaa 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -58,8 +58,6 @@ struct cfs_cpu_partition { /** descriptor for CPU partitions */ struct cfs_cpt_table { - /* version, reserved for hotplug */ - unsigned int ctb_version; /* spread rotor for NUMA allocator */ unsigned int ctb_spread_rotor; /* # of CPU partitions */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 76291a3..705abf2 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -129,14 +129,15 @@ struct cfs_cpt_table * EXPORT_SYMBOL(cfs_cpt_unset_cpu); int -cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) +cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, const cpumask_t *mask) { return 1; } EXPORT_SYMBOL(cfs_cpt_set_cpumask); void -cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) +cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask) { } EXPORT_SYMBOL(cfs_cpt_unset_cpumask); @@ -167,12 +168,6 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_unset_nodemask); -void -cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) -{ -} -EXPORT_SYMBOL(cfs_cpt_clear); - int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) { @@ -181,13 +176,6 @@ struct cfs_cpt_table * EXPORT_SYMBOL(cfs_cpt_spread_node); int -cfs_cpu_ht_nsiblings(int cpu) -{ - return 1; -} -EXPORT_SYMBOL(cfs_cpu_ht_nsiblings); - -int cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) { return 0; diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 388521e..134b239 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -64,30 +64,6 @@ module_param(cpu_pattern, charp, 0444); MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern"); -struct cfs_cpt_data { - /* serialize hotplug etc */ - spinlock_t cpt_lock; - /* reserved for hotplug */ - unsigned long cpt_version; - /* mutex to protect cpt_cpumask */ - struct mutex cpt_mutex; - /* scratch buffer for set/unset_node */ - cpumask_var_t cpt_cpumask; -}; - -static struct cfs_cpt_data cpt_data; - -static void -cfs_node_to_cpumask(int node, cpumask_t *mask) -{ - const cpumask_t *tmp = cpumask_of_node(node); - - if (tmp) - cpumask_copy(mask, tmp); - else - cpumask_clear(mask); -} - void cfs_cpt_table_free(struct cfs_cpt_table *cptab) { @@ -153,11 +129,6 @@ struct cfs_cpt_table * goto failed; } - spin_lock(&cpt_data.cpt_lock); - /* Reserved for hotplug */ - cptab->ctb_version = cpt_data.cpt_version; - spin_unlock(&cpt_data.cpt_lock); - return cptab; failed: @@ -361,7 +332,7 @@ struct cfs_cpt_table * EXPORT_SYMBOL(cfs_cpt_unset_cpu); int -cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) +cfs_cpt_set_cpumask(struct cfs_cpt_table *cptab, int cpt, const cpumask_t *mask) { int i; @@ -382,7 +353,8 @@ struct cfs_cpt_table * EXPORT_SYMBOL(cfs_cpt_set_cpumask); void -cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, cpumask_t *mask) +cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, + const cpumask_t *mask) { int i; @@ -394,7 +366,7 @@ struct cfs_cpt_table * int cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) { - int rc; + const cpumask_t *mask; if (node < 0 || node >= MAX_NUMNODES) { CDEBUG(D_INFO, @@ -402,34 +374,26 @@ struct cfs_cpt_table * return 0; } - mutex_lock(&cpt_data.cpt_mutex); - - cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); - - rc = cfs_cpt_set_cpumask(cptab, cpt, cpt_data.cpt_cpumask); - - mutex_unlock(&cpt_data.cpt_mutex); + mask = cpumask_of_node(node); - return rc; + return cfs_cpt_set_cpumask(cptab, cpt, mask); } EXPORT_SYMBOL(cfs_cpt_set_node); void cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) { + const cpumask_t *mask; + if (node < 0 || node >= MAX_NUMNODES) { CDEBUG(D_INFO, "Invalid NUMA id %d for CPU partition %d\n", node, cpt); return; } - mutex_lock(&cpt_data.cpt_mutex); - - cfs_node_to_cpumask(node, cpt_data.cpt_cpumask); + mask = cpumask_of_node(node); - cfs_cpt_unset_cpumask(cptab, cpt, cpt_data.cpt_cpumask); - - mutex_unlock(&cpt_data.cpt_mutex); + cfs_cpt_unset_cpumask(cptab, cpt, mask); } EXPORT_SYMBOL(cfs_cpt_unset_node); @@ -457,26 +421,6 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_unset_nodemask); -void -cfs_cpt_clear(struct cfs_cpt_table *cptab, int cpt) -{ - int last; - int i; - - if (cpt == CFS_CPT_ANY) { - last = cptab->ctb_nparts - 1; - cpt = 0; - } else { - last = cpt; - } - - for (; cpt <= last; cpt++) { - for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) - cfs_cpt_unset_cpu(cptab, cpt, i); - } -} -EXPORT_SYMBOL(cfs_cpt_clear); - int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) { @@ -749,7 +693,7 @@ struct cfs_cpt_table * } for_each_online_node(i) { - cfs_node_to_cpumask(i, mask); + cpumask_copy(mask, cpumask_of_node(i)); while (!cpumask_empty(mask)) { struct cfs_cpu_partition *part; @@ -955,16 +899,8 @@ struct cfs_cpt_table * #ifdef CONFIG_HOTPLUG_CPU static enum cpuhp_state lustre_cpu_online; -static void cfs_cpu_incr_cpt_version(void) -{ - spin_lock(&cpt_data.cpt_lock); - cpt_data.cpt_version++; - spin_unlock(&cpt_data.cpt_lock); -} - static int cfs_cpu_online(unsigned int cpu) { - cfs_cpu_incr_cpt_version(); return 0; } @@ -972,14 +908,9 @@ static int cfs_cpu_dead(unsigned int cpu) { bool warn; - cfs_cpu_incr_cpt_version(); - - mutex_lock(&cpt_data.cpt_mutex); /* if all HTs in a core are offline, it may break affinity */ - cpumask_copy(cpt_data.cpt_cpumask, topology_sibling_cpumask(cpu)); - warn = cpumask_any_and(cpt_data.cpt_cpumask, + warn = cpumask_any_and(topology_sibling_cpumask(cpu), cpu_online_mask) >= nr_cpu_ids; - mutex_unlock(&cpt_data.cpt_mutex); CDEBUG(warn ? D_WARNING : D_INFO, "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u]\n", cpu); @@ -998,7 +929,6 @@ static int cfs_cpu_dead(unsigned int cpu) cpuhp_remove_state_nocalls(lustre_cpu_online); cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); #endif - free_cpumask_var(cpt_data.cpt_cpumask); } int @@ -1008,16 +938,6 @@ static int cfs_cpu_dead(unsigned int cpu) LASSERT(!cfs_cpt_table); - memset(&cpt_data, 0, sizeof(cpt_data)); - - if (!zalloc_cpumask_var(&cpt_data.cpt_cpumask, GFP_NOFS)) { - CERROR("Failed to allocate scratch buffer\n"); - return -1; - } - - spin_lock_init(&cpt_data.cpt_lock); - mutex_init(&cpt_data.cpt_mutex); - #ifdef CONFIG_HOTPLUG_CPU ret = cpuhp_setup_state_nocalls(CPUHP_LUSTRE_CFS_DEAD, "staging/lustre/cfe:dead", NULL, @@ -1033,6 +953,7 @@ static int cfs_cpu_dead(unsigned int cpu) #endif ret = -EINVAL; + get_online_cpus(); if (*cpu_pattern) { char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); @@ -1058,13 +979,7 @@ static int cfs_cpu_dead(unsigned int cpu) } } - spin_lock(&cpt_data.cpt_lock); - if (cfs_cpt_table->ctb_version != cpt_data.cpt_version) { - spin_unlock(&cpt_data.cpt_lock); - CERROR("CPU hotplug/unplug during setup\n"); - goto failed; - } - spin_unlock(&cpt_data.cpt_lock); + put_online_cpus(); LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", num_online_nodes(), num_online_cpus(), @@ -1072,6 +987,7 @@ static int cfs_cpu_dead(unsigned int cpu) return 0; failed: + put_online_cpus(); cfs_cpu_fini(); return ret; } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:04 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:04 -0400 Subject: [lustre-devel] [PATCH 22/25] staging: lustre: libcfs: update debug messages in CPT code In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-23-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Update the debug messages for the CPT table creation code. Place the passed in string in quotes to make it clear what it is. Captialize cpu in the debug strings. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23306 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 28b2acb..a08816a 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -466,7 +466,7 @@ void cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) } else if (cpt != cptab->ctb_cpu2cpt[cpu]) { CDEBUG(D_INFO, - "CPU %d is not in cpu-partition %d\n", cpu, cpt); + "CPU %d is not in CPU partition %d\n", cpu, cpt); return; } @@ -910,14 +910,14 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) if (!ncpt || (node && ncpt > num_online_nodes()) || (!node && ncpt > num_online_cpus())) { - CERROR("Invalid pattern %s, or too many partitions %d\n", + CERROR("Invalid pattern '%s', or too many partitions %d\n", pattern, ncpt); return NULL; } cptab = cfs_cpt_table_alloc(ncpt); if (!cptab) { - CERROR("Failed to allocate cpu partition table\n"); + CERROR("Failed to allocate CPU partition table\n"); return NULL; } @@ -948,11 +948,11 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) if (!bracket) { if (*str) { - CERROR("Invalid pattern %s\n", str); + CERROR("Invalid pattern '%s'\n", str); goto failed; } if (c != ncpt) { - CERROR("expect %d partitions but found %d\n", + CERROR("Expect %d partitions but found %d\n", ncpt, c); goto failed; } @@ -960,7 +960,7 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) } if (sscanf(str, "%d%n", &cpt, &n) < 1) { - CERROR("Invalid cpu pattern %s\n", str); + CERROR("Invalid CPU pattern '%s'\n", str); goto failed; } @@ -977,20 +977,20 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) str = strim(str + n); if (str != bracket) { - CERROR("Invalid pattern %s\n", str); + CERROR("Invalid pattern '%s'\n", str); goto failed; } bracket = strchr(str, ']'); if (!bracket) { - CERROR("Missing right bracket for partition %d, %s\n", + CERROR("Missing right bracket for partition %d in '%s'\n", cpt, str); goto failed; } if (cfs_expr_list_parse(str, (bracket - str) + 1, 0, high, &el)) { - CERROR("Can't parse number range: %s\n", str); + CERROR("Can't parse number range in '%s'\n", str); goto failed; } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:03 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:03 -0400 Subject: [lustre-devel] [PATCH 21/25] staging: lustre: libcfs: report NUMA node instead of just node In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-22-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Reporting "HW nodes" is too generic. It really is reporting "HW NUMA nodes". Update the debug message. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23306 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 80db008..28b2acb 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -1108,7 +1108,7 @@ int cfs_cpu_init(void) put_online_cpus(); - LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", + LCONSOLE(0, "HW NUMA nodes: %d, HW CPU cores: %d, npartitions: %d\n", num_online_nodes(), num_online_cpus(), cfs_cpt_number(cfs_cpt_table)); return 0; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:07 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:07 -0400 Subject: [lustre-devel] [PATCH 25/25] staging: lustre: libcfs: merge UMP and SMP libcfs cpu header code In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-26-git-send-email-jsimmons@infradead.org> Currently we have two headers, linux-cpu.h that contains the SMP version and libcfs_cpu.h contains the UMP version. We can simplify the headers into a single header which handles both cases. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9859 Reviewed-on: https://review.whamcloud.com/30873 Reviewed-by: Andreas Dilger Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../lustre/include/linux/libcfs/libcfs_cpu.h | 67 +++++++++++------ .../lustre/include/linux/libcfs/linux/libcfs.h | 1 - .../lustre/include/linux/libcfs/linux/linux-cpu.h | 84 ---------------------- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 18 ++--- 4 files changed, 52 insertions(+), 118 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 19a3489..0611fcd 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -72,32 +72,55 @@ #ifndef __LIBCFS_CPU_H__ #define __LIBCFS_CPU_H__ -/* any CPU partition */ -#define CFS_CPT_ANY (-1) +#include +#include +#include +#include +#include #ifdef CONFIG_SMP -/** - * print string information of cpt-table - */ -int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); -#else /* !CONFIG_SMP */ + +/** virtual processing unit */ +struct cfs_cpu_partition { + /* CPUs mask for this partition */ + cpumask_var_t cpt_cpumask; + /* nodes mask for this partition */ + nodemask_t *cpt_nodemask; + /* NUMA distance between CPTs */ + unsigned int *cpt_distance; + /* spread rotor for NUMA allocator */ + int cpt_spread_rotor; + /* NUMA node if cpt_nodemask is empty */ + int cpt_node; +}; +#endif /* CONFIG_SMP */ + +/** descriptor for CPU partitions */ struct cfs_cpt_table { +#ifdef CONFIG_SMP + /* spread rotor for NUMA allocator */ + int ctb_spread_rotor; + /* maximum NUMA distance between all nodes in table */ + unsigned int ctb_distance; + /* partitions tables */ + struct cfs_cpu_partition *ctb_parts; + /* shadow HW CPU to CPU partition ID */ + int *ctb_cpu2cpt; + /* shadow HW node to CPU partition ID */ + int *ctb_node2cpt; /* # of CPU partitions */ - int ctb_nparts; - /* cpu mask */ - cpumask_var_t ctb_mask; - /* node mask */ - nodemask_t ctb_nodemask; - /* version */ - u64 ctb_version; + int ctb_nparts; + /* all nodes in this partition table */ + nodemask_t *ctb_nodemask; +#else + nodemask_t ctb_nodemask; +#endif /* CONFIG_SMP */ + /* all cpus in this partition table */ + cpumask_var_t ctb_cpumask; }; -static inline int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, - int len) -{ - return 0; -} -#endif /* CONFIG_SMP */ +/* any CPU partition */ +#define CFS_CPT_ANY (-1) extern struct cfs_cpt_table *cfs_cpt_table; @@ -110,6 +133,10 @@ static inline int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, */ struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt); /** + * print string information of cpt-table + */ +int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); +/** * print distance information of cpt-table */ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len); diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h index 07d3cb2..07610be 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h @@ -78,7 +78,6 @@ #include #include #include -#include "linux-cpu.h" #if !defined(__x86_64__) # ifdef __ia64__ diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h deleted file mode 100644 index ed4351b..0000000 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ /dev/null @@ -1,84 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * GPL HEADER END - */ -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * libcfs/include/libcfs/linux/linux-cpu.h - * - * Basic library routines. - * - * Author: liang at whamcloud.com - */ - -#ifndef __LIBCFS_LINUX_CPU_H__ -#define __LIBCFS_LINUX_CPU_H__ - -#ifndef __LIBCFS_LIBCFS_H__ -#error Do not #include this file directly. #include instead -#endif - -#include -#include -#include - -#ifdef CONFIG_SMP - -#define HAVE_LIBCFS_CPT - -/** virtual processing unit */ -struct cfs_cpu_partition { - /* CPUs mask for this partition */ - cpumask_var_t cpt_cpumask; - /* nodes mask for this partition */ - nodemask_t *cpt_nodemask; - /* NUMA distance between CPTs */ - unsigned int *cpt_distance; - /* spread rotor for NUMA allocator */ - int cpt_spread_rotor; - /* NUMA node if cpt_nodemask is empty */ - int cpt_node; -}; - -/** descriptor for CPU partitions */ -struct cfs_cpt_table { - /* spread rotor for NUMA allocator */ - int ctb_spread_rotor; - /* maximum NUMA distance between all nodes in table */ - unsigned int ctb_distance; - /* # of CPU partitions */ - int ctb_nparts; - /* partitions tables */ - struct cfs_cpu_partition *ctb_parts; - /* shadow HW CPU to CPU partition ID */ - int *ctb_cpu2cpt; - /* all cpus in this partition table */ - cpumask_var_t ctb_cpumask; - /* shadow HW node to CPU partition ID */ - int *ctb_node2cpt; - /* all nodes in this partition table */ - nodemask_t *ctb_nodemask; -}; - -#endif /* CONFIG_SMP */ -#endif /* __LIBCFS_LINUX_CPU_H__ */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index 5d7d44d..1df7a1b 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -37,9 +37,7 @@ struct cfs_cpt_table *cfs_cpt_table __read_mostly; EXPORT_SYMBOL(cfs_cpt_table); -#ifndef HAVE_LIBCFS_CPT - -#define CFS_CPU_VERSION_MAGIC 0xbabecafe +#ifndef CONFIG_SMP #define CFS_CPT_DISTANCE 1 /* Arbitrary positive value */ @@ -54,12 +52,10 @@ struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt) cptab = kzalloc(sizeof(*cptab), GFP_NOFS); if (cptab) { - cptab->ctb_version = CFS_CPU_VERSION_MAGIC; - if (!zalloc_cpumask_var(&cptab->ctb_mask, GFP_NOFS)) + if (!zalloc_cpumask_var(&cptab->ctb_cpumask, GFP_NOFS)) return NULL; - cpumask_set_cpu(0, cptab->ctb_mask); + cpumask_set_cpu(0, cptab->ctb_cpumask); node_set(0, cptab->ctb_nodemask); - cptab->ctb_nparts = ncpt; } return cptab; @@ -68,13 +64,10 @@ struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt) void cfs_cpt_table_free(struct cfs_cpt_table *cptab) { - LASSERT(cptab->ctb_version == CFS_CPU_VERSION_MAGIC); - kfree(cptab); } EXPORT_SYMBOL(cfs_cpt_table_free); -#ifdef CONFIG_SMP int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { int rc; @@ -87,7 +80,6 @@ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) return rc; } EXPORT_SYMBOL(cfs_cpt_table_print); -#endif /* CONFIG_SMP */ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) { @@ -122,7 +114,7 @@ int cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) { - return &cptab->ctb_mask; + return &cptab->ctb_cpumask; } EXPORT_SYMBOL(cfs_cpt_cpumask); @@ -231,4 +223,4 @@ int cfs_cpu_init(void) return cfs_cpt_table ? 0 : -1; } -#endif /* HAVE_LIBCFS_CPT */ +#endif /* !CONFIG_SMP */ -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:57 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:57 -0400 Subject: [lustre-devel] [PATCH 15/25] staging: lustre: libcfs: rename i to cpu for cfs_cpt_bind In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-16-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Rename variable i to cpu to make code easier to understand. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 5f2ab30..b985b3d 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -644,8 +644,8 @@ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) { cpumask_var_t *cpumask; nodemask_t *nodemask; + int cpu; int rc; - int i; LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); @@ -663,8 +663,8 @@ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) return -EINVAL; } - for_each_online_cpu(i) { - if (cpumask_test_cpu(i, *cpumask)) + for_each_online_cpu(cpu) { + if (cpumask_test_cpu(cpu, *cpumask)) continue; rc = set_cpus_allowed_ptr(current, *cpumask); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:59 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:59 -0400 Subject: [lustre-devel] [PATCH 17/25] staging: lustre: libcfs: rename goto label in cfs_cpt_table_print In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-18-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Change goto label out to err. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index ae5ff58..435ee8e 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -161,20 +161,20 @@ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) for (i = 0; i < cptab->ctb_nparts; i++) { if (len <= 0) - goto out; + goto err; rc = snprintf(tmp, len, "%d\t:", i); len -= rc; if (len <= 0) - goto out; + goto err; tmp += rc; for_each_cpu(j, cptab->ctb_parts[i].cpt_cpumask) { rc = snprintf(tmp, len, " %d", j); len -= rc; if (len <= 0) - goto out; + goto err; tmp += rc; } @@ -184,7 +184,7 @@ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) } rc = 0; -out: +err: if (rc < 0) return rc; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:06 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:06 -0400 Subject: [lustre-devel] [PATCH 24/25] staging: lustre: libcfs: change CPT estimate algorithm In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-25-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin The main idea to have more CPU partitions is based on KNL experience. When a thread submit IO for network communication one of threads from current CPT is used for network stack. Whith high parallelization many threads become involved in network submission but having less CPU partitions they will wait until single thread process them from network queue. So, the bottleneck just moves into network layer in case of small amount of CPU partitions. My experiments showed that the best performance was when for each IO thread we have one network thread. This condition can be provided having 2 real HW cores (without hyper threads) per CPT. This is exactly what implemented in this patch. Change CPT estimate algorithm from 2 * (N - 1)^2 < NCPUS <= 2 * N^2 to 2 HW cores per CPT. This is critical for machines with number of cores different from 2^N. Current algorithm splits CPTs in KNL: LNet: HW CPU cores: 272, npartitions: 16 cpu_partition_table= 0 : 0-4,68-71,136-139,204-207 1 : 5-9,73-76,141-144,209-212 2 : 10-14,78-81,146-149,214-217 3 : 15-17,72,77,83-85,140,145,151-153,208,219-221 4 : 18-21,82,86-88,150,154-156,213,218,222-224 5 : 22-26,90-93,158-161,226-229 6 : 27-31,95-98,163-166,231-234 7 : 32-35,89,100-103,168-171,236-239 8 : 36-38,94,99,104-105,157,162,167,172-173,225,230,235,240-241 9 : 39-43,107-110,175-178,243-246 10 : 44-48,112-115,180-183,248-251 11 : 49-51,106,111,117-119,174,179,185-187,242,253-255 12 : 52-55,116,120-122,184,188-190,247,252,256-258 13 : 56-60,124-127,192-195,260-263 14 : 61-65,129-132,197-200,265-268 15 : 66-67,123,128,133-135,191,196,201-203,259,264,269-271 New algorithm will split CPTs in KNL: LNet: HW CPU cores: 272, npartitions: 34 cpu_partition_table= 0 : 0-1,68-69,136-137,204-205 1 : 2-3,70-71,138-139,206-207 2 : 4-5,72-73,140-141,208-209 3 : 6-7,74-75,142-143,210-211 4 : 8-9,76-77,144-145,212-213 5 : 10-11,78-79,146-147,214-215 6 : 12-13,80-81,148-149,216-217 7 : 14-15,82-83,150-151,218-219 8 : 16-17,84-85,152-153,220-221 9 : 18-19,86-87,154-155,222-223 10 : 20-21,88-89,156-157,224-225 11 : 22-23,90-91,158-159,226-227 12 : 24-25,92-93,160-161,228-229 13 : 26-27,94-95,162-163,230-231 14 : 28-29,96-97,164-165,232-233 15 : 30-31,98-99,166-167,234-235 16 : 32-33,100-101,168-169,236-237 17 : 34-35,102-103,170-171,238-239 18 : 36-37,104-105,172-173,240-241 19 : 38-39,106-107,174-175,242-243 20 : 40-41,108-109,176-177,244-245 21 : 42-43,110-111,178-179,246-247 22 : 44-45,112-113,180-181,248-249 23 : 46-47,114-115,182-183,250-251 24 : 48-49,116-117,184-185,252-253 25 : 50-51,118-119,186-187,254-255 26 : 52-53,120-121,188-189,256-257 27 : 54-55,122-123,190-191,258-259 28 : 56-57,124-125,192-193,260-261 29 : 58-59,126-127,194-195,262-263 30 : 60-61,128-129,196-197,264-265 31 : 62-63,130-131,198-199,266-267 32 : 64-65,132-133,200-201,268-269 33 : 66-67,134-135,202-203,270-271 'N' pattern in KNL works is not always good. in flat mode it will be one CPT with all CPUs inside. in SNC-4 mode: cpu_partition_table= 0 : 0-17,68-85,136-153,204-221 1 : 18-35,86-103,154-171,222-239 2 : 36-51,104-119,172-187,240-255 3 : 52-67,120-135,188-203,256-271 Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/24304 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 30 ++++------------------ 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 915cfca..ae5fd16 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -768,34 +768,14 @@ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, static int cfs_cpt_num_estimate(void) { - int nnode = num_online_nodes(); + int nthr = cpumask_weight(topology_sibling_cpumask(smp_processor_id())); int ncpu = num_online_cpus(); - int ncpt; + int ncpt = 1; - if (ncpu <= CPT_WEIGHT_MIN) { - ncpt = 1; - goto out; - } - - /* generate reasonable number of CPU partitions based on total number - * of CPUs, Preferred N should be power2 and match this condition: - * 2 * (N - 1)^2 < NCPUS <= 2 * N^2 - */ - for (ncpt = 2; ncpu > 2 * ncpt * ncpt; ncpt <<= 1) - ; - - if (ncpt <= nnode) { /* fat numa system */ - while (nnode > ncpt) - nnode >>= 1; + if (ncpu > CPT_WEIGHT_MIN) + for (ncpt = 2; ncpu > 2 * nthr * ncpt; ncpt++) + ; /* nothing */ - } else { /* ncpt > nnode */ - while ((nnode << 1) <= ncpt) - nnode <<= 1; - } - - ncpt = nnode; - -out: #if (BITS_PER_LONG == 32) /* config many CPU partitions on 32-bit system could consume * too much memory -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:51 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:51 -0400 Subject: [lustre-devel] [PATCH 09/25] staging: lustre: libcfs: use distance in cpu and node handling In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-10-git-send-email-jsimmons@infradead.org> From: Amir Shehata Take into consideration the location of NUMA nodes and core when calling cfs_cpt_[un]set_cpu() and cfs_cpt_[un]set_node(). This enables functioning on platforms with 100s of cores and NUMA nodes. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 192 +++++++++++++++------ 1 file changed, 143 insertions(+), 49 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 1e184b1..bbf89b8 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -300,11 +300,134 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) } EXPORT_SYMBOL(cfs_cpt_distance); +/* + * Calculate the maximum NUMA distance between all nodes in the + * from_mask and all nodes in the to_mask. + */ +static unsigned int cfs_cpt_distance_calculate(nodemask_t *from_mask, + nodemask_t *to_mask) +{ + unsigned int maximum; + unsigned int distance; + int from; + int to; + + maximum = 0; + for_each_node_mask(from, *from_mask) { + for_each_node_mask(to, *to_mask) { + distance = node_distance(from, to); + if (maximum < distance) + maximum = distance; + } + } + return maximum; +} + +static void cfs_cpt_add_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +{ + cptab->ctb_cpu2cpt[cpu] = cpt; + + cpumask_set_cpu(cpu, cptab->ctb_cpumask); + cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); +} + +static void cfs_cpt_del_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) +{ + cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); + cpumask_clear_cpu(cpu, cptab->ctb_cpumask); + + cptab->ctb_cpu2cpt[cpu] = -1; +} + +static void cfs_cpt_add_node(struct cfs_cpt_table *cptab, int cpt, int node) +{ + struct cfs_cpu_partition *part; + + if (!node_isset(node, *cptab->ctb_nodemask)) { + unsigned int dist; + + /* first time node is added to the CPT table */ + node_set(node, *cptab->ctb_nodemask); + cptab->ctb_node2cpt[node] = cpt; + + dist = cfs_cpt_distance_calculate(cptab->ctb_nodemask, + cptab->ctb_nodemask); + cptab->ctb_distance = dist; + } + + part = &cptab->ctb_parts[cpt]; + if (!node_isset(node, *part->cpt_nodemask)) { + int cpt2; + + /* first time node is added to this CPT */ + node_set(node, *part->cpt_nodemask); + for (cpt2 = 0; cpt2 < cptab->ctb_nparts; cpt2++) { + struct cfs_cpu_partition *part2; + unsigned int dist; + + part2 = &cptab->ctb_parts[cpt2]; + dist = cfs_cpt_distance_calculate(part->cpt_nodemask, + part2->cpt_nodemask); + part->cpt_distance[cpt2] = dist; + dist = cfs_cpt_distance_calculate(part2->cpt_nodemask, + part->cpt_nodemask); + part2->cpt_distance[cpt] = dist; + } + } +} + +static void cfs_cpt_del_node(struct cfs_cpt_table *cptab, int cpt, int node) +{ + struct cfs_cpu_partition *part = &cptab->ctb_parts[cpt]; + int cpu; + + for_each_cpu(cpu, part->cpt_cpumask) { + /* this CPT has other CPU belonging to this node? */ + if (cpu_to_node(cpu) == node) + break; + } + + if (cpu >= nr_cpu_ids && node_isset(node, *part->cpt_nodemask)) { + int cpt2; + + /* No more CPUs in the node for this CPT. */ + node_clear(node, *part->cpt_nodemask); + for (cpt2 = 0; cpt2 < cptab->ctb_nparts; cpt2++) { + struct cfs_cpu_partition *part2; + unsigned int dist; + + part2 = &cptab->ctb_parts[cpt2]; + if (node_isset(node, *part2->cpt_nodemask)) + cptab->ctb_node2cpt[node] = cpt2; + + dist = cfs_cpt_distance_calculate(part->cpt_nodemask, + part2->cpt_nodemask); + part->cpt_distance[cpt2] = dist; + dist = cfs_cpt_distance_calculate(part2->cpt_nodemask, + part->cpt_nodemask); + part2->cpt_distance[cpt] = dist; + } + } + + for_each_cpu(cpu, cptab->ctb_cpumask) { + /* this CPT-table has other CPUs belonging to this node? */ + if (cpu_to_node(cpu) == node) + break; + } + + if (cpu >= nr_cpu_ids && node_isset(node, *cptab->ctb_nodemask)) { + /* No more CPUs in the table for this node. */ + node_clear(node, *cptab->ctb_nodemask); + cptab->ctb_node2cpt[node] = -1; + cptab->ctb_distance = + cfs_cpt_distance_calculate(cptab->ctb_nodemask, + cptab->ctb_nodemask); + } +} + int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { - int node; - LASSERT(cpt >= 0 && cpt < cptab->ctb_nparts); if (cpu < 0 || cpu >= nr_cpu_ids || !cpu_online(cpu)) { @@ -318,23 +441,11 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) return 0; } - cptab->ctb_cpu2cpt[cpu] = cpt; - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); - cpumask_set_cpu(cpu, cptab->ctb_cpumask); - cpumask_set_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); - - node = cpu_to_node(cpu); - - /* first CPU of @node in this CPT table */ - if (!node_isset(node, *cptab->ctb_nodemask)) - node_set(node, *cptab->ctb_nodemask); - - /* first CPU of @node in this partition */ - if (!node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)) - node_set(node, *cptab->ctb_parts[cpt].cpt_nodemask); + cfs_cpt_add_cpu(cptab, cpt, cpu); + cfs_cpt_add_node(cptab, cpt, cpu_to_node(cpu)); return 1; } @@ -343,9 +454,6 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) void cfs_cpt_unset_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { - int node; - int i; - LASSERT(cpt == CFS_CPT_ANY || (cpt >= 0 && cpt < cptab->ctb_nparts)); if (cpu < 0 || cpu >= nr_cpu_ids) { @@ -371,32 +479,8 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) LASSERT(cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); LASSERT(cpumask_test_cpu(cpu, cptab->ctb_cpumask)); - cpumask_clear_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask); - cpumask_clear_cpu(cpu, cptab->ctb_cpumask); - cptab->ctb_cpu2cpt[cpu] = -1; - - node = cpu_to_node(cpu); - - LASSERT(node_isset(node, *cptab->ctb_parts[cpt].cpt_nodemask)); - LASSERT(node_isset(node, *cptab->ctb_nodemask)); - - for_each_cpu(i, cptab->ctb_parts[cpt].cpt_cpumask) { - /* this CPT has other CPU belonging to this node? */ - if (cpu_to_node(i) == node) - break; - } - - if (i >= nr_cpu_ids) - node_clear(node, *cptab->ctb_parts[cpt].cpt_nodemask); - - for_each_cpu(i, cptab->ctb_cpumask) { - /* this CPT-table has other CPU belonging to this node? */ - if (cpu_to_node(i) == node) - break; - } - - if (i >= nr_cpu_ids) - node_clear(node, *cptab->ctb_nodemask); + cfs_cpt_del_cpu(cptab, cpt, cpu); + cfs_cpt_del_node(cptab, cpt, cpu_to_node(cpu)); } EXPORT_SYMBOL(cfs_cpt_unset_cpu); @@ -413,8 +497,8 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) } for_each_cpu(cpu, mask) { - if (!cfs_cpt_set_cpu(cptab, cpt, cpu)) - return 0; + cfs_cpt_add_cpu(cptab, cpt, cpu); + cfs_cpt_add_node(cptab, cpt, cpu_to_node(cpu)); } return 1; @@ -436,6 +520,7 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) cfs_cpt_set_node(struct cfs_cpt_table *cptab, int cpt, int node) { const cpumask_t *mask; + int cpu; if (node < 0 || node >= nr_node_ids) { CDEBUG(D_INFO, @@ -445,7 +530,12 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) mask = cpumask_of_node(node); - return cfs_cpt_set_cpumask(cptab, cpt, mask); + for_each_cpu(cpu, mask) + cfs_cpt_add_cpu(cptab, cpt, cpu); + + cfs_cpt_add_node(cptab, cpt, node); + + return 1; } EXPORT_SYMBOL(cfs_cpt_set_node); @@ -453,6 +543,7 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) { const cpumask_t *mask; + int cpu; if (node < 0 || node >= nr_node_ids) { CDEBUG(D_INFO, @@ -462,7 +553,10 @@ unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) mask = cpumask_of_node(node); - cfs_cpt_unset_cpumask(cptab, cpt, mask); + for_each_cpu(cpu, mask) + cfs_cpt_del_cpu(cptab, cpt, cpu); + + cfs_cpt_del_node(cptab, cpt, node); } EXPORT_SYMBOL(cfs_cpt_unset_node); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:58 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:58 -0400 Subject: [lustre-devel] [PATCH 16/25] staging: lustre: libcfs: rename cpumask_var_t variables to *_mask In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-17-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Because we handle both cpu mask as well as core identifiers it can easily be confused. To avoid this rename various cpumask_var_t to have appended *_mask to their names. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index b985b3d..ae5ff58 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -685,23 +685,23 @@ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) * We always prefer to choose CPU in the same core/socket. */ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, - cpumask_t *node, int number) + cpumask_t *node_mask, int number) { - cpumask_var_t socket; - cpumask_var_t core; + cpumask_var_t socket_mask; + cpumask_var_t core_mask; int rc = 0; int cpu; LASSERT(number > 0); - if (number >= cpumask_weight(node)) { - while (!cpumask_empty(node)) { - cpu = cpumask_first(node); + if (number >= cpumask_weight(node_mask)) { + while (!cpumask_empty(node_mask)) { + cpu = cpumask_first(node_mask); rc = cfs_cpt_set_cpu(cptab, cpt, cpu); if (!rc) return -EINVAL; - cpumask_clear_cpu(cpu, node); + cpumask_clear_cpu(cpu, node_mask); } return 0; } @@ -711,34 +711,34 @@ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, * As we cannot initialize a cpumask_var_t, we need * to alloc both before we can risk trying to free either */ - if (!zalloc_cpumask_var(&socket, GFP_NOFS)) + if (!zalloc_cpumask_var(&socket_mask, GFP_NOFS)) rc = -ENOMEM; - if (!zalloc_cpumask_var(&core, GFP_NOFS)) + if (!zalloc_cpumask_var(&core_mask, GFP_NOFS)) rc = -ENOMEM; if (rc) goto out; - while (!cpumask_empty(node)) { - cpu = cpumask_first(node); + while (!cpumask_empty(node_mask)) { + cpu = cpumask_first(node_mask); /* get cpumask for cores in the same socket */ - cpumask_copy(socket, topology_core_cpumask(cpu)); - cpumask_and(socket, socket, node); + cpumask_copy(socket_mask, topology_core_cpumask(cpu)); + cpumask_and(socket_mask, socket_mask, node_mask); - LASSERT(!cpumask_empty(socket)); + LASSERT(!cpumask_empty(socket_mask)); - while (!cpumask_empty(socket)) { + while (!cpumask_empty(socket_mask)) { int i; /* get cpumask for hts in the same core */ - cpumask_copy(core, topology_sibling_cpumask(cpu)); - cpumask_and(core, core, node); + cpumask_copy(core_mask, topology_sibling_cpumask(cpu)); + cpumask_and(core_mask, core_mask, node_mask); - LASSERT(!cpumask_empty(core)); + LASSERT(!cpumask_empty(core_mask)); - for_each_cpu(i, core) { - cpumask_clear_cpu(i, socket); - cpumask_clear_cpu(i, node); + for_each_cpu(i, core_mask) { + cpumask_clear_cpu(i, socket_mask); + cpumask_clear_cpu(i, node_mask); rc = cfs_cpt_set_cpu(cptab, cpt, i); if (!rc) { @@ -749,13 +749,13 @@ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, if (!--number) goto out; } - cpu = cpumask_first(socket); + cpu = cpumask_first(socket_mask); } } out: - free_cpumask_var(socket); - free_cpumask_var(core); + free_cpumask_var(socket_mask); + free_cpumask_var(core_mask); return rc; } @@ -806,7 +806,7 @@ static int cfs_cpt_num_estimate(void) static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) { struct cfs_cpt_table *cptab = NULL; - cpumask_var_t mask; + cpumask_var_t node_mask; int cpt = 0; int num; int rc; @@ -839,15 +839,15 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) goto failed; } - if (!zalloc_cpumask_var(&mask, GFP_NOFS)) { + if (!zalloc_cpumask_var(&node_mask, GFP_NOFS)) { CERROR("Failed to allocate scratch cpumask\n"); goto failed; } for_each_online_node(i) { - cpumask_copy(mask, cpumask_of_node(i)); + cpumask_copy(node_mask, cpumask_of_node(i)); - while (!cpumask_empty(mask)) { + while (!cpumask_empty(node_mask)) { struct cfs_cpu_partition *part; int n; @@ -864,7 +864,7 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) n = num - cpumask_weight(part->cpt_cpumask); LASSERT(n > 0); - rc = cfs_cpt_choose_ncpus(cptab, cpt, mask, n); + rc = cfs_cpt_choose_ncpus(cptab, cpt, node_mask, n); if (rc < 0) goto failed_mask; @@ -882,12 +882,12 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) goto failed_mask; } - free_cpumask_var(mask); + free_cpumask_var(node_mask); return cptab; failed_mask: - free_cpumask_var(mask); + free_cpumask_var(node_mask); failed: CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", ncpt, num_online_nodes(), num_online_cpus()); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:02 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:02 -0400 Subject: [lustre-devel] [PATCH 20/25] staging: lustre: libcfs: make tolerant to offline CPUs and empty NUMA nodes In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-21-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Rework CPU partition code in the way of make it more tolerant to offline CPUs and empty nodes. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../lustre/include/linux/libcfs/linux/linux-cpu.h | 2 + .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 132 +++++++++------------ drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 + 3 files changed, 60 insertions(+), 76 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index b3bc4e7..ed4351b 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -56,6 +56,8 @@ struct cfs_cpu_partition { unsigned int *cpt_distance; /* spread rotor for NUMA allocator */ int cpt_spread_rotor; + /* NUMA node if cpt_nodemask is empty */ + int cpt_node; }; /** descriptor for CPU partitions */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 32ebd0f..80db008 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -427,8 +427,16 @@ int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) return 0; } - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_cpumask)); - LASSERT(!cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)); + if (cpumask_test_cpu(cpu, cptab->ctb_cpumask)) { + CDEBUG(D_INFO, "CPU %d is already in cpumask\n", cpu); + return 0; + } + + if (cpumask_test_cpu(cpu, cptab->ctb_parts[cpt].cpt_cpumask)) { + CDEBUG(D_INFO, "CPU %d is already in partition %d cpumask\n", + cpu, cptab->ctb_cpu2cpt[cpu]); + return 0; + } cfs_cpt_add_cpu(cptab, cpt, cpu); cfs_cpt_add_node(cptab, cpt, cpu_to_node(cpu)); @@ -497,8 +505,10 @@ void cfs_cpt_unset_cpumask(struct cfs_cpt_table *cptab, int cpt, { int cpu; - for_each_cpu(cpu, mask) - cfs_cpt_unset_cpu(cptab, cpt, cpu); + for_each_cpu(cpu, mask) { + cfs_cpt_del_cpu(cptab, cpt, cpu); + cfs_cpt_del_node(cptab, cpt, cpu_to_node(cpu)); + } } EXPORT_SYMBOL(cfs_cpt_unset_cpumask); @@ -549,10 +559,8 @@ int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, { int node; - for_each_node_mask(node, *mask) { - if (!cfs_cpt_set_node(cptab, cpt, node)) - return 0; - } + for_each_node_mask(node, *mask) + cfs_cpt_set_node(cptab, cpt, node); return 1; } @@ -573,7 +581,7 @@ int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) nodemask_t *mask; int weight; int rotor; - int node; + int node = 0; /* convert CPU partition ID to HW node id */ @@ -583,20 +591,20 @@ int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) } else { mask = cptab->ctb_parts[cpt].cpt_nodemask; rotor = cptab->ctb_parts[cpt].cpt_spread_rotor++; + node = cptab->ctb_parts[cpt].cpt_node; } weight = nodes_weight(*mask); - LASSERT(weight > 0); - - rotor %= weight; + if (weight > 0) { + rotor %= weight; - for_each_node_mask(node, *mask) { - if (!rotor--) - return node; + for_each_node_mask(node, *mask) { + if (!rotor--) + return node; + } } - LBUG(); - return 0; + return node; } EXPORT_SYMBOL(cfs_cpt_spread_node); @@ -689,17 +697,21 @@ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, cpumask_var_t core_mask; int rc = 0; int cpu; + int i; LASSERT(number > 0); if (number >= cpumask_weight(node_mask)) { while (!cpumask_empty(node_mask)) { cpu = cpumask_first(node_mask); + cpumask_clear_cpu(cpu, node_mask); + + if (!cpu_online(cpu)) + continue; rc = cfs_cpt_set_cpu(cptab, cpt, cpu); if (!rc) return -EINVAL; - cpumask_clear_cpu(cpu, node_mask); } return 0; } @@ -720,24 +732,19 @@ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, cpu = cpumask_first(node_mask); /* get cpumask for cores in the same socket */ - cpumask_copy(socket_mask, topology_core_cpumask(cpu)); - cpumask_and(socket_mask, socket_mask, node_mask); - - LASSERT(!cpumask_empty(socket_mask)); - + cpumask_and(socket_mask, topology_core_cpumask(cpu), node_mask); while (!cpumask_empty(socket_mask)) { - int i; - /* get cpumask for hts in the same core */ - cpumask_copy(core_mask, topology_sibling_cpumask(cpu)); - cpumask_and(core_mask, core_mask, node_mask); - - LASSERT(!cpumask_empty(core_mask)); + cpumask_and(core_mask, topology_sibling_cpumask(cpu), + node_mask); for_each_cpu(i, core_mask) { cpumask_clear_cpu(i, socket_mask); cpumask_clear_cpu(i, node_mask); + if (!cpu_online(i)) + continue; + rc = cfs_cpt_set_cpu(cptab, cpt, i); if (!rc) { rc = -EINVAL; @@ -806,23 +813,18 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) struct cfs_cpt_table *cptab = NULL; cpumask_var_t node_mask; int cpt = 0; + int node; int num; - int rc; - int i; + int rem; + int rc = 0; - rc = cfs_cpt_num_estimate(); + num = cfs_cpt_num_estimate(); if (ncpt <= 0) - ncpt = rc; + ncpt = num; - if (ncpt > num_online_cpus() || ncpt > 4 * rc) { + if (ncpt > num_online_cpus() || ncpt > 4 * num) { CWARN("CPU partition number %d is larger than suggested value (%d), your system may have performance issue or run out of memory while under pressure\n", - ncpt, rc); - } - - if (num_online_cpus() % ncpt) { - CERROR("CPU number %d is not multiple of cpu_npartition %d, please try different cpu_npartitions value or set pattern string by cpu_pattern=STRING\n", - (int)num_online_cpus(), ncpt); - goto failed; + ncpt, num); } cptab = cfs_cpt_table_alloc(ncpt); @@ -831,55 +833,33 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) goto failed; } - num = num_online_cpus() / ncpt; - if (!num) { - CERROR("CPU changed while setting CPU partition\n"); - goto failed; - } - if (!zalloc_cpumask_var(&node_mask, GFP_NOFS)) { CERROR("Failed to allocate scratch cpumask\n"); goto failed; } - for_each_online_node(i) { - cpumask_copy(node_mask, cpumask_of_node(i)); - - while (!cpumask_empty(node_mask)) { - struct cfs_cpu_partition *part; - int n; - - /* - * Each emulated NUMA node has all allowed CPUs in - * the mask. - * End loop when all partitions have assigned CPUs. - */ - if (cpt == ncpt) - break; - - part = &cptab->ctb_parts[cpt]; + num = num_online_cpus() / ncpt; + rem = num_online_cpus() % ncpt; + for_each_online_node(node) { + cpumask_copy(node_mask, cpumask_of_node(node)); - n = num - cpumask_weight(part->cpt_cpumask); - LASSERT(n > 0); + while (cpt < ncpt && !cpumask_empty(node_mask)) { + struct cfs_cpu_partition *part = &cptab->ctb_parts[cpt]; + int ncpu = cpumask_weight(part->cpt_cpumask); - rc = cfs_cpt_choose_ncpus(cptab, cpt, node_mask, n); + rc = cfs_cpt_choose_ncpus(cptab, cpt, node_mask, + num - ncpu); if (rc < 0) goto failed_mask; - LASSERT(num >= cpumask_weight(part->cpt_cpumask)); - if (num == cpumask_weight(part->cpt_cpumask)) + ncpu = cpumask_weight(part->cpt_cpumask); + if (ncpu == num + !!(rem > 0)) { cpt++; + rem--; + } } } - if (cpt != ncpt || - num != cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)) { - CERROR("Expect %d(%d) CPU partitions but got %d(%d), CPU hotplug/unplug while setting?\n", - cptab->ctb_nparts, num, cpt, - cpumask_weight(cptab->ctb_parts[ncpt - 1].cpt_cpumask)); - goto failed_mask; - } - free_cpumask_var(node_mask); return cptab; diff --git a/drivers/staging/lustre/lnet/lnet/lib-msg.c b/drivers/staging/lustre/lnet/lnet/lib-msg.c index 0091273..27bdefa 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-msg.c +++ b/drivers/staging/lustre/lnet/lnet/lib-msg.c @@ -568,6 +568,8 @@ /* number of CPUs */ container->msc_nfinalizers = cfs_cpt_weight(lnet_cpt_table(), cpt); + if (container->msc_nfinalizers == 0) + container->msc_nfinalizers = 1; container->msc_finalizers = kvzalloc_cpt(container->msc_nfinalizers * sizeof(*container->msc_finalizers), -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:05 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:05 -0400 Subject: [lustre-devel] [PATCH 23/25] staging: lustre: libcfs: rework CPU pattern parsing code In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-24-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Currently the module param string for CPU pattern can be modified which is wrong. Rewrite CPU pattern parsing code to avoid the passed buffer from being changed. This change also enables us to add real errors propogation to the caller functions. Signed-off-by: Dmitry Eremin Signed-off-by: Amir Shehata Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23306 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9715 Reviewed-on: https://review.whamcloud.com/27872 Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: Olaf Weber Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 151 ++++++++++++--------- 1 file changed, 88 insertions(+), 63 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index a08816a..915cfca 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -662,11 +662,11 @@ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) nodemask = cptab->ctb_parts[cpt].cpt_nodemask; } - if (cpumask_any_and(*cpumask, cpu_online_mask) >= nr_cpu_ids) { + if (!cpumask_intersects(*cpumask, cpu_online_mask)) { CDEBUG(D_INFO, "No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", cpt); - return -EINVAL; + return -ENODEV; } for_each_online_cpu(cpu) { @@ -830,11 +830,13 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) cptab = cfs_cpt_table_alloc(ncpt); if (!cptab) { CERROR("Failed to allocate CPU map(%d)\n", ncpt); + rc = -ENOMEM; goto failed; } if (!zalloc_cpumask_var(&node_mask, GFP_NOFS)) { CERROR("Failed to allocate scratch cpumask\n"); + rc = -ENOMEM; goto failed; } @@ -849,8 +851,10 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) rc = cfs_cpt_choose_ncpus(cptab, cpt, node_mask, num - ncpu); - if (rc < 0) + if (rc < 0) { + rc = -EINVAL; goto failed_mask; + } ncpu = cpumask_weight(part->cpt_cpumask); if (ncpu == num + !!(rem > 0)) { @@ -873,37 +877,51 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) if (cptab) cfs_cpt_table_free(cptab); - return NULL; + return ERR_PTR(rc); } -static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) +static struct cfs_cpt_table *cfs_cpt_table_create_pattern(const char *pattern) { struct cfs_cpt_table *cptab; + char *pattern_dup; + char *bracket; char *str; int node = 0; - int high; int ncpt = 0; - int cpt; + int cpt = 0; + int high; int rc; int c; int i; - str = strim(pattern); + pattern_dup = kstrdup(pattern, GFP_KERNEL); + if (!pattern_dup) { + CERROR("Failed to duplicate pattern '%s'\n", pattern); + return ERR_PTR(-ENOMEM); + } + + str = strim(pattern_dup); if (*str == 'n' || *str == 'N') { - pattern = str + 1; - if (*pattern != '\0') { - node = 1; - } else { /* shortcut to create CPT from NUMA & CPU topology */ + str++; /* skip 'N' char */ + node = 1; /* NUMA pattern */ + if (*str == '\0') { node = -1; - ncpt = num_online_nodes(); + for_each_online_node(i) { + if (!cpumask_empty(cpumask_of_node(i))) + ncpt++; + } + if (ncpt == 1) { /* single NUMA node */ + kfree(pattern_dup); + return cfs_cpt_table_create(cpu_npartitions); + } } } if (!ncpt) { /* scanning bracket which is mark of partition */ - for (str = pattern;; str++, ncpt++) { - str = strchr(str, '['); - if (!str) - break; + bracket = str; + while ((bracket = strchr(bracket, '['))) { + bracket++; + ncpt++; } } @@ -911,87 +929,95 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) (node && ncpt > num_online_nodes()) || (!node && ncpt > num_online_cpus())) { CERROR("Invalid pattern '%s', or too many partitions %d\n", - pattern, ncpt); - return NULL; + pattern_dup, ncpt); + rc = -EINVAL; + goto err_free_str; } cptab = cfs_cpt_table_alloc(ncpt); if (!cptab) { CERROR("Failed to allocate CPU partition table\n"); - return NULL; + rc = -ENOMEM; + goto err_free_str; } if (node < 0) { /* shortcut to create CPT from NUMA & CPU topology */ - cpt = 0; - for_each_online_node(i) { - if (cpt >= ncpt) { - CERROR("CPU changed while setting CPU partition table, %d/%d\n", - cpt, ncpt); - goto failed; - } + if (cpumask_empty(cpumask_of_node(i))) + continue; rc = cfs_cpt_set_node(cptab, cpt++, i); - if (!rc) - goto failed; + if (!rc) { + rc = -EINVAL; + goto err_free_table; + } } + kfree(pattern_dup); return cptab; } high = node ? nr_node_ids - 1 : nr_cpu_ids - 1; - for (str = strim(pattern), c = 0;; c++) { + for (str = strim(str), c = 0; /* until break */; c++) { struct cfs_range_expr *range; struct cfs_expr_list *el; - char *bracket = strchr(str, '['); int n; + bracket = strchr(str, '['); if (!bracket) { if (*str) { CERROR("Invalid pattern '%s'\n", str); - goto failed; - } - if (c != ncpt) { + rc = -EINVAL; + goto err_free_table; + } else if (c != ncpt) { CERROR("Expect %d partitions but found %d\n", ncpt, c); - goto failed; + rc = -EINVAL; + goto err_free_table; } break; } if (sscanf(str, "%d%n", &cpt, &n) < 1) { CERROR("Invalid CPU pattern '%s'\n", str); - goto failed; + rc = -EINVAL; + goto err_free_table; } if (cpt < 0 || cpt >= ncpt) { CERROR("Invalid partition id %d, total partitions %d\n", cpt, ncpt); - goto failed; + rc = -EINVAL; + goto err_free_table; } if (cfs_cpt_weight(cptab, cpt)) { CERROR("Partition %d has already been set.\n", cpt); - goto failed; + rc = -EPERM; + goto err_free_table; } str = strim(str + n); if (str != bracket) { CERROR("Invalid pattern '%s'\n", str); - goto failed; + rc = -EINVAL; + goto err_free_table; } bracket = strchr(str, ']'); if (!bracket) { CERROR("Missing right bracket for partition %d in '%s'\n", cpt, str); - goto failed; + rc = -EINVAL; + goto err_free_table; } - if (cfs_expr_list_parse(str, (bracket - str) + 1, - 0, high, &el)) { + rc = cfs_expr_list_parse(str, (bracket - str) + 1, 0, high, + &el); + if (rc) { CERROR("Can't parse number range in '%s'\n", str); - goto failed; + rc = -ERANGE; + goto err_free_table; } list_for_each_entry(range, &el->el_exprs, re_link) { @@ -999,11 +1025,12 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) if ((i - range->re_lo) % range->re_stride) continue; - rc = node ? cfs_cpt_set_node(cptab, cpt, i) : - cfs_cpt_set_cpu(cptab, cpt, i); + rc = node ? cfs_cpt_set_node(cptab, cpt, i) + : cfs_cpt_set_cpu(cptab, cpt, i); if (!rc) { cfs_expr_list_free(el); - goto failed; + rc = -EINVAL; + goto err_free_table; } } } @@ -1012,17 +1039,21 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) if (!cfs_cpt_online(cptab, cpt)) { CERROR("No online CPU is found on partition %d\n", cpt); - goto failed; + rc = -ENODEV; + goto err_free_table; } str = strim(bracket + 1); } + kfree(pattern_dup); return cptab; -failed: +err_free_table: cfs_cpt_table_free(cptab); - return NULL; +err_free_str: + kfree(pattern_dup); + return ERR_PTR(rc); } #ifdef CONFIG_HOTPLUG_CPU @@ -1049,7 +1080,7 @@ static int cfs_cpu_dead(unsigned int cpu) void cfs_cpu_fini(void) { - if (cfs_cpt_table) + if (!IS_ERR_OR_NULL(cfs_cpt_table)) cfs_cpt_table_free(cfs_cpt_table); #ifdef CONFIG_HOTPLUG_CPU @@ -1082,26 +1113,20 @@ int cfs_cpu_init(void) get_online_cpus(); if (*cpu_pattern) { - char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); - - if (!cpu_pattern_dup) { - CERROR("Failed to duplicate cpu_pattern\n"); - goto failed; - } - - cfs_cpt_table = cfs_cpt_table_create_pattern(cpu_pattern_dup); - kfree(cpu_pattern_dup); - if (!cfs_cpt_table) { - CERROR("Failed to create cptab from pattern %s\n", + cfs_cpt_table = cfs_cpt_table_create_pattern(cpu_pattern); + if (IS_ERR(cfs_cpt_table)) { + CERROR("Failed to create cptab from pattern '%s'\n", cpu_pattern); + ret = PTR_ERR(cfs_cpt_table); goto failed; } } else { cfs_cpt_table = cfs_cpt_table_create(cpu_npartitions); - if (!cfs_cpt_table) { - CERROR("Failed to create ptable with npartitions %d\n", + if (IS_ERR(cfs_cpt_table)) { + CERROR("Failed to create cptab with npartitions %d\n", cpu_npartitions); + ret = PTR_ERR(cfs_cpt_table); goto failed; } } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:52 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:52 -0400 Subject: [lustre-devel] [PATCH 10/25] staging: lustre: libcfs: provide debugfs files for distance handling In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-11-git-send-email-jsimmons@infradead.org> From: Amir Shehata On systems with large number of NUMA nodes and cores it is easy to incorrectly configure their use with Lustre. Provide debugfs files which can help track down any issues. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/module.c | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index a03f924..95af000 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -336,6 +336,53 @@ static int proc_cpt_table(struct ctl_table *table, int write, __proc_cpt_table); } +static int __proc_cpt_distance(void *data, int write, + loff_t pos, void __user *buffer, int nob) +{ + char *buf = NULL; + int len = 4096; + int rc = 0; + + if (write) + return -EPERM; + + LASSERT(cfs_cpt_table); + + while (1) { + buf = kzalloc(len, GFP_KERNEL); + if (!buf) + return -ENOMEM; + + rc = cfs_cpt_distance_print(cfs_cpt_table, buf, len); + if (rc >= 0) + break; + + if (rc == -EFBIG) { + kfree(buf); + len <<= 1; + continue; + } + goto out; + } + + if (pos >= rc) { + rc = 0; + goto out; + } + + rc = cfs_trace_copyout_string(buffer, nob, buf + pos, NULL); +out: + kfree(buf); + return rc; +} + +static int proc_cpt_distance(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) +{ + return lprocfs_call_handler(table->data, write, ppos, buffer, lenp, + __proc_cpt_distance); +} + static struct ctl_table lnet_table[] = { { .procname = "debug", @@ -365,6 +412,12 @@ static int proc_cpt_table(struct ctl_table *table, int write, .proc_handler = &proc_cpt_table, }, { + .procname = "cpu_partition_distance", + .maxlen = 128, + .mode = 0444, + .proc_handler = &proc_cpt_distance, + }, + { .procname = "debug_log_upcall", .data = lnet_debug_log_upcall, .maxlen = sizeof(lnet_debug_log_upcall), -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:56 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:56 -0400 Subject: [lustre-devel] [PATCH 14/25] staging: lustre: libcfs: rename i to node for cfs_cpt_set_nodemask In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-15-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Rename variable i to node to make code easier to understand. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 1669669..5f2ab30 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -550,10 +550,10 @@ void cfs_cpt_unset_node(struct cfs_cpt_table *cptab, int cpt, int node) int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, const nodemask_t *mask) { - int i; + int node; - for_each_node_mask(i, *mask) { - if (!cfs_cpt_set_node(cptab, cpt, i)) + for_each_node_mask(node, *mask) { + if (!cfs_cpt_set_node(cptab, cpt, node)) return 0; } @@ -564,10 +564,10 @@ int cfs_cpt_set_nodemask(struct cfs_cpt_table *cptab, int cpt, void cfs_cpt_unset_nodemask(struct cfs_cpt_table *cptab, int cpt, const nodemask_t *mask) { - int i; + int node; - for_each_node_mask(i, *mask) - cfs_cpt_unset_node(cptab, cpt, i); + for_each_node_mask(node, *mask) + cfs_cpt_unset_node(cptab, cpt, node); } EXPORT_SYMBOL(cfs_cpt_unset_nodemask); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:50 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:50 -0400 Subject: [lustre-devel] [PATCH 08/25] staging: lustre: libcfs: add cpu distance handling In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-9-git-send-email-jsimmons@infradead.org> From: Amir Shehata Add functionality to calculate the distance between two CPTs. Expose those distance in debugfs so people deploying a setup can debug what is being created for CPTs. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- .../lustre/include/linux/libcfs/libcfs_cpu.h | 8 +++ .../lustre/include/linux/libcfs/linux/linux-cpu.h | 4 ++ drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 21 ++++++++ .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 59 ++++++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 839ec02..c0922fc 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -110,6 +110,10 @@ struct cfs_cpt_table { */ struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); /** + * print distance information of cpt-table + */ +int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len); +/** * return total number of CPU partitions in \a cptab */ int @@ -143,6 +147,10 @@ struct cfs_cpt_table { */ int cfs_cpt_of_node(struct cfs_cpt_table *cptab, int node); /** + * NUMA distance between \a cpt1 and \a cpt2 in \a cptab + */ +unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2); +/** * bind current thread on a CPU-partition \a cpt of \a cptab */ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt); diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index 1bed0ba..4ac1670 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -52,6 +52,8 @@ struct cfs_cpu_partition { cpumask_var_t cpt_cpumask; /* nodes mask for this partition */ nodemask_t *cpt_nodemask; + /* NUMA distance between CPTs */ + unsigned int *cpt_distance; /* spread rotor for NUMA allocator */ unsigned int cpt_spread_rotor; }; @@ -60,6 +62,8 @@ struct cfs_cpu_partition { struct cfs_cpt_table { /* spread rotor for NUMA allocator */ unsigned int ctb_spread_rotor; + /* maximum NUMA distance between all nodes in table */ + unsigned int ctb_distance; /* # of CPU partitions */ unsigned int ctb_nparts; /* partitions tables */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index e6d1512..7ac2796 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -41,6 +41,8 @@ #define CFS_CPU_VERSION_MAGIC 0xbabecafe +#define CFS_CPT_DISTANCE 1 /* Arbitrary positive value */ + struct cfs_cpt_table * cfs_cpt_table_alloc(unsigned int ncpt) { @@ -90,6 +92,19 @@ struct cfs_cpt_table * EXPORT_SYMBOL(cfs_cpt_table_print); #endif /* CONFIG_SMP */ +int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) +{ + int rc; + + rc = snprintf(buf, len, "0\t: 0:%d\n", CFS_CPT_DISTANCE); + len -= rc; + if (len <= 0) + return -EFBIG; + + return rc; +} +EXPORT_SYMBOL(cfs_cpt_distance_print); + int cfs_cpt_number(struct cfs_cpt_table *cptab) { @@ -124,6 +139,12 @@ cpumask_var_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) } EXPORT_SYMBOL(cfs_cpt_nodemask); +unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) +{ + return CFS_CPT_DISTANCE; +} +EXPORT_SYMBOL(cfs_cpt_distance); + int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index fd0c451..1e184b1 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -76,6 +76,7 @@ struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; kfree(part->cpt_nodemask); + kfree(part->cpt_distance); free_cpumask_var(part->cpt_cpumask); } @@ -137,6 +138,12 @@ struct cfs_cpt_table * if (!zalloc_cpumask_var(&part->cpt_cpumask, GFP_NOFS) || !part->cpt_nodemask) goto failed; + + part->cpt_distance = kvmalloc_array(cptab->ctb_nparts, + sizeof(part->cpt_distance[0]), + GFP_KERNEL); + if (!part->cpt_distance) + goto failed; } return cptab; @@ -190,6 +197,46 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_table_print); +int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) +{ + char *tmp = buf; + int rc = -EFBIG; + int i; + int j; + + for (i = 0; i < cptab->ctb_nparts; i++) { + if (len <= 0) + goto err; + + rc = snprintf(tmp, len, "%d\t:", i); + len -= rc; + + if (len <= 0) + goto err; + + tmp += rc; + for (j = 0; j < cptab->ctb_nparts; j++) { + rc = snprintf(tmp, len, " %d:%d", + j, cptab->ctb_parts[i].cpt_distance[j]); + len -= rc; + if (len <= 0) + goto err; + tmp += rc; + } + + *tmp = '\n'; + tmp++; + len--; + } + rc = 0; +err: + if (rc < 0) + return rc; + + return tmp - buf; +} +EXPORT_SYMBOL(cfs_cpt_distance_print); + int cfs_cpt_number(struct cfs_cpt_table *cptab) { @@ -241,6 +288,18 @@ struct cfs_cpt_table * } EXPORT_SYMBOL(cfs_cpt_nodemask); +unsigned int cfs_cpt_distance(struct cfs_cpt_table *cptab, int cpt1, int cpt2) +{ + LASSERT(cpt1 == CFS_CPT_ANY || (cpt1 >= 0 && cpt1 < cptab->ctb_nparts)); + LASSERT(cpt2 == CFS_CPT_ANY || (cpt2 >= 0 && cpt2 < cptab->ctb_nparts)); + + if (cpt1 == CFS_CPT_ANY || cpt2 == CFS_CPT_ANY) + return cptab->ctb_distance; + + return cptab->ctb_parts[cpt1].cpt_distance[cpt2]; +} +EXPORT_SYMBOL(cfs_cpt_distance); + int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:53 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:53 -0400 Subject: [lustre-devel] [PATCH 11/25] staging: lustre: libcfs: invert error handling for cfs_cpt_table_print In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-12-git-send-email-jsimmons@infradead.org> From: Amir Shehata Instead of setting rc to -EFBIG for several cases in the loop lets initialize rc to -EFBIG and just break out of the loop in case of failure. Just set rc to zero once we successfully finish the loop. Signed-off-by: Amir Shehata Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 Reviewed-on: http://review.whamcloud.com/18916 Reviewed-by: Olaf Weber Reviewed-by: Doug Oucharek Signed-off-by: James Simmons --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index bbf89b8..6d8dcd3 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -158,29 +158,26 @@ struct cfs_cpt_table * cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { char *tmp = buf; - int rc = 0; + int rc = -EFBIG; int i; int j; for (i = 0; i < cptab->ctb_nparts; i++) { - if (len > 0) { - rc = snprintf(tmp, len, "%d\t:", i); - len -= rc; - } + if (len <= 0) + goto out; + + rc = snprintf(tmp, len, "%d\t:", i); + len -= rc; - if (len <= 0) { - rc = -EFBIG; + if (len <= 0) goto out; - } tmp += rc; for_each_cpu(j, cptab->ctb_parts[i].cpt_cpumask) { - rc = snprintf(tmp, len, "%d ", j); + rc = snprintf(tmp, len, " %d", j); len -= rc; - if (len <= 0) { - rc = -EFBIG; + if (len <= 0) goto out; - } tmp += rc; } @@ -189,6 +186,7 @@ struct cfs_cpt_table * len--; } + rc = 0; out: if (rc < 0) return rc; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:09:55 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:09:55 -0400 Subject: [lustre-devel] [PATCH 13/25] staging: lustre: libcfs: use int type for CPT identification. In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-14-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Use int type for CPT identification to match the linux kernel CPU identification. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23304 Reviewed-by: James Simmons Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h | 2 +- .../staging/lustre/include/linux/libcfs/linux/linux-cpu.h | 6 +++--- drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index bda81ab..19a3489 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -108,7 +108,7 @@ static inline int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, /** * create a cfs_cpt_table with \a ncpt number of partitions */ -struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); +struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt); /** * print distance information of cpt-table */ diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index 4ac1670..b3bc4e7 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -55,17 +55,17 @@ struct cfs_cpu_partition { /* NUMA distance between CPTs */ unsigned int *cpt_distance; /* spread rotor for NUMA allocator */ - unsigned int cpt_spread_rotor; + int cpt_spread_rotor; }; /** descriptor for CPU partitions */ struct cfs_cpt_table { /* spread rotor for NUMA allocator */ - unsigned int ctb_spread_rotor; + int ctb_spread_rotor; /* maximum NUMA distance between all nodes in table */ unsigned int ctb_distance; /* # of CPU partitions */ - unsigned int ctb_nparts; + int ctb_nparts; /* partitions tables */ struct cfs_cpu_partition *ctb_parts; /* shadow HW CPU to CPU partition ID */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c index f9fcbb1..5d7d44d 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c @@ -43,7 +43,7 @@ #define CFS_CPT_DISTANCE 1 /* Arbitrary positive value */ -struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt) +struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt) { struct cfs_cpt_table *cptab; diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 5c9cdf4..1669669 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -88,7 +88,7 @@ void cfs_cpt_table_free(struct cfs_cpt_table *cptab) } EXPORT_SYMBOL(cfs_cpt_table_free); -struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt) +struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt) { struct cfs_cpt_table *cptab; int i; @@ -759,13 +759,13 @@ static int cfs_cpt_choose_ncpus(struct cfs_cpt_table *cptab, int cpt, return rc; } -#define CPT_WEIGHT_MIN 4u +#define CPT_WEIGHT_MIN 4 -static unsigned int cfs_cpt_num_estimate(void) +static int cfs_cpt_num_estimate(void) { - unsigned int nnode = num_online_nodes(); - unsigned int ncpu = num_online_cpus(); - unsigned int ncpt; + int nnode = num_online_nodes(); + int ncpu = num_online_cpus(); + int ncpt; if (ncpu <= CPT_WEIGHT_MIN) { ncpt = 1; @@ -795,7 +795,7 @@ static unsigned int cfs_cpt_num_estimate(void) /* config many CPU partitions on 32-bit system could consume * too much memory */ - ncpt = min(2U, ncpt); + ncpt = min(2, ncpt); #endif while (ncpu % ncpt) ncpt--; /* worst case is 1 */ -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:00 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:00 -0400 Subject: [lustre-devel] [PATCH 18/25] staging: lustre: libcfs: clear up failure patch in cfs_cpt_*_print In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-19-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Currently both cfs_cpt_table_print() and cfs_cpt_distance_print() handle the error path in a confusing way. Simplify it so it just returns E2BIG on failure instead of testing rc value before exiting. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index 435ee8e..c4f53ab 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -155,7 +155,7 @@ struct cfs_cpt_table *cfs_cpt_table_alloc(int ncpt) int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) { char *tmp = buf; - int rc = -EFBIG; + int rc; int i; int j; @@ -183,19 +183,17 @@ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) len--; } - rc = 0; -err: - if (rc < 0) - return rc; - return tmp - buf; + +err: + return -E2BIG; } EXPORT_SYMBOL(cfs_cpt_table_print); int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) { char *tmp = buf; - int rc = -EFBIG; + int rc; int i; int j; @@ -223,12 +221,11 @@ int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) tmp++; len--; } - rc = 0; -err: - if (rc < 0) - return rc; return tmp - buf; + +err: + return -E2BIG; } EXPORT_SYMBOL(cfs_cpt_distance_print); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:10:01 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:10:01 -0400 Subject: [lustre-devel] [PATCH 19/25] staging: lustre: libcfs: update debug messages In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523851807-16573-20-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin For cfs_cpt_bind() change the CERROR to CDEBUG. Make the debug message in cfs_cpt_table_create_pattern() more understandable. Report rc value for when cfs_cpt_create_table() fails. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23222 Reviewed-by: Amir Shehata Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index c4f53ab..32ebd0f 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -655,7 +655,8 @@ int cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt) } if (cpumask_any_and(*cpumask, cpu_online_mask) >= nr_cpu_ids) { - CERROR("No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", + CDEBUG(D_INFO, + "No online CPU found in CPU partition %d, did someone do CPU hotplug on system? You might need to reload Lustre modules to keep system working well.\n", cpt); return -EINVAL; } @@ -886,8 +887,8 @@ static struct cfs_cpt_table *cfs_cpt_table_create(int ncpt) failed_mask: free_cpumask_var(node_mask); failed: - CERROR("Failed to setup CPU-partition-table with %d CPU-partitions, online HW nodes: %d, HW cpus: %d.\n", - ncpt, num_online_nodes(), num_online_cpus()); + CERROR("Failed (rc = %d) to setup CPU partition table with %d partitions, online HW NUMA nodes: %d, HW CPU cores: %d.\n", + rc, ncpt, num_online_nodes(), num_online_cpus()); if (cptab) cfs_cpt_table_free(cptab); @@ -1002,7 +1003,7 @@ static struct cfs_cpt_table *cfs_cpt_table_create_pattern(char *pattern) bracket = strchr(str, ']'); if (!bracket) { - CERROR("missing right bracket for cpt %d, %s\n", + CERROR("Missing right bracket for partition %d, %s\n", cpt, str); goto failed; } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:50 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:50 -0400 Subject: [lustre-devel] [PATCH 01/22] staging: lustre: llite: initialize xattr->xe_namelen In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-2-git-send-email-jsimmons@infradead.org> When the allocation of xattr->xe_name was moved to kstrdup() setting xattr->xe_namelen was dropped. This field is used in several parts of the xattr cache code so it broke xattr handling. Initialize xattr->xe_namelen when allocating xattr->xe_name succeeds. Also change the debugging statement to really report the xattr name instead of its length which wasn't event being set. Fixes: b3dd8957c23a ("staging: lustre: lustre: llite: Use kstrdup" Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index 4dc799d..ef66949 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -121,10 +121,12 @@ static int ll_xattr_cache_add(struct list_head *cache, xattr->xe_name = kstrdup(xattr_name, GFP_NOFS); if (!xattr->xe_name) { - CDEBUG(D_CACHE, "failed to alloc xattr name %u\n", - xattr->xe_namelen); + CDEBUG(D_CACHE, "failed to alloc xattr name %s\n", + xattr_name); goto err_name; } + xattr->xe_namelen = strlen(xattr_name) + 1; + xattr->xe_value = kmemdup(xattr_val, xattr_val_len, GFP_NOFS); if (!xattr->xe_value) goto err_value; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:49 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:49 -0400 Subject: [lustre-devel] [PATCH 00/22] staging: lustre: llite: fix xattr handling Message-ID: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> From: James Simmons Lustre utilities and user land APIs heavly depend on special xattr handling. Sadly much of the xattr handling for lustre client has been broken for awhile. This is all the fixes needed to make xattr handling work properly with the latest kernels. Bobi Jam (3): staging: lustre: llite: break up ll_setstripe_ea function staging: lustre: llite: return from ll_adjust_lum() if lump is NULL staging: lustre: llite: eat -EEXIST on setting trusted.lov Dmitry Eremin (1): staging: lustre: llite: add support set_acl method in inode operations James Simmons (9): staging: lustre: llite: initialize xattr->xe_namelen staging: lustre: llite: fix invalid size test in ll_setstripe_ea() staging: lustre: llite: remove newline in fullname strings staging: lustre: llite: record in stats attempted removal of lma/link xattr staging: lustre: llite: cleanup posix acl xattr code staging: lustre: llite: use proper types in the xattr code staging: lustre: llite: cleanup xattr code comments staging: lustre: llite: style changes in xattr.c staging: lustre: llite: correct removexattr detection John L. Hammond (3): staging: lustre: llite: handle xattr cache refill race staging: lustre: llite: use xattr_handler name for ACLs staging: lustre: llite: remove unused parameters from md_{get,set}xattr() Niu Yawei (2): staging: lustre: llite: refactor lustre.lov xattr handling staging: lustre: llite: add simple comment about lustre.lov xattrs Robin Humble (1): staging: lustre: llite: Remove filtering of seclabel xattr Vitaly Fertman (3): staging: lustre: obd: create it_has_reply_body() staging: lustre: obd: change debug reporting in lmv_enqueue() staging: lustre: ldlm: xattr locks are lost on mdt drivers/staging/lustre/lustre/include/obd.h | 20 +- drivers/staging/lustre/lustre/include/obd_class.h | 24 +-- drivers/staging/lustre/lustre/llite/file.c | 86 ++++++-- .../staging/lustre/lustre/llite/llite_internal.h | 4 + drivers/staging/lustre/lustre/llite/namei.c | 10 +- drivers/staging/lustre/lustre/llite/xattr.c | 231 ++++++++++++--------- drivers/staging/lustre/lustre/llite/xattr_cache.c | 83 +++----- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 12 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 36 ++-- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 68 ++++-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 34 +-- 12 files changed, 364 insertions(+), 248 deletions(-) -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:52 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:52 -0400 Subject: [lustre-devel] [PATCH 03/22] staging: lustre: obd: change debug reporting in lmv_enqueue() In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-4-git-send-email-jsimmons@infradead.org> From: Vitaly Fertman Remove LL_IT2STR(it) from debug macros in lmv_enqueue(). The removal makes it possible to simplify the md_enqueue() functions. Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7433 Seagate-bug-id: MRP-3072 MRP-3137 Reviewed-on: http://review.whamcloud.com/17220 Reviewed-by: Andrew Perepechko Reviewed-by: Andriy Skulysh Tested-by: Elena V. Gryaznova Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 7be9310..e1c93cd 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1660,15 +1660,14 @@ static int lmv_create(struct obd_export *exp, struct md_op_data *op_data, struct lmv_obd *lmv = &obd->u.lmv; struct lmv_tgt_desc *tgt; - CDEBUG(D_INODE, "ENQUEUE '%s' on " DFID "\n", - LL_IT2STR(it), PFID(&op_data->op_fid1)); + CDEBUG(D_INODE, "ENQUEUE on " DFID "\n", PFID(&op_data->op_fid1)); tgt = lmv_locate_mds(lmv, op_data, &op_data->op_fid1); if (IS_ERR(tgt)) return PTR_ERR(tgt); - CDEBUG(D_INODE, "ENQUEUE '%s' on " DFID " -> mds #%u\n", - LL_IT2STR(it), PFID(&op_data->op_fid1), tgt->ltd_idx); + CDEBUG(D_INODE, "ENQUEUE on " DFID " -> mds #%u\n", + PFID(&op_data->op_fid1), tgt->ltd_idx); return md_enqueue(tgt->ltd_exp, einfo, policy, it, op_data, lockh, extra_lock_flags); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:02 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:02 -0400 Subject: [lustre-devel] [PATCH 13/22] staging: lustre: llite: remove newline in fullname strings In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-14-git-send-email-jsimmons@infradead.org> In creating the full name of a xattr a new line was added that was seen by the remote MDS server which confused it. Remove the newline. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 42a6fb4..4b1e565 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -136,7 +136,7 @@ static int xattr_type_filter(struct ll_sb_info *sbi, return -EPERM; } - fullname = kasprintf(GFP_KERNEL, "%s%s\n", handler->prefix, name); + fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name); if (!fullname) return -ENOMEM; rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), @@ -435,7 +435,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, if (handler->flags == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode)) return -ENODATA; #endif - fullname = kasprintf(GFP_KERNEL, "%s%s\n", handler->prefix, name); + fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name); if (!fullname) return -ENOMEM; rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size, -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:00 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:00 -0400 Subject: [lustre-devel] [PATCH 11/22] staging: lustre: llite: eat -EEXIST on setting trusted.lov In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-12-git-send-email-jsimmons@infradead.org> From: Bobi Jam Tools like rsync, tar, cp may copy and restore the xattrs on a file. The client previously ignored the setting of trusted.lov/lustre.lov if the layout had already been specified, to avoid causing these tools to fail for no reason. For PFL files we still need to silently eat -EEXIST on setting these attributes to avoid problems. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9484 Reviewed-on: https://review.whamcloud.com/27126 Reviewed-by: Dmitry Eremin Reviewed-by: Niu Yawei Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 56ac07e..69c5227 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -254,12 +254,20 @@ static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, lum_size = ll_lov_user_md_size(lump); if (lum_size < 0 || size < lum_size) - return 0; /* b=10667: ignore error */ + return -ERANGE; rc = ll_lov_setstripe_ea_info(inode, dentry, it_flags, lump, lum_size); - /* b=10667: rc always be 0 here for now */ - rc = 0; + /** + * b=10667: ignore -EEXIST. + * Silently eat error on setting trusted.lov/lustre.lov + * attribute for platforms that added the default option + * to copy all attributes in 'cp' command. Both rsync and + * tar --xattrs also will try to set LOVEA for existing + * files. + */ + if (rc == -EEXIST) + rc = 0; } else if (S_ISDIR(inode->i_mode)) { rc = ll_dir_setstripe(inode, lump, 0); } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:03 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:03 -0400 Subject: [lustre-devel] [PATCH 14/22] staging: lustre: llite: record in stats attempted removal of lma/link xattr In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-15-git-send-email-jsimmons@infradead.org> Keep track of attempted deletions as well as changing of the lma/link xattrs. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 4b1e565..3ab7ae0 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -296,7 +296,10 @@ static int ll_xattr_set(const struct xattr_handler *handler, return ll_setstripe_ea(dentry, (struct lov_user_md *)value, size); } else if (!strcmp(name, "lma") || !strcmp(name, "link")) { - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1); + int op_type = flags == XATTR_REPLACE ? LPROC_LL_REMOVEXATTR : + LPROC_LL_SETXATTR; + + ll_stats_ops_tally(ll_i2sbi(inode), op_type, 1); return 0; } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:55 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:55 -0400 Subject: [lustre-devel] [PATCH 06/22] staging: lustre: llite: Remove filtering of seclabel xattr In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-7-git-send-email-jsimmons@infradead.org> From: Robin Humble The security.capability xattr is used to implement File Capabilities in recent Linux versions. Capabilities are a fine grained approach to granting executables elevated privileges. eg. /bin/ping can have capabilities cap_net_admin, cap_net_raw+ep instead of being setuid root. This xattr has long been filtered out by llite, initially for stability reasons (b15587), and later over performance concerns as this xattr is read for every file with eg. 'ls --color'. Since LU-2869 xattr's are cached on clients, alleviating most performance concerns. Removing llite's filtering of the security.capability xattr enables using Lustre as a root filesystem, which is used on some large clusters. Signed-off-by: Robin Humble Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9562 Reviewed-on: https://review.whamcloud.com/27292 Reviewed-by: John L. Hammond Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 2d78432..55a19a5 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -117,11 +117,6 @@ static int xattr_type_filter(struct ll_sb_info *sbi, (handler->flags == XATTR_LUSTRE_T && !strcmp(name, "lov")))) return 0; - /* b15587: ignore security.capability xattr for now */ - if ((handler->flags == XATTR_SECURITY_T && - !strcmp(name, "capability"))) - return 0; - /* LU-549: Disable security.selinux when selinux is disabled */ if (handler->flags == XATTR_SECURITY_T && !selinux_is_enabled() && strcmp(name, "selinux") == 0) @@ -383,10 +378,6 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, if (rc) return rc; - /* b15587: ignore security.capability xattr for now */ - if ((handler->flags == XATTR_SECURITY_T && !strcmp(name, "capability"))) - return -ENODATA; - /* LU-549: Disable security.selinux when selinux is disabled */ if (handler->flags == XATTR_SECURITY_T && !selinux_is_enabled() && !strcmp(name, "selinux")) -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:07 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:07 -0400 Subject: [lustre-devel] [PATCH 18/22] staging: lustre: llite: style changes in xattr.c In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-19-git-send-email-jsimmons@infradead.org> Small style changes to match more the kernel code standard and it make it more readable. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 835d00f..d08bf1e 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -81,11 +81,10 @@ static int xattr_type_filter(struct ll_sb_info *sbi, return 0; } -static int -ll_xattr_set_common(const struct xattr_handler *handler, - struct dentry *dentry, struct inode *inode, - const char *name, const void *value, size_t size, - int flags) +static int ll_xattr_set_common(const struct xattr_handler *handler, + struct dentry *dentry, struct inode *inode, + const char *name, const void *value, size_t size, + int flags) { struct ll_sb_info *sbi = ll_i2sbi(inode); struct ptlrpc_request *req = NULL; @@ -139,9 +138,9 @@ static int xattr_type_filter(struct ll_sb_info *sbi, fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name); if (!fullname) return -ENOMEM; - rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), - valid, fullname, pv, size, 0, flags, - ll_i2suppgid(inode), &req); + + rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, fullname, + pv, size, 0, flags, ll_i2suppgid(inode), &req); kfree(fullname); if (rc) { if (rc == -EOPNOTSUPP && handler->flags == XATTR_USER_T) { @@ -307,9 +306,8 @@ static int ll_xattr_set(const struct xattr_handler *handler, flags); } -int -ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer, - size_t size, u64 valid) +int ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer, + size_t size, u64 valid) { struct ll_inode_info *lli = ll_i2info(inode); struct ll_sb_info *sbi = ll_i2sbi(inode); @@ -439,6 +437,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name); if (!fullname) return -ENOMEM; + rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size, OBD_MD_FLXATTR); kfree(fullname); @@ -562,6 +561,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) OBD_MD_FLXATTRLS); if (rc < 0) return rc; + /* * If we're being called to get the size of the xattr list * (size == 0) then just assume that a lustre.lov xattr -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:54 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:54 -0400 Subject: [lustre-devel] [PATCH 05/22] staging: lustre: llite: handle xattr cache refill race In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-6-git-send-email-jsimmons@infradead.org> From: "John L. Hammond" In ll_xattr_cache_refill() if the xattr cache was invalid (and no request was sent) then return -EAGAIN so that ll_getxattr_common() caller will fetch the xattr from the MDT. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10132 Reviewed-on: https://review.whamcloud.com/29654 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index 53dfaea..5da69ba0 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -357,7 +357,7 @@ static int ll_xattr_cache_refill(struct inode *inode) if (unlikely(!req)) { CDEBUG(D_CACHE, "cancelled by a parallel getxattr\n"); ll_intent_drop_lock(&oit); - rc = -EIO; + rc = -EAGAIN; goto err_unlock; } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:01 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:01 -0400 Subject: [lustre-devel] [PATCH 12/22] staging: lustre: llite: fix invalid size test in ll_setstripe_ea() In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-13-git-send-email-jsimmons@infradead.org> The size check at the start of ll_setstripe_ea() is only valid for a directory. Move that check to the section of code handling the S_ISDIR case. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 69c5227..42a6fb4 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -234,9 +234,6 @@ static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, struct inode *inode = d_inode(dentry); int rc = 0; - if (size != 0 && size < sizeof(struct lov_user_md)) - return -EINVAL; - /* * It is possible to set an xattr to a "" value of zero size. * For this case we are going to treat it as a removal. @@ -269,6 +266,9 @@ static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, if (rc == -EEXIST) rc = 0; } else if (S_ISDIR(inode->i_mode)) { + if (size != 0 && size < sizeof(struct lov_user_md)) + return -EINVAL; + rc = ll_dir_setstripe(inode, lump, 0); } -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:51 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:51 -0400 Subject: [lustre-devel] [PATCH 02/22] staging: lustre: obd: create it_has_reply_body() In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-3-git-send-email-jsimmons@infradead.org> From: Vitaly Fertman The lookup_intent it_op fields in many cases will be compared to the settings of IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR. Create a simple inline function for this common case. Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7433 Seagate-bug-id: MRP-3072 MRP-3137 Reviewed-on: http://review.whamcloud.com/17220 Reviewed-by: Andrew Perepechko Reviewed-by: Andriy Skulysh Tested-by: Elena V. Gryaznova Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/include/obd.h | 10 ++++++++++ drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index f1233ca..ea6056b 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -686,6 +686,16 @@ enum md_cli_flags { CLI_MIGRATE = BIT(4), }; +/** + * GETXATTR is not included as only a couple of fields in the reply body + * is filled, but not FID which is needed for common intent handling in + * mdc_finish_intent_lock() + */ +static inline bool it_has_reply_body(const struct lookup_intent *it) +{ + return it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR); +} + struct md_op_data { struct lu_fid op_fid1; /* operation fid1 (usually parent) */ struct lu_fid op_fid2; /* operation fid2 (usually child) */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 695ef44..309ead1 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -568,7 +568,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, it->it_op, it->it_disposition, it->it_status); /* We know what to expect, so we do any byte flipping required here */ - if (it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR)) { + if (it_has_reply_body(it)) { struct mdt_body *body; body = req_capsule_server_get(pill, &RMF_MDT_BODY); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:53 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:53 -0400 Subject: [lustre-devel] [PATCH 04/22] staging: lustre: ldlm: xattr locks are lost on mdt In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-5-git-send-email-jsimmons@infradead.org> From: Vitaly Fertman On the server side mdt_intent_getxattr() can return EFAULT if a buffer cannot be found, it is returned after lock_replace, where a new lock is installed into lockp. An error forces ldlm_lock_enqueue() to destroy the original lock, but ldlm_handle_enqueue0() drops the reference on the new lock. The xattr client code implied intent error is returned under a lock, which is immediately cancelled. Check if a lock obtained and cancel it properly for error cases. Note: we should support both cases for interop needs, an intent error under a lock and with a lock abort. Keep returning a lock with an intent error for interop purposes for now, to be dropped later when client will get old enough. make all intent ops to work through md_intent_lock: getxattr and layout, which should extract the intent error. Signed-off-by: Vitaly Fertman Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7433 Seagate-bug-id: MRP-3072 MRP-3137 Reviewed-on: http://review.whamcloud.com/17220 Reviewed-by: Andrew Perepechko Reviewed-by: Andriy Skulysh Tested-by: Elena V. Gryaznova Reviewed-by: John L. Hammond Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/include/obd.h | 3 +- drivers/staging/lustre/lustre/include/obd_class.h | 3 +- drivers/staging/lustre/lustre/llite/file.c | 16 ++--- drivers/staging/lustre/lustre/llite/xattr_cache.c | 75 ++++++++--------------- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 12 ++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 7 +-- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 66 ++++++++++++++------ 8 files changed, 95 insertions(+), 91 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index ea6056b..48cf7ab 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -909,8 +909,7 @@ struct md_ops { const void *, size_t, umode_t, uid_t, gid_t, cfs_cap_t, __u64, struct ptlrpc_request **); int (*enqueue)(struct obd_export *, struct ldlm_enqueue_info *, - const union ldlm_policy_data *, - struct lookup_intent *, struct md_op_data *, + const union ldlm_policy_data *, struct md_op_data *, struct lustre_handle *, __u64); int (*getattr)(struct obd_export *, struct md_op_data *, struct ptlrpc_request **); diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index 176b63e..a76f016 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -1241,7 +1241,6 @@ static inline int md_create(struct obd_export *exp, struct md_op_data *op_data, static inline int md_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, const union ldlm_policy_data *policy, - struct lookup_intent *it, struct md_op_data *op_data, struct lustre_handle *lockh, __u64 extra_lock_flags) @@ -1250,7 +1249,7 @@ static inline int md_enqueue(struct obd_export *exp, EXP_CHECK_MD_OP(exp, enqueue); EXP_MD_COUNTER_INCREMENT(exp, enqueue); - rc = MDP(exp->exp_obd, enqueue)(exp, einfo, policy, it, op_data, lockh, + rc = MDP(exp->exp_obd, enqueue)(exp, einfo, policy, op_data, lockh, extra_lock_flags); return rc; } diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index ca5faea..0026fde 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -2514,7 +2514,7 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync) PFID(ll_inode2fid(inode)), flock.l_flock.pid, flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end); - rc = md_enqueue(sbi->ll_md_exp, &einfo, &flock, NULL, op_data, &lockh, + rc = md_enqueue(sbi->ll_md_exp, &einfo, &flock, op_data, &lockh, flags); /* Restore the file lock type if not TEST lock. */ @@ -2527,7 +2527,7 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync) if (rc2 && file_lock->fl_type != F_UNLCK) { einfo.ei_mode = LCK_NL; - md_enqueue(sbi->ll_md_exp, &einfo, &flock, NULL, op_data, + md_enqueue(sbi->ll_md_exp, &einfo, &flock, op_data, &lockh, flags); rc = rc2; } @@ -3474,12 +3474,7 @@ static int ll_layout_refresh_locked(struct inode *inode) struct lookup_intent it; struct lustre_handle lockh; enum ldlm_mode mode; - struct ldlm_enqueue_info einfo = { - .ei_type = LDLM_IBITS, - .ei_mode = LCK_CR, - .ei_cb_bl = &ll_md_blocking_ast, - .ei_cb_cp = &ldlm_completion_ast, - }; + struct ptlrpc_request *req; int rc; again: @@ -3503,13 +3498,13 @@ static int ll_layout_refresh_locked(struct inode *inode) /* have to enqueue one */ memset(&it, 0, sizeof(it)); it.it_op = IT_LAYOUT; - lockh.cookie = 0ULL; LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file " DFID "(%p)", ll_get_fsname(inode->i_sb, NULL, 0), PFID(&lli->lli_fid), inode); - rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL, &it, op_data, &lockh, 0); + rc = md_intent_lock(sbi->ll_md_exp, op_data, &it, &req, + &ll_md_blocking_ast, 0); ptlrpc_req_finished(it.it_request); it.it_request = NULL; @@ -3522,6 +3517,7 @@ static int ll_layout_refresh_locked(struct inode *inode) if (rc == 0) { /* set lock data in case this is a new lock */ ll_set_lock_data(sbi->ll_md_exp, inode, &it, NULL); + lockh.cookie = it.it_lock_handle; rc = ll_layout_lock_set(&lockh, mode, inode); if (rc == -EAGAIN) goto again; diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index ef66949..53dfaea 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -272,12 +272,6 @@ static int ll_xattr_find_get_lock(struct inode *inode, struct lustre_handle lockh = { 0 }; struct md_op_data *op_data; struct ll_inode_info *lli = ll_i2info(inode); - struct ldlm_enqueue_info einfo = { - .ei_type = LDLM_IBITS, - .ei_mode = it_to_lock_mode(oit), - .ei_cb_bl = &ll_md_blocking_ast, - .ei_cb_cp = &ldlm_completion_ast, - }; struct ll_sb_info *sbi = ll_i2sbi(inode); struct obd_export *exp = sbi->ll_md_exp; int rc; @@ -308,8 +302,9 @@ static int ll_xattr_find_get_lock(struct inode *inode, op_data->op_valid = OBD_MD_FLXATTR | OBD_MD_FLXATTRLS; - rc = md_enqueue(exp, &einfo, NULL, oit, op_data, &lockh, 0); + rc = md_intent_lock(exp, op_data, oit, req, &ll_md_blocking_ast, 0); ll_finish_md_op_data(op_data); + *req = oit->it_request; if (rc < 0) { CDEBUG(D_CACHE, @@ -319,7 +314,6 @@ static int ll_xattr_find_get_lock(struct inode *inode, return rc; } - *req = oit->it_request; out: down_write(&lli->lli_xattrs_list_rwsem); mutex_unlock(&lli->lli_xattrs_enq_lock); @@ -330,16 +324,15 @@ static int ll_xattr_find_get_lock(struct inode *inode, /** * Refill the xattr cache. * - * Fetch and cache the whole of xattrs for @inode, acquiring - * a read or a write xattr lock depending on operation in @oit. - * Intent is dropped on exit unless the operation is setxattr. + * Fetch and cache the whole of xattrs for @inode, acquiring a read lock. * * \retval 0 no error occurred * \retval -EPROTO network protocol error * \retval -ENOMEM not enough memory for the cache */ -static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) +static int ll_xattr_cache_refill(struct inode *inode) { + struct lookup_intent oit = { .it_op = IT_GETXATTR }; struct ll_sb_info *sbi = ll_i2sbi(inode); struct ptlrpc_request *req = NULL; const char *xdata, *xval, *xtail, *xvtail; @@ -348,40 +341,31 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) __u32 *xsizes; int rc, i; - rc = ll_xattr_find_get_lock(inode, oit, &req); + rc = ll_xattr_find_get_lock(inode, &oit, &req); if (rc) - goto out_no_unlock; + goto err_req; /* Do we have the data at this point? */ if (ll_xattr_cache_valid(lli)) { ll_stats_ops_tally(sbi, LPROC_LL_GETXATTR_HITS, 1); + ll_intent_drop_lock(&oit); rc = 0; - goto out_maybe_drop; + goto err_req; } /* Matched but no cache? Cancelled on error by a parallel refill. */ if (unlikely(!req)) { CDEBUG(D_CACHE, "cancelled by a parallel getxattr\n"); + ll_intent_drop_lock(&oit); rc = -EIO; - goto out_maybe_drop; - } - - if (oit->it_status < 0) { - CDEBUG(D_CACHE, - "getxattr intent returned %d for fid " DFID "\n", - oit->it_status, PFID(ll_inode2fid(inode))); - rc = oit->it_status; - /* xattr data is so large that we don't want to cache it */ - if (rc == -ERANGE) - rc = -EAGAIN; - goto out_destroy; + goto err_unlock; } body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); if (!body) { CERROR("no MDT BODY in the refill xattr reply\n"); rc = -EPROTO; - goto out_destroy; + goto err_cancel; } /* do not need swab xattr data */ xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA, @@ -393,7 +377,7 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) if (!xdata || !xval || !xsizes) { CERROR("wrong setxattr reply\n"); rc = -EPROTO; - goto out_destroy; + goto err_cancel; } xtail = xdata + body->mbo_eadatasize; @@ -429,7 +413,7 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) } if (rc < 0) { ll_xattr_cache_destroy_locked(lli); - goto out_destroy; + goto err_cancel; } xdata += strlen(xdata) + 1; xval += *xsizes; @@ -439,28 +423,24 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) if (xdata != xtail || xval != xvtail) CERROR("a hole in xattr data\n"); - ll_set_lock_data(sbi->ll_md_exp, inode, oit, NULL); - - goto out_maybe_drop; -out_maybe_drop: - - ll_intent_drop_lock(oit); + ll_set_lock_data(sbi->ll_md_exp, inode, &oit, NULL); + ll_intent_drop_lock(&oit); - if (rc != 0) - up_write(&lli->lli_xattrs_list_rwsem); -out_no_unlock: ptlrpc_req_finished(req); - return rc; -out_destroy: - up_write(&lli->lli_xattrs_list_rwsem); - +err_cancel: ldlm_lock_decref_and_cancel((struct lustre_handle *) - &oit->it_lock_handle, - oit->it_lock_mode); + &oit.it_lock_handle, + oit.it_lock_mode); +err_unlock: + up_write(&lli->lli_xattrs_list_rwsem); +err_req: + if (rc == -ERANGE) + rc = -EAGAIN; - goto out_no_unlock; + ptlrpc_req_finished(req); + return rc; } /** @@ -480,7 +460,6 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) int ll_xattr_cache_get(struct inode *inode, const char *name, char *buffer, size_t size, __u64 valid) { - struct lookup_intent oit = { .it_op = IT_GETXATTR }; struct ll_inode_info *lli = ll_i2info(inode); int rc = 0; @@ -489,7 +468,7 @@ int ll_xattr_cache_get(struct inode *inode, const char *name, char *buffer, down_read(&lli->lli_xattrs_list_rwsem); if (!ll_xattr_cache_valid(lli)) { up_read(&lli->lli_xattrs_list_rwsem); - rc = ll_xattr_cache_refill(inode, &oit); + rc = ll_xattr_cache_refill(inode); if (rc) return rc; downgrade_write(&lli->lli_xattrs_list_rwsem); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index 1793c9f..1e850fd 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -447,6 +447,9 @@ static int lmv_intent_lookup(struct obd_export *exp, } } + if (!it_has_reply_body(it)) + return 0; + /* * MDS has returned success. Probably name has been resolved in * remote inode. Let's check this. @@ -483,7 +486,7 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data, (int)op_data->op_namelen, op_data->op_name, PFID(&op_data->op_fid1)); - if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT)) + if (it->it_op & (IT_LOOKUP | IT_GETATTR | IT_LAYOUT | IT_GETXATTR)) rc = lmv_intent_lookup(exp, op_data, it, reqp, cb_blocking, extra_lock_flags); else if (it->it_op & IT_OPEN) @@ -497,7 +500,8 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data, if (it->it_lock_mode) { lock_handle.cookie = it->it_lock_handle; - ldlm_lock_decref(&lock_handle, it->it_lock_mode); + ldlm_lock_decref_and_cancel(&lock_handle, + it->it_lock_mode); } it->it_lock_handle = 0; @@ -505,8 +509,8 @@ int lmv_intent_lock(struct obd_export *exp, struct md_op_data *op_data, if (it->it_remote_lock_mode) { lock_handle.cookie = it->it_remote_lock_handle; - ldlm_lock_decref(&lock_handle, - it->it_remote_lock_mode); + ldlm_lock_decref_and_cancel(&lock_handle, + it->it_remote_lock_mode); } it->it_remote_lock_handle = 0; diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index e1c93cd..7198a63 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1652,8 +1652,7 @@ static int lmv_create(struct obd_export *exp, struct md_op_data *op_data, static int lmv_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, - const union ldlm_policy_data *policy, - struct lookup_intent *it, struct md_op_data *op_data, + const union ldlm_policy_data *policy, struct md_op_data *op_data, struct lustre_handle *lockh, __u64 extra_lock_flags) { struct obd_device *obd = exp->exp_obd; @@ -1669,8 +1668,8 @@ static int lmv_create(struct obd_export *exp, struct md_op_data *op_data, CDEBUG(D_INODE, "ENQUEUE on " DFID " -> mds #%u\n", PFID(&op_data->op_fid1), tgt->ltd_idx); - return md_enqueue(tgt->ltd_exp, einfo, policy, it, op_data, lockh, - extra_lock_flags); + return md_enqueue(tgt->ltd_exp, einfo, policy, op_data, lockh, + extra_lock_flags); } static int diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h b/drivers/staging/lustre/lustre/mdc/mdc_internal.h index e0300c3..88ee3271 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h +++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h @@ -77,8 +77,8 @@ int mdc_intent_lock(struct obd_export *exp, int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, const union ldlm_policy_data *policy, - struct lookup_intent *it, struct md_op_data *op_data, - struct lustre_handle *lockh, __u64 extra_lock_flags); + struct md_op_data *op_data, + struct lustre_handle *lockh, u64 extra_lock_flags); int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid, struct list_head *cancels, enum ldlm_mode mode, diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 309ead1..253a545 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -688,10 +688,10 @@ static int mdc_finish_enqueue(struct obd_export *exp, /* We always reserve enough space in the reply packet for a stripe MD, because * we don't know in advance the file type. */ -int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, - const union ldlm_policy_data *policy, - struct lookup_intent *it, struct md_op_data *op_data, - struct lustre_handle *lockh, u64 extra_lock_flags) +int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo, + const union ldlm_policy_data *policy, + struct lookup_intent *it, struct md_op_data *op_data, + struct lustre_handle *lockh, u64 extra_lock_flags) { static const union ldlm_policy_data lookup_policy = { .l_inodebits = { MDS_INODELOCK_LOOKUP } @@ -859,6 +859,15 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, return rc; } +int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, + const union ldlm_policy_data *policy, + struct md_op_data *op_data, + struct lustre_handle *lockh, u64 extra_lock_flags) +{ + return mdc_enqueue_base(exp, einfo, policy, NULL, + op_data, lockh, extra_lock_flags); +} + static int mdc_finish_intent_lock(struct obd_export *exp, struct ptlrpc_request *request, struct md_op_data *op_data, @@ -866,9 +875,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp, struct lustre_handle *lockh) { struct lustre_handle old_lock; - struct mdt_body *mdt_body; struct ldlm_lock *lock; - int rc; + int rc = 0; LASSERT(request != LP_POISON); LASSERT(request->rq_repmsg != LP_POISON); @@ -876,23 +884,30 @@ static int mdc_finish_intent_lock(struct obd_export *exp, if (it->it_op & IT_READDIR) return 0; + if (it->it_op & (IT_GETXATTR | IT_LAYOUT)) { + if (it->it_status != 0) { + rc = it->it_status; + goto out; + } + goto matching_lock; + } + if (!it_disposition(it, DISP_IT_EXECD)) { /* The server failed before it even started executing the * intent, i.e. because it couldn't unpack the request. */ LASSERT(it->it_status != 0); - return it->it_status; + rc = it->it_status; + goto out; } + rc = it_open_error(DISP_IT_EXECD, it); if (rc) - return rc; - - mdt_body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY); - LASSERT(mdt_body); /* mdc_enqueue checked */ + goto out; rc = it_open_error(DISP_LOOKUP_EXECD, it); if (rc) - return rc; + goto out; /* keep requests around for the multiple phases of the call * this shows the DISP_XX must guarantee we make it into the call @@ -918,8 +933,9 @@ static int mdc_finish_intent_lock(struct obd_export *exp, else if (it->it_op == IT_OPEN) LASSERT(!it_disposition(it, DISP_OPEN_CREATE)); else - LASSERT(it->it_op & (IT_GETATTR | IT_LOOKUP | IT_LAYOUT)); + LASSERT(it->it_op & (IT_GETATTR | IT_LOOKUP)); +matching_lock: /* If we already have a matching lock, then cancel the new * one. We have to set the data here instead of in * mdc_enqueue, because we need to use the child's inode as @@ -932,10 +948,20 @@ static int mdc_finish_intent_lock(struct obd_export *exp, LDLM_DEBUG(lock, "matching against this"); - LASSERTF(fid_res_name_eq(&mdt_body->mbo_fid1, - &lock->l_resource->lr_name), - "Lock res_id: " DLDLMRES ", fid: " DFID "\n", - PLDLMRES(lock->l_resource), PFID(&mdt_body->mbo_fid1)); + if (it_has_reply_body(it)) { + struct mdt_body *body; + + body = req_capsule_server_get(&request->rq_pill, + &RMF_MDT_BODY); + + /* mdc_enqueue checked */ + LASSERT(body); + LASSERTF(fid_res_name_eq(&body->mbo_fid1, + &lock->l_resource->lr_name), + "Lock res_id: " DLDLMRES ", fid: " DFID "\n", + PLDLMRES(lock->l_resource), + PFID(&body->mbo_fid1)); + } LDLM_LOCK_PUT(lock); memcpy(&old_lock, lockh, sizeof(*lockh)); @@ -948,6 +974,7 @@ static int mdc_finish_intent_lock(struct obd_export *exp, it->it_lock_handle = lockh->cookie; } } +out: CDEBUG(D_DENTRY, "D_IT dentry %.*s intent: %s status %d disp %x rc %d\n", (int)op_data->op_namelen, op_data->op_name, @@ -1094,8 +1121,9 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, return rc; } } - rc = mdc_enqueue(exp, &einfo, NULL, it, op_data, &lockh, - extra_lock_flags); + + rc = mdc_enqueue_base(exp, &einfo, NULL, it, op_data, &lockh, + extra_lock_flags); if (rc < 0) return rc; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:04 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:04 -0400 Subject: [lustre-devel] [PATCH 15/22] staging: lustre: llite: cleanup posix acl xattr code In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-16-git-send-email-jsimmons@infradead.org> Having an extra ifdef makes the code harder to read. For the case of ll_xattr_get_common() we have a variable initialized at the start of the function but it is only used in XATTR_ACL_ACCESS_T code block. Lets move that variable to that location since its only used there and make the code look cleaner. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 3ab7ae0..147ffcc 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -396,9 +396,6 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, const char *name, void *buffer, size_t size) { struct ll_sb_info *sbi = ll_i2sbi(inode); -#ifdef CONFIG_FS_POSIX_ACL - struct ll_inode_info *lli = ll_i2info(inode); -#endif char *fullname; int rc; @@ -422,6 +419,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, * chance that cached ACL is uptodate. */ if (handler->flags == XATTR_ACL_ACCESS_T) { + struct ll_inode_info *lli = ll_i2info(inode); struct posix_acl *acl; spin_lock(&lli->lli_lock); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:10 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:10 -0400 Subject: [lustre-devel] [PATCH 21/22] staging: lustre: llite: correct removexattr detection In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-22-git-send-email-jsimmons@infradead.org> In ll_xattr_set_common() detect the removexattr() case correctly by testing for a NULL value as well as XATTR_REPLACE. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10787 Reviewed-on: https://review.whamcloud.com/ Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index e835c8e..1a597a6 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -94,7 +94,11 @@ static int ll_xattr_set_common(const struct xattr_handler *handler, u64 valid; int rc; - if (flags == XATTR_REPLACE) { + /* When setxattr() is called with a size of 0 the value is + * unconditionally replaced by "". When removexattr() is + * called we get a NULL value and XATTR_REPLACE for flags. + */ + if (!value && flags == XATTR_REPLACE) { ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1); valid = OBD_MD_FLXATTRRM; } else { -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:06 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:06 -0400 Subject: [lustre-devel] [PATCH 17/22] staging: lustre: llite: cleanup xattr code comments In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-18-git-send-email-jsimmons@infradead.org> Add proper punctuation to the comments. Change buf_size to size for comment in ll_listxattr() since buf_size doesn't exit which will confuse someone reading the code. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index d6cee3b..835d00f 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -564,7 +564,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) return rc; /* * If we're being called to get the size of the xattr list - * (buf_size == 0) then just assume that a lustre.lov xattr + * (size == 0) then just assume that a lustre.lov xattr * exists. */ if (!size) @@ -577,14 +577,14 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) len = strnlen(xattr_name, rem - 1) + 1; rem -= len; if (!xattr_type_filter(sbi, get_xattr_type(xattr_name))) { - /* Skip OK xattr type leave it in buffer */ + /* Skip OK xattr type, leave it in buffer. */ xattr_name += len; continue; } /* * Move up remaining xattrs in buffer - * removing the xattr that is not OK + * removing the xattr that is not OK. */ memmove(xattr_name, xattr_name + len, rem); rc -= len; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:09 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:09 -0400 Subject: [lustre-devel] [PATCH 20/22] staging: lustre: llite: use xattr_handler name for ACLs In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-21-git-send-email-jsimmons@infradead.org> From: "John L. Hammond" If struct xattr_handler has a name member then use it (rather than prefix) for the ACL xattrs. This avoids a bug where ACL operations failed for some kernels. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10785 Reviewed-on: https://review.whamcloud.com/ Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index d08bf1e..e835c8e 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -46,15 +46,16 @@ const struct xattr_handler *get_xattr_type(const char *name) { - int i = 0; + int i; - while (ll_xattr_handlers[i]) { - size_t len = strlen(ll_xattr_handlers[i]->prefix); + for (i = 0; ll_xattr_handlers[i]; i++) { + const char *prefix = xattr_prefix(ll_xattr_handlers[i]); + size_t prefix_len = strlen(prefix); - if (!strncmp(ll_xattr_handlers[i]->prefix, name, len)) + if (!strncmp(prefix, name, prefix_len)) return ll_xattr_handlers[i]; - i++; } + return NULL; } @@ -627,14 +628,14 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) }; static const struct xattr_handler ll_acl_access_xattr_handler = { - .prefix = XATTR_NAME_POSIX_ACL_ACCESS, + .name = XATTR_NAME_POSIX_ACL_ACCESS, .flags = XATTR_ACL_ACCESS_T, .get = ll_xattr_get_common, .set = ll_xattr_set_common, }; static const struct xattr_handler ll_acl_default_xattr_handler = { - .prefix = XATTR_NAME_POSIX_ACL_DEFAULT, + .name = XATTR_NAME_POSIX_ACL_DEFAULT, .flags = XATTR_ACL_DEFAULT_T, .get = ll_xattr_get_common, .set = ll_xattr_set_common, -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:56 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:56 -0400 Subject: [lustre-devel] [PATCH 07/22] staging: lustre: llite: refactor lustre.lov xattr handling In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-8-git-send-email-jsimmons@infradead.org> From: Niu Yawei The function ll_xattr_set() contains special code to handle the lustre specific xattr lustre.lov. Move all this code to a new function ll_setstripe_ea(). Signed-off-by: Bobi Jam Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8998 Reviewed-on: https://review.whamcloud.com/24851 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Jinshan Xiong Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 131 +++++++++++++++------------- 1 file changed, 69 insertions(+), 62 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 55a19a5..1b462e4 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -186,6 +186,73 @@ static int get_hsm_state(struct inode *inode, u32 *hus_states) return rc; } +static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, + size_t size) +{ + struct inode *inode = d_inode(dentry); + int rc = 0; + + if (size != 0 && size < sizeof(struct lov_user_md)) + return -EINVAL; + + /* + * It is possible to set an xattr to a "" value of zero size. + * For this case we are going to treat it as a removal. + */ + if (!size && lump) + lump = NULL; + + /* Attributes that are saved via getxattr will always have + * the stripe_offset as 0. Instead, the MDS should be + * allowed to pick the starting OST index. b=17846 + */ + if (lump && lump->lmm_stripe_offset == 0) + lump->lmm_stripe_offset = -1; + + /* Avoid anyone directly setting the RELEASED flag. */ + if (lump && (lump->lmm_pattern & LOV_PATTERN_F_RELEASED)) { + /* Only if we have a released flag check if the file + * was indeed archived. + */ + u32 state = HS_NONE; + + rc = get_hsm_state(inode, &state); + if (rc) + return rc; + + if (!(state & HS_ARCHIVED)) { + CDEBUG(D_VFSTRACE, + "hus_states state = %x, pattern = %x\n", + state, lump->lmm_pattern); + /* + * Here the state is: real file is not + * archived but user is requesting to set + * the RELEASED flag so we mask off the + * released flag from the request + */ + lump->lmm_pattern ^= LOV_PATTERN_F_RELEASED; + } + } + + if (lump && S_ISREG(inode->i_mode)) { + __u64 it_flags = FMODE_WRITE; + int lum_size; + + lum_size = ll_lov_user_md_size(lump); + if (lum_size < 0 || size < lum_size) + return 0; /* b=10667: ignore error */ + + rc = ll_lov_setstripe_ea_info(inode, dentry, it_flags, lump, + lum_size); + /* b=10667: rc always be 0 here for now */ + rc = 0; + } else if (S_ISDIR(inode->i_mode)) { + rc = ll_dir_setstripe(inode, lump, 0); + } + + return rc; +} + static int ll_xattr_set(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode, const char *name, const void *value, size_t size, @@ -198,73 +265,13 @@ static int ll_xattr_set(const struct xattr_handler *handler, PFID(ll_inode2fid(inode)), inode, name); if (!strcmp(name, "lov")) { - struct lov_user_md *lump = (struct lov_user_md *)value; int op_type = flags == XATTR_REPLACE ? LPROC_LL_REMOVEXATTR : LPROC_LL_SETXATTR; - int rc = 0; ll_stats_ops_tally(ll_i2sbi(inode), op_type, 1); - if (size != 0 && size < sizeof(struct lov_user_md)) - return -EINVAL; - - /* - * It is possible to set an xattr to a "" value of zero size. - * For this case we are going to treat it as a removal. - */ - if (!size && lump) - lump = NULL; - - /* Attributes that are saved via getxattr will always have - * the stripe_offset as 0. Instead, the MDS should be - * allowed to pick the starting OST index. b=17846 - */ - if (lump && lump->lmm_stripe_offset == 0) - lump->lmm_stripe_offset = -1; - - /* Avoid anyone directly setting the RELEASED flag. */ - if (lump && (lump->lmm_pattern & LOV_PATTERN_F_RELEASED)) { - /* Only if we have a released flag check if the file - * was indeed archived. - */ - u32 state = HS_NONE; - - rc = get_hsm_state(inode, &state); - if (rc) - return rc; - - if (!(state & HS_ARCHIVED)) { - CDEBUG(D_VFSTRACE, - "hus_states state = %x, pattern = %x\n", - state, lump->lmm_pattern); - /* - * Here the state is: real file is not - * archived but user is requesting to set - * the RELEASED flag so we mask off the - * released flag from the request - */ - lump->lmm_pattern ^= LOV_PATTERN_F_RELEASED; - } - } - - if (lump && S_ISREG(inode->i_mode)) { - __u64 it_flags = FMODE_WRITE; - int lum_size; - - lum_size = ll_lov_user_md_size(lump); - if (lum_size < 0 || size < lum_size) - return 0; /* b=10667: ignore error */ - - rc = ll_lov_setstripe_ea_info(inode, dentry, it_flags, - lump, lum_size); - /* b=10667: rc always be 0 here for now */ - rc = 0; - } else if (S_ISDIR(inode->i_mode)) { - rc = ll_dir_setstripe(inode, lump, 0); - } - - return rc; - + return ll_setstripe_ea(dentry, (struct lov_user_md *)value, + size); } else if (!strcmp(name, "lma") || !strcmp(name, "link")) { ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1); return 0; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:58 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:58 -0400 Subject: [lustre-devel] [PATCH 09/22] staging: lustre: llite: break up ll_setstripe_ea function In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-10-git-send-email-jsimmons@infradead.org> From: Bobi Jam Place all the handling of information of trusted.lov that is not stripe related into the new function ll_adjust_lum(). Now ll_setstripe_ea() only handles striping information. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9484 Reviewed-on: https://review.whamcloud.com/27126 Reviewed-by: Dmitry Eremin Reviewed-by: Niu Yawei Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 37 +++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index c1600b9..78ce85b 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -186,22 +186,10 @@ static int get_hsm_state(struct inode *inode, u32 *hus_states) return rc; } -static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, - size_t size) +static int ll_adjust_lum(struct inode *inode, struct lov_user_md *lump) { - struct inode *inode = d_inode(dentry); int rc = 0; - if (size != 0 && size < sizeof(struct lov_user_md)) - return -EINVAL; - - /* - * It is possible to set an xattr to a "" value of zero size. - * For this case we are going to treat it as a removal. - */ - if (!size && lump) - lump = NULL; - /* Attributes that are saved via getxattr will always have * the stripe_offset as 0. Instead, the MDS should be * allowed to pick the starting OST index. b=17846 @@ -234,6 +222,29 @@ static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, } } + return rc; +} + +static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, + size_t size) +{ + struct inode *inode = d_inode(dentry); + int rc = 0; + + if (size != 0 && size < sizeof(struct lov_user_md)) + return -EINVAL; + + /* + * It is possible to set an xattr to a "" value of zero size. + * For this case we are going to treat it as a removal. + */ + if (!size && lump) + lump = NULL; + + rc = ll_adjust_lum(inode, lump); + if (rc) + return rc; + if (lump && S_ISREG(inode->i_mode)) { __u64 it_flags = FMODE_WRITE; int lum_size; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:57 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:57 -0400 Subject: [lustre-devel] [PATCH 08/22] staging: lustre: llite: add simple comment about lustre.lov xattrs In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-9-git-send-email-jsimmons@infradead.org> From: Niu Yawei Simple comment added to ll_xattr_set. Signed-off-by: Bobi Jam Signed-off-by: Niu Yawei Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8998 Reviewed-on: https://review.whamcloud.com/24851 Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Jinshan Xiong Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 1b462e4..c1600b9 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -264,6 +264,7 @@ static int ll_xattr_set(const struct xattr_handler *handler, CDEBUG(D_VFSTRACE, "VFS Op:inode=" DFID "(%p), xattr %s\n", PFID(ll_inode2fid(inode)), inode, name); + /* lustre/trusted.lov.xxx would be passed through xattr API */ if (!strcmp(name, "lov")) { int op_type = flags == XATTR_REPLACE ? LPROC_LL_REMOVEXATTR : LPROC_LL_SETXATTR; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:14:59 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:14:59 -0400 Subject: [lustre-devel] [PATCH 10/22] staging: lustre: llite: return from ll_adjust_lum() if lump is NULL In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-11-git-send-email-jsimmons@infradead.org> From: Bobi Jam No need to check several times if lump is NULL. Just test once and return 0 if NULL. Signed-off-by: Bobi Jam Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9484 Reviewed-on: https://review.whamcloud.com/27126 Reviewed-by: Dmitry Eremin Reviewed-by: Niu Yawei Reviewed-by: James Simmons Reviewed-by: Andreas Dilger Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 78ce85b..56ac07e 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -190,15 +190,18 @@ static int ll_adjust_lum(struct inode *inode, struct lov_user_md *lump) { int rc = 0; + if (!lump) + return 0; + /* Attributes that are saved via getxattr will always have * the stripe_offset as 0. Instead, the MDS should be * allowed to pick the starting OST index. b=17846 */ - if (lump && lump->lmm_stripe_offset == 0) + if (lump->lmm_stripe_offset == 0) lump->lmm_stripe_offset = -1; /* Avoid anyone directly setting the RELEASED flag. */ - if (lump && (lump->lmm_pattern & LOV_PATTERN_F_RELEASED)) { + if (lump->lmm_pattern & LOV_PATTERN_F_RELEASED) { /* Only if we have a released flag check if the file * was indeed archived. */ -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:05 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:05 -0400 Subject: [lustre-devel] [PATCH 16/22] staging: lustre: llite: use proper types in the xattr code In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-17-git-send-email-jsimmons@infradead.org> Convert __uXX types to uXX types since this is kernel code. The function ll_lov_user_md_size() returns ssize_t so change lum_size from int to ssize_t. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin Reviewed-by: Bob Glossman Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 147ffcc..d6cee3b 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -91,7 +91,7 @@ static int xattr_type_filter(struct ll_sb_info *sbi, struct ptlrpc_request *req = NULL; const char *pv = value; char *fullname; - __u64 valid; + u64 valid; int rc; if (flags == XATTR_REPLACE) { @@ -246,8 +246,8 @@ static int ll_setstripe_ea(struct dentry *dentry, struct lov_user_md *lump, return rc; if (lump && S_ISREG(inode->i_mode)) { - __u64 it_flags = FMODE_WRITE; - int lum_size; + u64 it_flags = FMODE_WRITE; + ssize_t lum_size; lum_size = ll_lov_user_md_size(lump); if (lum_size < 0 || size < lum_size) @@ -309,7 +309,7 @@ static int ll_xattr_set(const struct xattr_handler *handler, int ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer, - size_t size, __u64 valid) + size_t size, u64 valid) { struct ll_inode_info *lli = ll_i2info(inode); struct ll_sb_info *sbi = ll_i2sbi(inode); -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:08 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:08 -0400 Subject: [lustre-devel] [PATCH 19/22] staging: lustre: llite: add support set_acl method in inode operations In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-20-git-send-email-jsimmons@infradead.org> From: Dmitry Eremin Linux kernel v3.14 adds set_acl method to inode operations. This patch adds support to Lustre for proper acl management. Signed-off-by: Dmitry Eremin Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/25965 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10541 Reviewed-on: https://review.whamcloud.com/ Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/file.c | 67 ++++++++++++++++++++++ .../staging/lustre/lustre/llite/llite_internal.h | 4 ++ drivers/staging/lustre/lustre/llite/namei.c | 10 +++- 3 files changed, 79 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 0026fde..35f5bda 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -3030,6 +3030,7 @@ static int ll_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, return rc; } +#ifdef CONFIG_FS_POSIX_ACL struct posix_acl *ll_get_acl(struct inode *inode, int type) { struct ll_inode_info *lli = ll_i2info(inode); @@ -3043,6 +3044,69 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type) return acl; } +int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type) +{ + struct ll_sb_info *sbi = ll_i2sbi(inode); + struct ptlrpc_request *req = NULL; + const char *name = NULL; + size_t value_size = 0; + char *value = NULL; + int rc; + + switch (type) { + case ACL_TYPE_ACCESS: + name = XATTR_NAME_POSIX_ACL_ACCESS; + if (acl) { + rc = posix_acl_update_mode(inode, &inode->i_mode, &acl); + if (rc) + goto out; + } + + break; + + case ACL_TYPE_DEFAULT: + name = XATTR_NAME_POSIX_ACL_DEFAULT; + if (!S_ISDIR(inode->i_mode)) { + rc = acl ? -EACCES : 0; + goto out; + } + + break; + + default: + rc = -EINVAL; + goto out; + } + + if (acl) { + value_size = posix_acl_xattr_size(acl->a_count); + value = kmalloc(value_size, GFP_NOFS); + if (!value) { + rc = -ENOMEM; + goto out; + } + + rc = posix_acl_to_xattr(&init_user_ns, acl, value, value_size); + if (rc < 0) + goto out_value; + } + + rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), + value ? OBD_MD_FLXATTR : OBD_MD_FLXATTRRM, + name, value, value_size, 0, 0, 0, &req); + + ptlrpc_req_finished(req); +out_value: + kfree(value); +out: + if (!rc) + set_cached_acl(inode, type, acl); + else + forget_cached_acl(inode, type); + return rc; +} +#endif /* CONFIG_FS_POSIX_ACL */ + int ll_inode_permission(struct inode *inode, int mask) { struct ll_sb_info *sbi; @@ -3164,7 +3228,10 @@ int ll_inode_permission(struct inode *inode, int mask) .permission = ll_inode_permission, .listxattr = ll_listxattr, .fiemap = ll_fiemap, +#ifdef CONFIG_FS_POSIX_ACL .get_acl = ll_get_acl, + .set_acl = ll_set_acl, +#endif }; /* dynamic ioctl number support routines */ diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 6504850..2280327 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -754,7 +754,11 @@ enum ldlm_mode ll_take_md_lock(struct inode *inode, __u64 bits, int ll_md_real_close(struct inode *inode, fmode_t fmode); int ll_getattr(const struct path *path, struct kstat *stat, u32 request_mask, unsigned int flags); +#ifdef CONFIG_FS_POSIX_ACL struct posix_acl *ll_get_acl(struct inode *inode, int type); +int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type); +#endif /* CONFIG_FS_POSIX_ACL */ + int ll_migrate(struct inode *parent, struct file *file, int mdtidx, const char *name, int namelen); int ll_get_fid_by_name(struct inode *parent, const char *name, diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 6c9ec46..d7c4c58 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -1190,7 +1190,10 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild, .getattr = ll_getattr, .permission = ll_inode_permission, .listxattr = ll_listxattr, - .get_acl = ll_get_acl, +#ifdef CONFIG_FS_POSIX_ACL + .get_acl = ll_get_acl, + .set_acl = ll_set_acl, +#endif }; const struct inode_operations ll_special_inode_operations = { @@ -1198,5 +1201,8 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild, .getattr = ll_getattr, .permission = ll_inode_permission, .listxattr = ll_listxattr, - .get_acl = ll_get_acl, +#ifdef CONFIG_FS_POSIX_ACL + .get_acl = ll_get_acl, + .set_acl = ll_set_acl, +#endif }; -- 1.8.3.1 From jsimmons at infradead.org Mon Apr 16 04:15:11 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 00:15:11 -0400 Subject: [lustre-devel] [PATCH 22/22] staging: lustre: llite: remove unused parameters from md_{get, set}xattr() In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <1523852111-17321-23-git-send-email-jsimmons@infradead.org> From: "John L. Hammond" md_getxattr() and md_setxattr() each have several unused parameters. Remove them and improve the naming or remaining parameters. Signed-off-by: John L. Hammond Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-10792 Reviewed-on: https://review.whamcloud.com/ Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/include/obd.h | 7 ++--- drivers/staging/lustre/lustre/include/obd_class.h | 21 ++++++-------- drivers/staging/lustre/lustre/llite/file.c | 5 ++-- drivers/staging/lustre/lustre/llite/xattr.c | 6 ++-- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 22 +++++++-------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 34 +++++++++++++---------- 6 files changed, 46 insertions(+), 49 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 48cf7ab..0f9e5dc 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -935,12 +935,11 @@ struct md_ops { struct ptlrpc_request **); int (*setxattr)(struct obd_export *, const struct lu_fid *, - u64, const char *, const char *, int, int, int, __u32, - struct ptlrpc_request **); + u64, const char *, const void *, size_t, unsigned int, + u32, struct ptlrpc_request **); int (*getxattr)(struct obd_export *, const struct lu_fid *, - u64, const char *, const char *, int, int, int, - struct ptlrpc_request **); + u64, const char *, size_t, struct ptlrpc_request **); int (*init_ea_size)(struct obd_export *, u32, u32); diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index a76f016..0081578 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -1385,29 +1385,26 @@ static inline int md_merge_attr(struct obd_export *exp, } static inline int md_setxattr(struct obd_export *exp, const struct lu_fid *fid, - u64 valid, const char *name, - const char *input, int input_size, - int output_size, int flags, __u32 suppgid, + u64 obd_md_valid, const char *name, + const char *value, size_t value_size, + unsigned int xattr_flags, u32 suppgid, struct ptlrpc_request **request) { EXP_CHECK_MD_OP(exp, setxattr); EXP_MD_COUNTER_INCREMENT(exp, setxattr); - return MDP(exp->exp_obd, setxattr)(exp, fid, valid, name, input, - input_size, output_size, flags, + return MDP(exp->exp_obd, setxattr)(exp, fid, obd_md_valid, name, + value, value_size, xattr_flags, suppgid, request); } static inline int md_getxattr(struct obd_export *exp, const struct lu_fid *fid, - u64 valid, const char *name, - const char *input, int input_size, - int output_size, int flags, - struct ptlrpc_request **request) + u64 obd_md_valid, const char *name, + size_t buf_size, struct ptlrpc_request **req) { EXP_CHECK_MD_OP(exp, getxattr); EXP_MD_COUNTER_INCREMENT(exp, getxattr); - return MDP(exp->exp_obd, getxattr)(exp, fid, valid, name, input, - input_size, output_size, flags, - request); + return MDP(exp->exp_obd, getxattr)(exp, fid, obd_md_valid, name, + buf_size, req); } static inline int md_set_open_replay_data(struct obd_export *exp, diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 35f5bda..9197891 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -3093,7 +3093,7 @@ int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type) rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), value ? OBD_MD_FLXATTR : OBD_MD_FLXATTRRM, - name, value, value_size, 0, 0, 0, &req); + name, value, value_size, 0, 0, &req); ptlrpc_req_finished(req); out_value: @@ -3405,8 +3405,7 @@ static int ll_layout_fetch(struct inode *inode, struct ldlm_lock *lock) rc = ll_get_default_mdsize(sbi, &lmmsize); if (rc == 0) rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), - OBD_MD_FLXATTR, XATTR_NAME_LOV, NULL, 0, - lmmsize, 0, &req); + OBD_MD_FLXATTR, XATTR_NAME_LOV, lmmsize, &req); if (rc < 0) return rc; diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 1a597a6..7fa0a41 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -145,7 +145,7 @@ static int ll_xattr_set_common(const struct xattr_handler *handler, return -ENOMEM; rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, fullname, - pv, size, 0, flags, ll_i2suppgid(inode), &req); + pv, size, flags, ll_i2suppgid(inode), &req); kfree(fullname); if (rc) { if (rc == -EOPNOTSUPP && handler->flags == XATTR_USER_T) { @@ -344,8 +344,8 @@ int ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer, } } else { getxattr_nocache: - rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), - valid, name, NULL, 0, size, 0, &req); + rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, + name, size, &req); if (rc < 0) goto out_xattr; diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 7198a63..1ec42e2 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1398,9 +1398,8 @@ static int lmv_getstatus(struct obd_export *exp, } static int lmv_getxattr(struct obd_export *exp, const struct lu_fid *fid, - u64 valid, const char *name, - const char *input, int input_size, int output_size, - int flags, struct ptlrpc_request **request) + u64 obd_md_valid, const char *name, size_t buf_size, + struct ptlrpc_request **req) { struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; @@ -1410,15 +1409,15 @@ static int lmv_getxattr(struct obd_export *exp, const struct lu_fid *fid, if (IS_ERR(tgt)) return PTR_ERR(tgt); - return md_getxattr(tgt->ltd_exp, fid, valid, name, input, - input_size, output_size, flags, request); + return md_getxattr(tgt->ltd_exp, fid, obd_md_valid, name, buf_size, + req); } static int lmv_setxattr(struct obd_export *exp, const struct lu_fid *fid, - u64 valid, const char *name, - const char *input, int input_size, int output_size, - int flags, __u32 suppgid, - struct ptlrpc_request **request) + u64 obd_md_valid, const char *name, + const void *value, size_t value_size, + unsigned int xattr_flags, u32 suppgid, + struct ptlrpc_request **req) { struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; @@ -1428,9 +1427,8 @@ static int lmv_setxattr(struct obd_export *exp, const struct lu_fid *fid, if (IS_ERR(tgt)) return PTR_ERR(tgt); - return md_setxattr(tgt->ltd_exp, fid, valid, name, input, - input_size, output_size, flags, suppgid, - request); + return md_setxattr(tgt->ltd_exp, fid, obd_md_valid, name, + value, value_size, xattr_flags, suppgid, req); } static int lmv_getattr(struct obd_export *exp, struct md_op_data *op_data, diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 266fa90..6e339c3 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -347,26 +347,30 @@ static int mdc_xattr_common(struct obd_export *exp, } static int mdc_setxattr(struct obd_export *exp, const struct lu_fid *fid, - u64 valid, const char *xattr_name, - const char *input, int input_size, int output_size, - int flags, __u32 suppgid, - struct ptlrpc_request **request) + u64 obd_md_valid, const char *name, + const void *value, size_t value_size, + unsigned int xattr_flags, u32 suppgid, + struct ptlrpc_request **req) { + LASSERT(obd_md_valid == OBD_MD_FLXATTR || + obd_md_valid == OBD_MD_FLXATTRRM); + return mdc_xattr_common(exp, &RQF_MDS_REINT_SETXATTR, - fid, MDS_REINT, valid, xattr_name, - input, input_size, output_size, flags, - suppgid, request); + fid, MDS_REINT, obd_md_valid, name, + value, value_size, 0, xattr_flags, suppgid, + req); } static int mdc_getxattr(struct obd_export *exp, const struct lu_fid *fid, - u64 valid, const char *xattr_name, - const char *input, int input_size, int output_size, - int flags, struct ptlrpc_request **request) -{ - return mdc_xattr_common(exp, &RQF_MDS_GETXATTR, - fid, MDS_GETXATTR, valid, xattr_name, - input, input_size, output_size, flags, - -1, request); + u64 obd_md_valid, const char *name, size_t buf_size, + struct ptlrpc_request **req) +{ + LASSERT(obd_md_valid == OBD_MD_FLXATTR || + obd_md_valid == OBD_MD_FLXATTRLS); + + return mdc_xattr_common(exp, &RQF_MDS_GETXATTR, fid, MDS_GETXATTR, + obd_md_valid, name, NULL, 0, buf_size, 0, -1, + req); } #ifdef CONFIG_FS_POSIX_ACL -- 1.8.3.1 From dan.carpenter at oracle.com Mon Apr 16 13:42:03 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Mon, 16 Apr 2018 16:42:03 +0300 Subject: [lustre-devel] [PATCH 01/25] staging: lustre: libcfs: remove useless CPU partition code In-Reply-To: <1523851807-16573-2-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-2-git-send-email-jsimmons@infradead.org> Message-ID: <20180416134203.ehtebtyes34p2tsm@mwanda> On Mon, Apr 16, 2018 at 12:09:43AM -0400, James Simmons wrote: > @@ -1033,6 +953,7 @@ static int cfs_cpu_dead(unsigned int cpu) > #endif > ret = -EINVAL; > > + get_online_cpus(); > if (*cpu_pattern) { > char *cpu_pattern_dup = kstrdup(cpu_pattern, GFP_KERNEL); > > @@ -1058,13 +979,7 @@ static int cfs_cpu_dead(unsigned int cpu) > } > } > > - spin_lock(&cpt_data.cpt_lock); > - if (cfs_cpt_table->ctb_version != cpt_data.cpt_version) { > - spin_unlock(&cpt_data.cpt_lock); > - CERROR("CPU hotplug/unplug during setup\n"); > - goto failed; > - } > - spin_unlock(&cpt_data.cpt_lock); > + put_online_cpus(); > > LCONSOLE(0, "HW nodes: %d, HW CPU cores: %d, npartitions: %d\n", > num_online_nodes(), num_online_cpus(), > @@ -1072,6 +987,7 @@ static int cfs_cpu_dead(unsigned int cpu) > return 0; > > failed: > + put_online_cpus(); > cfs_cpu_fini(); > return ret; > } When you have a one label called "failed" then I call that "one err" style error handling and it's the most bug prone style of error handling to use. Always be suspicious of code that uses a "err:" labels. The bug here is typical. We are calling put_online_cpus() on paths where we didn't call get_online_cpus(). The best way to do error handling is to keep track of each resource that was allocated and then only free the things that have been allocated. Also the label name should indicate what was freed. Generally avoid magic, opaque functions like cfs_cpu_fini(). As a reviewer, it's harder for me to check that cfs_cpu_fini() frees everything correctly instead of the a normal list of frees like: free_table: cfs_cpt_table_free(cfs_cpt_table); free_hotplug_stuff: cpuhp_remove_state_nocalls(lustre_cpu_online); set_state_dead: cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); When I'm reading the code, and I see a "goto free_table;", I only need to ask, "Was table the most recently allocated resource?" If yes, then the code is correct, if no then it's buggy. It's simple review. regards, dan carpenter From dan.carpenter at oracle.com Mon Apr 16 13:51:57 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Mon, 16 Apr 2018 16:51:57 +0300 Subject: [lustre-devel] [PATCH 03/25] staging: lustre: libcfs: implement cfs_cpt_cpumask for UMP case In-Reply-To: <1523851807-16573-4-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-4-git-send-email-jsimmons@infradead.org> Message-ID: <20180416135157.zg2jwmeutzid3pzn@mwanda> On Mon, Apr 16, 2018 at 12:09:45AM -0400, James Simmons wrote: > diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > index 705abf2..5ea294f 100644 > --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > @@ -54,6 +54,9 @@ struct cfs_cpt_table * > cptab = kzalloc(sizeof(*cptab), GFP_NOFS); > if (cptab) { ^^^^^^^^^^^^ Don't do "success handling", do "error handling". Success handling means we have to indent the code and it makes it more complicated to read. Ideally code would look like: do_this(); do_that(); do_the_next_thing(); But because of error handling then we have to add a bunch of if statements. It's better when those if statements are very quick and we can move on. The success path is all at indent level one still like and ideal situation above and the the error paths are at indent level two. if (!cptab) return NULL; > cptab->ctb_version = CFS_CPU_VERSION_MAGIC; > + if (!zalloc_cpumask_var(&cptab->ctb_mask, GFP_NOFS)) > + return NULL; This leaks. It should be: if (!zalloc_cpumask_var(&cptab->ctb_mask, GFP_NOFS)) { kfree(cptab); return NULL; } > + cpumask_set_cpu(0, cptab->ctb_mask); > node_set(0, cptab->ctb_nodemask); > cptab->ctb_nparts = ncpt; > } regards, dan carpenter From dan.carpenter at oracle.com Mon Apr 16 13:55:21 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Mon, 16 Apr 2018 16:55:21 +0300 Subject: [lustre-devel] [PATCH 04/25] staging: lustre: libcfs: replace MAX_NUMNODES with nr_node_ids In-Reply-To: <1523851807-16573-5-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-5-git-send-email-jsimmons@infradead.org> Message-ID: <20180416135521.ipvwptbom36wrtlf@mwanda> On Mon, Apr 16, 2018 at 12:09:46AM -0400, James Simmons wrote: > From: Amir Shehata > > Replace depricated MAX_NUMNODES with nr_node_ids. > The changelog makes it sound like this is just a style change, but it's actually a behavior change isn't it? regards, dan carpenter From dan.carpenter at oracle.com Mon Apr 16 14:27:33 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Mon, 16 Apr 2018 17:27:33 +0300 Subject: [lustre-devel] [PATCH 07/25] staging: lustre: libcfs: NUMA support In-Reply-To: <1523851807-16573-8-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-8-git-send-email-jsimmons@infradead.org> Message-ID: <20180416142733.s3f36jdd56rkbfbb@mwanda> On Mon, Apr 16, 2018 at 12:09:49AM -0400, James Simmons wrote: > @@ -114,6 +115,15 @@ struct cfs_cpt_table * > memset(cptab->ctb_cpu2cpt, -1, > nr_cpu_ids * sizeof(cptab->ctb_cpu2cpt[0])); > > + cptab->ctb_node2cpt = kvmalloc_array(nr_node_ids, > + sizeof(cptab->ctb_node2cpt[0]), > + GFP_KERNEL); > + if (!cptab->ctb_node2cpt) > + goto failed; > + > + memset(cptab->ctb_node2cpt, -1, > + nr_node_ids * sizeof(cptab->ctb_node2cpt[0])); > + > cptab->ctb_parts = kvmalloc_array(ncpt, sizeof(cptab->ctb_parts[0]), > GFP_KERNEL); > if (!cptab->ctb_parts) You didn't introduce this, but I was explaining earlier that you should always be suspicious of code which does "goto failed". The bug here is that cptab->ctb_parts is allocated with kvmalloc_array() which doesn't zero out the memory. So if we only initialize it part way because art->cpt_nodemask = kzalloc() fails or something then it's problem: 91 void 92 cfs_cpt_table_free(struct cfs_cpt_table *cptab) 93 { 94 int i; 95 96 kvfree(cptab->ctb_cpu2cpt); 97 98 for (i = 0; cptab->ctb_parts && i < cptab->ctb_nparts; i++) { 99 struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; 100 101 kfree(part->cpt_nodemask); ^^^^^^^^^^^^^^^^^^^ 102 free_cpumask_var(part->cpt_cpumask); ^^^^^^^^^^^^^^^^^ These are uninitialized so it will crash. It turns out there isn't a kvcalloc() or kvzalloc_array() function. We don't seem to have a vcalloc() either... Very strange. 103 } 104 105 kvfree(cptab->ctb_parts); 106 107 kfree(cptab->ctb_nodemask); 108 free_cpumask_var(cptab->ctb_cpumask); 109 110 kfree(cptab); 111 } regards, dan carpenter From dan.carpenter at oracle.com Mon Apr 16 14:45:48 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Mon, 16 Apr 2018 17:45:48 +0300 Subject: [lustre-devel] [PATCH 08/25] staging: lustre: libcfs: add cpu distance handling In-Reply-To: <1523851807-16573-9-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-9-git-send-email-jsimmons@infradead.org> Message-ID: <20180416144548.xjjcaxivkbvynsux@mwanda> On Mon, Apr 16, 2018 at 12:09:50AM -0400, James Simmons wrote: > +int cfs_cpt_distance_print(struct cfs_cpt_table *cptab, char *buf, int len) > +{ > + char *tmp = buf; > + int rc = -EFBIG; > + int i; > + int j; > + > + for (i = 0; i < cptab->ctb_nparts; i++) { > + if (len <= 0) > + goto err; > + > + rc = snprintf(tmp, len, "%d\t:", i); > + len -= rc; > + > + if (len <= 0) > + goto err; The "goto err" here is sort of an example of a "do-nothing" goto. There are no resources to free or anything like that. I don't like do-nothing gotos because "return -EFBIG;" is self documenting code and "goto err;" is totally ambiguous what it does. The second problem is that do-nothing error labels easily turn into do-everything one err style error paths which I loath. And the third problem is that they introduce "forgot to set the error code" bugs. It looks like we forgot to set the error code here although it's also possible that was intended. This code is ambiguous. > + > + tmp += rc; > + for (j = 0; j < cptab->ctb_nparts; j++) { > + rc = snprintf(tmp, len, " %d:%d", > + j, cptab->ctb_parts[i].cpt_distance[j]); > + len -= rc; > + if (len <= 0) > + goto err; > + tmp += rc; > + } > + > + *tmp = '\n'; > + tmp++; > + len--; > + } > + rc = 0; > +err: > + if (rc < 0) > + return rc; > + > + return tmp - buf; > +} regards, dan carpenter From paf at cray.com Mon Apr 16 15:27:58 2018 From: paf at cray.com (Patrick Farrell) Date: Mon, 16 Apr 2018 15:27:58 +0000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> Message-ID: <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> James, If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) - Patrick On 4/15/18, 10:49 PM, "lustre-devel on behalf of James Simmons" wrote: > CDEBUG_STACK() and CHECK_STACK() are macros to help with > debugging, so move them from > drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > to > drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > > This seems a more fitting location, and is a step towards > removing linux/libcfs.h and simplifying the include file structure. Nak. Currently the lustre client always enables debugging but that shouldn't be the case. What we do need is the able to turn off the crazy debugging stuff. In the development branch of lustre it is done with CDEBUG_ENABLED. We need something like that in Kconfig much like we have CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK. Since we like to be able to turn that off this should be moved to just after LIBCFS_DEBUG_MSG_DATA_DECL. Then from CHECK_STACK down to CWARN() it can be build out. When CDEBUG_ENABLED is disabled CDEBUG_LIMIT would be empty. > Signed-off-by: NeilBrown > --- > .../lustre/include/linux/libcfs/libcfs_debug.h | 32 ++++++++++++++++++++ > .../lustre/include/linux/libcfs/linux/libcfs.h | 31 ------------------- > 2 files changed, 32 insertions(+), 31 deletions(-) > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > index 9290a19429e7..0dc7b91efe7c 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > @@ -62,6 +62,38 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); > extern unsigned int libcfs_catastrophe; > extern unsigned int libcfs_panic_on_lbug; > > +/* Enable debug-checks on stack size - except on x86_64 */ > +#if !defined(__x86_64__) > +# ifdef __ia64__ > +# define CDEBUG_STACK() (THREAD_SIZE - \ > + ((unsigned long)__builtin_dwarf_cfa() & \ > + (THREAD_SIZE - 1))) > +# else > +# define CDEBUG_STACK() (THREAD_SIZE - \ > + ((unsigned long)__builtin_frame_address(0) & \ > + (THREAD_SIZE - 1))) > +# endif /* __ia64__ */ > + > +#define __CHECK_STACK(msgdata, mask, cdls) \ > +do { \ > + if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ > + LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ > + libcfs_stack = CDEBUG_STACK(); \ > + libcfs_debug_msg(msgdata, \ > + "maximum lustre stack %lu\n", \ > + CDEBUG_STACK()); \ > + (msgdata)->msg_mask = mask; \ > + (msgdata)->msg_cdls = cdls; \ > + dump_stack(); \ > + /*panic("LBUG");*/ \ > + } \ > +} while (0) > +#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) > +#else /* __x86_64__ */ > +#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) > +#define CDEBUG_STACK() (0L) > +#endif /* __x86_64__ */ > + > #ifndef DEBUG_SUBSYSTEM > # define DEBUG_SUBSYSTEM S_UNDEFINED > #endif > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > index 07d3cb2217d1..83aec9c7698f 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > @@ -80,35 +80,4 @@ > #include > #include "linux-cpu.h" > > -#if !defined(__x86_64__) > -# ifdef __ia64__ > -# define CDEBUG_STACK() (THREAD_SIZE - \ > - ((unsigned long)__builtin_dwarf_cfa() & \ > - (THREAD_SIZE - 1))) > -# else > -# define CDEBUG_STACK() (THREAD_SIZE - \ > - ((unsigned long)__builtin_frame_address(0) & \ > - (THREAD_SIZE - 1))) > -# endif /* __ia64__ */ > - > -#define __CHECK_STACK(msgdata, mask, cdls) \ > -do { \ > - if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ > - LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ > - libcfs_stack = CDEBUG_STACK(); \ > - libcfs_debug_msg(msgdata, \ > - "maximum lustre stack %lu\n", \ > - CDEBUG_STACK()); \ > - (msgdata)->msg_mask = mask; \ > - (msgdata)->msg_cdls = cdls; \ > - dump_stack(); \ > - /*panic("LBUG");*/ \ > - } \ > -} while (0) > -#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) > -#else /* __x86_64__ */ > -#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) > -#define CDEBUG_STACK() (0L) > -#endif /* __x86_64__ */ > - > #endif /* _LINUX_LIBCFS_H */ > > > _______________________________________________ lustre-devel mailing list lustre-devel at lists.lustre.org http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From dinatale2 at llnl.gov Mon Apr 16 20:52:37 2018 From: dinatale2 at llnl.gov (Di Natale, Giuseppe) Date: Mon, 16 Apr 2018 20:52:37 +0000 Subject: [lustre-devel] LNET Configuration Update/Reconciliation In-Reply-To: References: Message-ID: In theory, lnetctl itself is the exporter. Once modprobe.conf settings are loaded, lnetctl export will get you most of the way there (default values for tunables and such are exported as well). If you're already using lnetctl, it can export the current configuration (again, including tunables, etc). As for migrating from lnetctl back to modprobe.conf, I wasn't planning on tackling that. What I am trying to implement is a method of "reconciling" the current configuration with a newly imported one. So to start, let us assume lnet has some configuration x. Let's say you make changes to the YAML file (add a few new routes, remove a network, maybe remove a route) producing configuration y. I want to implement a feature in lnetctl that will take the currently loaded configuration (in this case, configuration x) and turn it into configuration y without taking down connections unless it's necessary. Giuseppe ________________________________ From: Ben Evans Sent: Friday, April 13, 2018 7:01:15 AM To: Di Natale, Giuseppe; lustre-devel at lists.lustre.org Subject: Re: [lustre-devel] LNET Configuration Update/Reconciliation In LU-4939, I'm working on exporting and importing the parameters set via lctl conf_param and set_param -P. The output is in yaml, and I've got an importer working in a separate patch that has yet to be accepted upstream. Would you consider having an exporter for the lnetctl and modprobe.conf settings into yaml so that you could migrate between the two methods of setting configuration? From: lustre-devel > on behalf of "Di Natale, Giuseppe" > Date: Thursday, April 12, 2018 at 3:53 PM To: "lustre-devel at lists.lustre.org" > Subject: [lustre-devel] LNET Configuration Update/Reconciliation Greetings Developers, We are currently using modprobe.conf to configure routes, but we are hoping to reach a point where we can push out new LNET configurations to nodes and have lnetctl apply configuration changes on the fly. It would be nice to have the ability to update or "reconcile" the difference between the loaded configuration and an updated configuration being imported. I was exploring how to implement such functionality in lnetctl. Would others find such functionality useful? My current thought is that I'd implement this as a new lnetctl subcommand (i.e. "update"). Does that seem reasonable or would you suggest another interface? Thanks, Giuseppe -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsimmons at infradead.org Mon Apr 16 22:42:31 2018 From: jsimmons at infradead.org (James Simmons) Date: Mon, 16 Apr 2018 23:42:31 +0100 (BST) Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> Message-ID: > James, > > If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. > > If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) I'm not saying add the option today but this is more for the long game. While the Intel lustre developers deeply love lustre's debugging infrastructure I see a future where something better will come along to replace it. When that day comes we will have a period where both debugging infrastructurs will exist and some deployers of lustre will want to turn off the old debugging infrastructure and just use the new. That is what I have in mind. A switch to flip between options. > - Patrick > > On 4/15/18, 10:49 PM, "lustre-devel on behalf of James Simmons" wrote: > > > > CDEBUG_STACK() and CHECK_STACK() are macros to help with > > debugging, so move them from > > drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > > to > > drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > > > > This seems a more fitting location, and is a step towards > > removing linux/libcfs.h and simplifying the include file structure. > > Nak. Currently the lustre client always enables debugging but that > shouldn't be the case. What we do need is the able to turn off the > crazy debugging stuff. In the development branch of lustre it is > done with CDEBUG_ENABLED. We need something like that in Kconfig > much like we have CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK. Since we like > to be able to turn that off this should be moved to just after > LIBCFS_DEBUG_MSG_DATA_DECL. Then from CHECK_STACK down to CWARN() > it can be build out. When CDEBUG_ENABLED is disabled CDEBUG_LIMIT > would be empty. > > > Signed-off-by: NeilBrown > > --- > > .../lustre/include/linux/libcfs/libcfs_debug.h | 32 ++++++++++++++++++++ > > .../lustre/include/linux/libcfs/linux/libcfs.h | 31 ------------------- > > 2 files changed, 32 insertions(+), 31 deletions(-) > > > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > > index 9290a19429e7..0dc7b91efe7c 100644 > > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > > @@ -62,6 +62,38 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); > > extern unsigned int libcfs_catastrophe; > > extern unsigned int libcfs_panic_on_lbug; > > > > +/* Enable debug-checks on stack size - except on x86_64 */ > > +#if !defined(__x86_64__) > > +# ifdef __ia64__ > > +# define CDEBUG_STACK() (THREAD_SIZE - \ > > + ((unsigned long)__builtin_dwarf_cfa() & \ > > + (THREAD_SIZE - 1))) > > +# else > > +# define CDEBUG_STACK() (THREAD_SIZE - \ > > + ((unsigned long)__builtin_frame_address(0) & \ > > + (THREAD_SIZE - 1))) > > +# endif /* __ia64__ */ > > + > > +#define __CHECK_STACK(msgdata, mask, cdls) \ > > +do { \ > > + if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ > > + LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ > > + libcfs_stack = CDEBUG_STACK(); \ > > + libcfs_debug_msg(msgdata, \ > > + "maximum lustre stack %lu\n", \ > > + CDEBUG_STACK()); \ > > + (msgdata)->msg_mask = mask; \ > > + (msgdata)->msg_cdls = cdls; \ > > + dump_stack(); \ > > + /*panic("LBUG");*/ \ > > + } \ > > +} while (0) > > +#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) > > +#else /* __x86_64__ */ > > +#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) > > +#define CDEBUG_STACK() (0L) > > +#endif /* __x86_64__ */ > > + > > #ifndef DEBUG_SUBSYSTEM > > # define DEBUG_SUBSYSTEM S_UNDEFINED > > #endif > > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > > index 07d3cb2217d1..83aec9c7698f 100644 > > --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > > +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > > @@ -80,35 +80,4 @@ > > #include > > #include "linux-cpu.h" > > > > -#if !defined(__x86_64__) > > -# ifdef __ia64__ > > -# define CDEBUG_STACK() (THREAD_SIZE - \ > > - ((unsigned long)__builtin_dwarf_cfa() & \ > > - (THREAD_SIZE - 1))) > > -# else > > -# define CDEBUG_STACK() (THREAD_SIZE - \ > > - ((unsigned long)__builtin_frame_address(0) & \ > > - (THREAD_SIZE - 1))) > > -# endif /* __ia64__ */ > > - > > -#define __CHECK_STACK(msgdata, mask, cdls) \ > > -do { \ > > - if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ > > - LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ > > - libcfs_stack = CDEBUG_STACK(); \ > > - libcfs_debug_msg(msgdata, \ > > - "maximum lustre stack %lu\n", \ > > - CDEBUG_STACK()); \ > > - (msgdata)->msg_mask = mask; \ > > - (msgdata)->msg_cdls = cdls; \ > > - dump_stack(); \ > > - /*panic("LBUG");*/ \ > > - } \ > > -} while (0) > > -#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) > > -#else /* __x86_64__ */ > > -#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) > > -#define CDEBUG_STACK() (0L) > > -#endif /* __x86_64__ */ > > - > > #endif /* _LINUX_LIBCFS_H */ > > > > > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > > > From doucharek at cray.com Mon Apr 16 22:48:40 2018 From: doucharek at cray.com (Doug Oucharek) Date: Mon, 16 Apr 2018 22:48:40 +0000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> Message-ID: <44671B46-27F6-4CFA-8E3A-7AD62B4C597E@cray.com> > On Apr 16, 2018, at 3:42 PM, James Simmons wrote: > > >> James, >> >> If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. >> >> If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) > > I'm not saying add the option today but this is more for the long game. > While the Intel lustre developers deeply love lustre's debugging > infrastructure I see a future where something better will come along to > replace it. When that day comes we will have a period where both > debugging infrastructurs will exist and some deployers of lustre will > want to turn off the old debugging infrastructure and just use the new. > That is what I have in mind. A switch to flip between options. Yes please!! An option for users which says “no, you do not have the right to panic my system via LASSERT whenever you like” would be a blessing. Doug > >> - Patrick >> >> On 4/15/18, 10:49 PM, "lustre-devel on behalf of James Simmons" wrote: >> >> >>> CDEBUG_STACK() and CHECK_STACK() are macros to help with >>> debugging, so move them from >>> drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >>> to >>> drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >>> >>> This seems a more fitting location, and is a step towards >>> removing linux/libcfs.h and simplifying the include file structure. >> >> Nak. Currently the lustre client always enables debugging but that >> shouldn't be the case. What we do need is the able to turn off the >> crazy debugging stuff. In the development branch of lustre it is >> done with CDEBUG_ENABLED. We need something like that in Kconfig >> much like we have CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK. Since we like >> to be able to turn that off this should be moved to just after >> LIBCFS_DEBUG_MSG_DATA_DECL. Then from CHECK_STACK down to CWARN() >> it can be build out. When CDEBUG_ENABLED is disabled CDEBUG_LIMIT >> would be empty. >> >>> Signed-off-by: NeilBrown >>> --- >>> .../lustre/include/linux/libcfs/libcfs_debug.h | 32 ++++++++++++++++++++ >>> .../lustre/include/linux/libcfs/linux/libcfs.h | 31 ------------------- >>> 2 files changed, 32 insertions(+), 31 deletions(-) >>> >>> diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >>> index 9290a19429e7..0dc7b91efe7c 100644 >>> --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >>> +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >>> @@ -62,6 +62,38 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); >>> extern unsigned int libcfs_catastrophe; >>> extern unsigned int libcfs_panic_on_lbug; >>> >>> +/* Enable debug-checks on stack size - except on x86_64 */ >>> +#if !defined(__x86_64__) >>> +# ifdef __ia64__ >>> +# define CDEBUG_STACK() (THREAD_SIZE - \ >>> + ((unsigned long)__builtin_dwarf_cfa() & \ >>> + (THREAD_SIZE - 1))) >>> +# else >>> +# define CDEBUG_STACK() (THREAD_SIZE - \ >>> + ((unsigned long)__builtin_frame_address(0) & \ >>> + (THREAD_SIZE - 1))) >>> +# endif /* __ia64__ */ >>> + >>> +#define __CHECK_STACK(msgdata, mask, cdls) \ >>> +do { \ >>> + if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ >>> + LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ >>> + libcfs_stack = CDEBUG_STACK(); \ >>> + libcfs_debug_msg(msgdata, \ >>> + "maximum lustre stack %lu\n", \ >>> + CDEBUG_STACK()); \ >>> + (msgdata)->msg_mask = mask; \ >>> + (msgdata)->msg_cdls = cdls; \ >>> + dump_stack(); \ >>> + /*panic("LBUG");*/ \ >>> + } \ >>> +} while (0) >>> +#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) >>> +#else /* __x86_64__ */ >>> +#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) >>> +#define CDEBUG_STACK() (0L) >>> +#endif /* __x86_64__ */ >>> + >>> #ifndef DEBUG_SUBSYSTEM >>> # define DEBUG_SUBSYSTEM S_UNDEFINED >>> #endif >>> diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >>> index 07d3cb2217d1..83aec9c7698f 100644 >>> --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >>> +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >>> @@ -80,35 +80,4 @@ >>> #include >>> #include "linux-cpu.h" >>> >>> -#if !defined(__x86_64__) >>> -# ifdef __ia64__ >>> -# define CDEBUG_STACK() (THREAD_SIZE - \ >>> - ((unsigned long)__builtin_dwarf_cfa() & \ >>> - (THREAD_SIZE - 1))) >>> -# else >>> -# define CDEBUG_STACK() (THREAD_SIZE - \ >>> - ((unsigned long)__builtin_frame_address(0) & \ >>> - (THREAD_SIZE - 1))) >>> -# endif /* __ia64__ */ >>> - >>> -#define __CHECK_STACK(msgdata, mask, cdls) \ >>> -do { \ >>> - if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ >>> - LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ >>> - libcfs_stack = CDEBUG_STACK(); \ >>> - libcfs_debug_msg(msgdata, \ >>> - "maximum lustre stack %lu\n", \ >>> - CDEBUG_STACK()); \ >>> - (msgdata)->msg_mask = mask; \ >>> - (msgdata)->msg_cdls = cdls; \ >>> - dump_stack(); \ >>> - /*panic("LBUG");*/ \ >>> - } \ >>> -} while (0) >>> -#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) >>> -#else /* __x86_64__ */ >>> -#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) >>> -#define CDEBUG_STACK() (0L) >>> -#endif /* __x86_64__ */ >>> - >>> #endif /* _LINUX_LIBCFS_H */ >>> >>> >>> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org >> >> > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From jsimmons at infradead.org Tue Apr 17 03:35:43 2018 From: jsimmons at infradead.org (James Simmons) Date: Tue, 17 Apr 2018 04:35:43 +0100 (BST) Subject: [lustre-devel] [PATCH 00/20] staging: lustre: convert to rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: > libcfs in lustre has a resizeable hashtable. > Linux already has a resizeable hashtable, rhashtable, which is better > is most metrics. See https://lwn.net/Articles/751374/ in a few days > for an introduction to rhashtable. Thansk for starting this work. I was think about cleaning the libcfs hash but your port to rhashtables is way better. How did you gather metrics to see that rhashtable was better than libcfs hash? > This series converts lustre to use rhashtable. This affects several > different tables, and each is different is various ways. > > There are two outstanding issues. One is that a bug in rhashtable > means that we cannot enable auto-shrinking in one of the tables. That > is documented as appropriate and should be fixed soon. > > The other is that rhashtable has an atomic_t which counts the elements > in a hash table. At least one table in lustre went to some trouble to > avoid any table-wide atomics, so that could lead to a regression. > I'm hoping that rhashtable can be enhanced with the option of a > per-cpu counter, or similar. > This doesn't sound quite ready to land just yet. This will have to do some soak testing and a larger scope of test to make sure no new regressions happen. Believe me I did work to make lustre work better on tickless systems, which I'm preparing for the linux client, and small changes could break things in interesting ways. I will port the rhashtable change to the Intel developement branch and get people more familar with the hash code to look at it. > I have enabled automatic shrinking on all tables where it makes sense > and doesn't trigger the bug. I have also removed all hints concerning > min/max size - I cannot see how these could be useful. > > The dump_pgcache debugfs file provided some interesting challenges. I > think I have cleaned it up enough so that it all makes sense. An > extra pair of eyes examining that code in particular would be > appreciated. > > This series passes all the same tests that pass before the patches are > applied. > > Thanks, > NeilBrown > > > --- > > NeilBrown (20): > staging: lustre: ptlrpc: convert conn_hash to rhashtable > staging: lustre: convert lov_pool to use rhashtable > staging: lustre: convert obd uuid hash to rhashtable > staging: lustre: convert osc_quota hash to rhashtable > staging: lustre: separate buckets from ldlm hash table > staging: lustre: ldlm: add a counter to the per-namespace data > staging: lustre: ldlm: store name directly in namespace. > staging: lustre: simplify ldlm_ns_hash_defs[] > staging: lustre: convert ldlm_resource hash to rhashtable. > staging: lustre: make struct lu_site_bkt_data private > staging: lustre: lu_object: discard extra lru count. > staging: lustre: lu_object: factor out extra per-bucket data > staging: lustre: lu_object: move retry logic inside htable_lookup > staging: lustre: fold lu_object_new() into lu_object_find_at() > staging: lustre: llite: use more private data in dump_pgcache > staging: lustre: llite: remove redundant lookup in dump_pgcache > staging: lustre: use call_rcu() to free lu_object_headers > staging: lustre: change how "dump_page_cache" walks a hash table > staging: lustre: convert lu_object cache to rhashtable > staging: lustre: remove cfs_hash resizeable hashtable implementation. > > > .../staging/lustre/include/linux/libcfs/libcfs.h | 1 > .../lustre/include/linux/libcfs/libcfs_hash.h | 866 -------- > drivers/staging/lustre/lnet/libcfs/Makefile | 2 > drivers/staging/lustre/lnet/libcfs/hash.c | 2064 -------------------- > drivers/staging/lustre/lnet/libcfs/module.c | 12 > drivers/staging/lustre/lustre/include/lu_object.h | 55 - > drivers/staging/lustre/lustre/include/lustre_dlm.h | 19 > .../staging/lustre/lustre/include/lustre_export.h | 2 > drivers/staging/lustre/lustre/include/lustre_net.h | 4 > drivers/staging/lustre/lustre/include/obd.h | 11 > .../staging/lustre/lustre/include/obd_support.h | 9 > drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 31 > drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 370 +--- > drivers/staging/lustre/lustre/llite/lcommon_cl.c | 8 > drivers/staging/lustre/lustre/llite/vvp_dev.c | 332 +-- > drivers/staging/lustre/lustre/llite/vvp_object.c | 9 > drivers/staging/lustre/lustre/lov/lov_internal.h | 11 > drivers/staging/lustre/lustre/lov/lov_obd.c | 12 > drivers/staging/lustre/lustre/lov/lov_object.c | 8 > drivers/staging/lustre/lustre/lov/lov_pool.c | 159 +- > drivers/staging/lustre/lustre/lov/lovsub_object.c | 9 > drivers/staging/lustre/lustre/obdclass/genops.c | 34 > drivers/staging/lustre/lustre/obdclass/lu_object.c | 564 ++--- > .../staging/lustre/lustre/obdclass/obd_config.c | 161 +- > .../staging/lustre/lustre/obdecho/echo_client.c | 8 > drivers/staging/lustre/lustre/osc/osc_internal.h | 5 > drivers/staging/lustre/lustre/osc/osc_quota.c | 136 - > drivers/staging/lustre/lustre/osc/osc_request.c | 12 > drivers/staging/lustre/lustre/ptlrpc/connection.c | 164 +- > 29 files changed, 870 insertions(+), 4208 deletions(-) > delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h > delete mode 100644 drivers/staging/lustre/lnet/libcfs/hash.c > > -- > Signature > > From andreas.dilger at intel.com Tue Apr 17 05:26:47 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Tue, 17 Apr 2018 05:26:47 +0000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: <44671B46-27F6-4CFA-8E3A-7AD62B4C597E@cray.com> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> <44671B46-27F6-4CFA-8E3A-7AD62B4C597E@cray.com> Message-ID: On Apr 16, 2018, at 16:48, Doug Oucharek wrote: > >> >> On Apr 16, 2018, at 3:42 PM, James Simmons wrote: >> >> >>> James, >>> >>> If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. >>> >>> If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) >> >> I'm not saying add the option today but this is more for the long game. >> While the Intel lustre developers deeply love lustre's debugging >> infrastructure I see a future where something better will come along to >> replace it. When that day comes we will have a period where both >> debugging infrastructurs will exist and some deployers of lustre will >> want to turn off the old debugging infrastructure and just use the new. >> That is what I have in mind. A switch to flip between options. > > Yes please!! An option for users which says “no, you do not have the right to panic my system via LASSERT whenever you like” would be a blessing. Note that LASSERT() itself does not panic the system, unless you configure it with panic_on_lbug=1. Otherwise, it just blocks that thread (though this can also have an impact on other threads if you are holding locks at that time). That said, the LASSERT() should not be hit unless there is bad code, data corruption, or the LASSERT() itself is incorrect (essentially bad code also). So "whenever you like" is "whenever the system is about to corrupt your data", and people are not very forgiving if a filesystem corrupts their data... Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From dan.carpenter at oracle.com Tue Apr 17 07:14:49 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Tue, 17 Apr 2018 10:14:49 +0300 Subject: [lustre-devel] [PATCH 11/25] staging: lustre: libcfs: invert error handling for cfs_cpt_table_print In-Reply-To: <1523851807-16573-12-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-12-git-send-email-jsimmons@infradead.org> Message-ID: <20180417071449.ufj7spey44qwiqdy@mwanda> On Mon, Apr 16, 2018 at 12:09:53AM -0400, James Simmons wrote: > From: Amir Shehata > > Instead of setting rc to -EFBIG for several cases in the loop lets > initialize rc to -EFBIG and just break out of the loop in case of > failure. Just set rc to zero once we successfully finish the loop. > > Signed-off-by: Amir Shehata > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7734 > Reviewed-on: http://review.whamcloud.com/18916 > Reviewed-by: Olaf Weber > Reviewed-by: Doug Oucharek > Signed-off-by: James Simmons > --- > .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 22 ++++++++++------------ > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > index bbf89b8..6d8dcd3 100644 > --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > @@ -158,29 +158,26 @@ struct cfs_cpt_table * > cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) > { > char *tmp = buf; > - int rc = 0; > + int rc = -EFBIG; > int i; > int j; > > for (i = 0; i < cptab->ctb_nparts; i++) { > - if (len > 0) { > - rc = snprintf(tmp, len, "%d\t:", i); > - len -= rc; > - } > + if (len <= 0) > + goto out; > + > + rc = snprintf(tmp, len, "%d\t:", i); > + len -= rc; > > - if (len <= 0) { > - rc = -EFBIG; > + if (len <= 0) > goto out; This patch says it's a cleanup but the only thing it does is introduce "forgot to set the error" bugs. regards, dan carpenter From dan.carpenter at oracle.com Tue Apr 17 07:34:42 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Tue, 17 Apr 2018 10:34:42 +0300 Subject: [lustre-devel] [PATCH 17/25] staging: lustre: libcfs: rename goto label in cfs_cpt_table_print In-Reply-To: <1523851807-16573-18-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-18-git-send-email-jsimmons@infradead.org> Message-ID: <20180417073442.5i3h4wz3gvjcnqti@mwanda> > diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > index ae5ff58..435ee8e 100644 > --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c > @@ -161,20 +161,20 @@ int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) > > for (i = 0; i < cptab->ctb_nparts; i++) { > if (len <= 0) > - goto out; > + goto err; > > rc = snprintf(tmp, len, "%d\t:", i); > len -= rc; > > if (len <= 0) > - goto out; > + goto err; Labels should say what the goto does. In this case, it's a do-nothing goto with a "forgot to set the error code" bug. regards, dan carpenter From dan.carpenter at oracle.com Tue Apr 17 07:39:02 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Tue, 17 Apr 2018 10:39:02 +0300 Subject: [lustre-devel] [PATCH 18/25] staging: lustre: libcfs: clear up failure patch in cfs_cpt_*_print In-Reply-To: <1523851807-16573-19-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> <1523851807-16573-19-git-send-email-jsimmons@infradead.org> Message-ID: <20180417073902.slxgixniiytw7guk@mwanda> > -err: > - if (rc < 0) > - return rc; > - > return tmp - buf; > + > +err: > + return -E2BIG; We finally fixed this bug! Hooray! But it's like you guys are deliberately writing in terrible style. You can just return directly and then you would have avoided this bug altogether from square one! People think that by adding little twists and moving code to the end of the function the it will be less buggy. It's not true. It's like at a hospital if they just swept the cockroaches under the bed, just because it's at the end of the function where you can't see it or review it doesn't mean it's not buggy. regards, dan carpenter From dan.carpenter at oracle.com Tue Apr 17 08:38:54 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Tue, 17 Apr 2018 11:38:54 +0300 Subject: [lustre-devel] [PATCH 19/22] staging: lustre: llite: add support set_acl method in inode operations In-Reply-To: <1523852111-17321-20-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> <1523852111-17321-20-git-send-email-jsimmons@infradead.org> Message-ID: <20180417083854.7dgypv3eu4tc4e2c@mwanda> On Mon, Apr 16, 2018 at 12:15:08AM -0400, James Simmons wrote: > +int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type) > +{ > + struct ll_sb_info *sbi = ll_i2sbi(inode); > + struct ptlrpc_request *req = NULL; > + const char *name = NULL; > + size_t value_size = 0; > + char *value = NULL; > + int rc; > + > + switch (type) { > + case ACL_TYPE_ACCESS: > + name = XATTR_NAME_POSIX_ACL_ACCESS; > + if (acl) { > + rc = posix_acl_update_mode(inode, &inode->i_mode, &acl); > + if (rc) > + goto out; > + } > + > + break; > + > + case ACL_TYPE_DEFAULT: > + name = XATTR_NAME_POSIX_ACL_DEFAULT; > + if (!S_ISDIR(inode->i_mode)) { > + rc = acl ? -EACCES : 0; > + goto out; I just hate "goto out;" labels... They're so impossible to review... Why are we calling forget_cached_acl() when we haven't set anything? I have no idea. Perhaps it's not even intentional. > + } > + > + break; > + > + default: > + rc = -EINVAL; > + goto out; And on this path we're calling forget_cached_acl(inode, type) with an invalid "type" so it will trigger a BUG()... That's obviously not intended... Who knows what's going on when all the names are vague and hand wavy. regards, dan carpenter From doucharek at cray.com Tue Apr 17 15:41:44 2018 From: doucharek at cray.com (Doug Oucharek) Date: Tue, 17 Apr 2018 15:41:44 +0000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> <44671B46-27F6-4CFA-8E3A-7AD62B4C597E@cray.com> Message-ID: <399C67D9-B90A-40D5-97DB-74EA257D650E@cray.com> On Apr 16, 2018, at 10:26 PM, Dilger, Andreas > wrote: On Apr 16, 2018, at 16:48, Doug Oucharek > wrote: On Apr 16, 2018, at 3:42 PM, James Simmons > wrote: James, If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) I'm not saying add the option today but this is more for the long game. While the Intel lustre developers deeply love lustre's debugging infrastructure I see a future where something better will come along to replace it. When that day comes we will have a period where both debugging infrastructurs will exist and some deployers of lustre will want to turn off the old debugging infrastructure and just use the new. That is what I have in mind. A switch to flip between options. Yes please!! An option for users which says “no, you do not have the right to panic my system via LASSERT whenever you like” would be a blessing. Note that LASSERT() itself does not panic the system, unless you configure it with panic_on_lbug=1. Otherwise, it just blocks that thread (though this can also have an impact on other threads if you are holding locks at that time). That said, the LASSERT() should not be hit unless there is bad code, data corruption, or the LASSERT() itself is incorrect (essentially bad code also). I don’t know about the rest of Lustre, but LNet and LNDs use LASSERT() at the top of every function call to check parameters, reference counters, state variables, etc. These do get hit in the field and do take down the nodes. I have yet to see a case where the customer’s data was at risk of corruption. These should all be converted to regular “if” checks returning EINVAL. So "whenever you like" is "whenever the system is about to corrupt your data", and people are not very forgiving if a filesystem corrupts their data... Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From neilb at suse.com Wed Apr 18 02:17:37 2018 From: neilb at suse.com (NeilBrown) Date: Wed, 18 Apr 2018 12:17:37 +1000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> Message-ID: <87a7u1s1fi.fsf@notabene.neil.brown.name> On Mon, Apr 16 2018, James Simmons wrote: >> CDEBUG_STACK() and CHECK_STACK() are macros to help with >> debugging, so move them from >> drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >> to >> drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >> >> This seems a more fitting location, and is a step towards >> removing linux/libcfs.h and simplifying the include file structure. > > Nak. Currently the lustre client always enables debugging but that > shouldn't be the case. What we do need is the able to turn off the > crazy debugging stuff. In the development branch of lustre it is > done with CDEBUG_ENABLED. We need something like that in Kconfig > much like we have CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK. Since we like > to be able to turn that off this should be moved to just after > LIBCFS_DEBUG_MSG_DATA_DECL. Then from CHECK_STACK down to CWARN() > it can be build out. When CDEBUG_ENABLED is disabled CDEBUG_LIMIT > would be empty. So why, exactly, is this an argument to justify a NAK? Are you just saying that the code I moved into libcfs_debug.h should be moved to somewhere a bit later in the file? That can easily be done when it is needed. It isn't needed now so why insist on it? Each patch should do one thing and make clear forward progress. This patch gets rid of an unnecessary file and brings related code together. I think that qualifies. Thanks, NeilBrown > >> Signed-off-by: NeilBrown >> --- >> .../lustre/include/linux/libcfs/libcfs_debug.h | 32 ++++++++++++++++++++ >> .../lustre/include/linux/libcfs/linux/libcfs.h | 31 ------------------- >> 2 files changed, 32 insertions(+), 31 deletions(-) >> >> diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >> index 9290a19429e7..0dc7b91efe7c 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h >> @@ -62,6 +62,38 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); >> extern unsigned int libcfs_catastrophe; >> extern unsigned int libcfs_panic_on_lbug; >> >> +/* Enable debug-checks on stack size - except on x86_64 */ >> +#if !defined(__x86_64__) >> +# ifdef __ia64__ >> +# define CDEBUG_STACK() (THREAD_SIZE - \ >> + ((unsigned long)__builtin_dwarf_cfa() & \ >> + (THREAD_SIZE - 1))) >> +# else >> +# define CDEBUG_STACK() (THREAD_SIZE - \ >> + ((unsigned long)__builtin_frame_address(0) & \ >> + (THREAD_SIZE - 1))) >> +# endif /* __ia64__ */ >> + >> +#define __CHECK_STACK(msgdata, mask, cdls) \ >> +do { \ >> + if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ >> + LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ >> + libcfs_stack = CDEBUG_STACK(); \ >> + libcfs_debug_msg(msgdata, \ >> + "maximum lustre stack %lu\n", \ >> + CDEBUG_STACK()); \ >> + (msgdata)->msg_mask = mask; \ >> + (msgdata)->msg_cdls = cdls; \ >> + dump_stack(); \ >> + /*panic("LBUG");*/ \ >> + } \ >> +} while (0) >> +#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) >> +#else /* __x86_64__ */ >> +#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) >> +#define CDEBUG_STACK() (0L) >> +#endif /* __x86_64__ */ >> + >> #ifndef DEBUG_SUBSYSTEM >> # define DEBUG_SUBSYSTEM S_UNDEFINED >> #endif >> diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >> index 07d3cb2217d1..83aec9c7698f 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h >> @@ -80,35 +80,4 @@ >> #include >> #include "linux-cpu.h" >> >> -#if !defined(__x86_64__) >> -# ifdef __ia64__ >> -# define CDEBUG_STACK() (THREAD_SIZE - \ >> - ((unsigned long)__builtin_dwarf_cfa() & \ >> - (THREAD_SIZE - 1))) >> -# else >> -# define CDEBUG_STACK() (THREAD_SIZE - \ >> - ((unsigned long)__builtin_frame_address(0) & \ >> - (THREAD_SIZE - 1))) >> -# endif /* __ia64__ */ >> - >> -#define __CHECK_STACK(msgdata, mask, cdls) \ >> -do { \ >> - if (unlikely(CDEBUG_STACK() > libcfs_stack)) { \ >> - LIBCFS_DEBUG_MSG_DATA_INIT(msgdata, D_WARNING, NULL); \ >> - libcfs_stack = CDEBUG_STACK(); \ >> - libcfs_debug_msg(msgdata, \ >> - "maximum lustre stack %lu\n", \ >> - CDEBUG_STACK()); \ >> - (msgdata)->msg_mask = mask; \ >> - (msgdata)->msg_cdls = cdls; \ >> - dump_stack(); \ >> - /*panic("LBUG");*/ \ >> - } \ >> -} while (0) >> -#define CFS_CHECK_STACK(msgdata, mask, cdls) __CHECK_STACK(msgdata, mask, cdls) >> -#else /* __x86_64__ */ >> -#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0) >> -#define CDEBUG_STACK() (0L) >> -#endif /* __x86_64__ */ >> - >> #endif /* _LINUX_LIBCFS_H */ >> >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Wed Apr 18 02:29:08 2018 From: neilb at suse.com (NeilBrown) Date: Wed, 18 Apr 2018 12:29:08 +1000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> Message-ID: <877ep5s0wb.fsf@notabene.neil.brown.name> On Mon, Apr 16 2018, James Simmons wrote: >> James, >> >> If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. >> >> If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) > > I'm not saying add the option today but this is more for the long game. > While the Intel lustre developers deeply love lustre's debugging > infrastructure I see a future where something better will come along to > replace it. When that day comes we will have a period where both > debugging infrastructurs will exist and some deployers of lustre will > want to turn off the old debugging infrastructure and just use the new. > That is what I have in mind. A switch to flip between options. My position on this is that lustre's debugging infrastructure (in mainline) *will* be changed to use something that the rest of the kernel can and does use. Quite possibly that "something" will first be enhanced so that it is as powerful and useful as what lustre has. I suspect this will partly be pr_debug(), partly WARN_ON(), partly trace points. But I'm not very familiar with tracepoints or with lustre debugging yet so this is far from certain. pr_debug() and tracepoints can be compiled out, but only kernel-wide. There is no reason for lustre to be special there. WARN_ON() and BUG_ON() cannot be compiled out, but BUG_ON() must only be used when proceeding is unarguably worse than crashing the machine. In recent years a lot of BUG_ON()s have been removed or changed to warnings. We need to maintain that attitude. I don't like the idea of have two parallel debuging infrastructures that you can choose between - it encourages confusion and brings no benefits. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Wed Apr 18 02:32:01 2018 From: neilb at suse.com (NeilBrown) Date: Wed, 18 Apr 2018 12:32:01 +1000 Subject: [lustre-devel] [PATCH 2/6] staging: lustre: remove libcfs/linux/libcfs.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935734.23409.11654775387996961581.stgit@noble> Message-ID: <874lk9s0ri.fsf@notabene.neil.brown.name> On Mon, Apr 16 2018, James Simmons wrote: >> This include file is only included in one place, >> and only contains a list of other include directives. >> So just move all those to the place where this file >> is included, and discard the file. >> >> One include directive uses a local name ("linux-cpu.h"), so >> that needs to be given a proper path. >> >> Probably many of these should be remove from here, and moved to >> just the files that need them. > > Nak. Dumping all the extra headers from linux/libcfs.h to libcfs.h is > the wrong approach. The one header, libcfs.h, to be the only header > in all lustre files is the wrong approach. I have been looking to > unroll that mess. I have patch that I need to polish you that I can > submit. I think we both have the same goal - maybe just different paths to get there. If you have something nearly ready to submit, I'm happy to wait for it, then proceed on top of it. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Wed Apr 18 02:33:39 2018 From: neilb at suse.com (NeilBrown) Date: Wed, 18 Apr 2018 12:33:39 +1000 Subject: [lustre-devel] [PATCH 3/6] staging: lustre: remove include/linux/libcfs/linux/linux-cpu.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935737.23409.2271901486597092772.stgit@noble> Message-ID: <871sfds0os.fsf@notabene.neil.brown.name> On Mon, Apr 16 2018, James Simmons wrote: >> This include file contains definitions used when CONFIG_SMP >> is in effect. Other includes contain corresponding definitions >> for when it isn't. >> This can be hard to follow, so move the definitions to the one place. >> >> As HAVE_LIBCFS_CPT is defined precisely when CONFIG_SMP, we discard >> that macro and just use CONFIG_SMP when needed. > > Nak. The lustre SMP is broken and needed to badly be reworked. I have it > ready and can push it. I was waiting to see if I had to rebase it once > the rc1 stuff but since their is a push to get everything out their I will > push it. > Great - thanks for posting those. I might wait until they land in Greg's tree, then see if I there is anything else I want to add. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From neilb at suse.com Wed Apr 18 03:17:07 2018 From: neilb at suse.com (NeilBrown) Date: Wed, 18 Apr 2018 13:17:07 +1000 Subject: [lustre-devel] [PATCH 00/20] staging: lustre: convert to rhashtable In-Reply-To: References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <87y3hlqk3w.fsf@notabene.neil.brown.name> On Tue, Apr 17 2018, James Simmons wrote: >> libcfs in lustre has a resizeable hashtable. >> Linux already has a resizeable hashtable, rhashtable, which is better >> is most metrics. See https://lwn.net/Articles/751374/ in a few days >> for an introduction to rhashtable. > > Thansk for starting this work. I was think about cleaning the libcfs > hash but your port to rhashtables is way better. How did you gather > metrics to see that rhashtable was better than libcfs hash? Code inspection and reputation. It is hard to beat inlined lockless code for lookups. And rhashtable is heavily used in the network subsystem and they are very focused on latency there. I'm not sure that insertion is as fast as it can be (I have some thoughts on that) but I'm sure lookup will be better. I haven't done any performance testing myself, only correctness. > >> This series converts lustre to use rhashtable. This affects several >> different tables, and each is different is various ways. >> >> There are two outstanding issues. One is that a bug in rhashtable >> means that we cannot enable auto-shrinking in one of the tables. That >> is documented as appropriate and should be fixed soon. >> >> The other is that rhashtable has an atomic_t which counts the elements >> in a hash table. At least one table in lustre went to some trouble to >> avoid any table-wide atomics, so that could lead to a regression. >> I'm hoping that rhashtable can be enhanced with the option of a >> per-cpu counter, or similar. >> > > This doesn't sound quite ready to land just yet. This will have to do some > soak testing and a larger scope of test to make sure no new regressions > happen. Believe me I did work to make lustre work better on tickless > systems, which I'm preparing for the linux client, and small changes could > break things in interesting ways. I will port the rhashtable change to the > Intel developement branch and get people more familar with the hash code > to look at it. Whether it is "ready" or not probably depends on perspective and priorities. As I see it, getting lustre cleaned up and out of staging is a fairly high priority, and it will require a lot of code change. It is inevitable that regressions will slip in (some already have) and it is important to keep testing (the test suite is of great benefit, but is only part of the story of course). But to test the code, it needs to land. Testing the code in Intel's devel branch and then porting it across doesn't really prove much. For testing to be meaningful, it needs to be tested in a branch that up-to-date with mainline and on track to be merged into mainline. I have no particular desire to rush this in, but I don't see any particular benefit in delaying it either. I guess I see staging as implicitly a 'devel' branch. You seem to be treating it a bit like a 'stable' branch - is that right? As mentioned, I think there is room for improvement in rhashtable. - making the atomic counter optional - replacing the separate spinlocks with bit-locks in the hash-chain head so that the lock and chain are in the same cache line - for the common case of inserting in an empty chain, a single atomic cmpxchg() should be sufficient I think we have a better chance of being heard if we have "skin in the game" and have upstream code that would use this. Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From paf at cray.com Wed Apr 18 04:23:34 2018 From: paf at cray.com (Patrick Farrell) Date: Wed, 18 Apr 2018 04:23:34 +0000 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: <877ep5s0wb.fsf@notabene.neil.brown.name> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <6D3C7935-E7ED-4826-B459-0C4888D6048E@cray.com> , <877ep5s0wb.fsf@notabene.neil.brown.name> Message-ID: Of course - I’m no fan of keeping the Lustre specific stuff long term. It has a few pretty powerful tricks embedded in it (others can describe them better but, for example, it has per CPU debug buffers and if configured, it can halt all CPUs but one and write out all the buffers before panicking), but it’s mostly just a set of messages controlled by a pair of message specific and file-level (subsystem_debug) masks. And it should all use generic kernel infrastructure, absolutely. There’s been interest in that for a long time but never the right combination of expertise and will. ________________________________ From: NeilBrown Sent: Tuesday, April 17, 2018 9:29:08 PM To: James Simmons; Patrick Farrell Cc: Oleg Drokin; Greg Kroah-Hartman; Linux Kernel Mailing List; Lustre Development List Subject: Re: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h On Mon, Apr 16 2018, James Simmons wrote: >> James, >> >> If I understand correctly, you're saying you want to be able to build without debug support...? I'm not convinced that building a client without debug support is interesting or useful. In fact, I think it would be harmful, and we shouldn't open up the possibility - this is switchable debug with very low overhead when not actually "on". It would be really awful to get a problem on a running system and discover there's no debug support - that you can't even enable debug without a reinstall. >> >> If I've understood you correctly, then I would want to see proof of a significant performance cost when debug is built but *off* before agreeing to even exposing this option. (I know it's a choice they'd have to make, but if it's not really useful with a side order of potentially harmful, we shouldn't even give people the choice.) > > I'm not saying add the option today but this is more for the long game. > While the Intel lustre developers deeply love lustre's debugging > infrastructure I see a future where something better will come along to > replace it. When that day comes we will have a period where both > debugging infrastructurs will exist and some deployers of lustre will > want to turn off the old debugging infrastructure and just use the new. > That is what I have in mind. A switch to flip between options. My position on this is that lustre's debugging infrastructure (in mainline) *will* be changed to use something that the rest of the kernel can and does use. Quite possibly that "something" will first be enhanced so that it is as powerful and useful as what lustre has. I suspect this will partly be pr_debug(), partly WARN_ON(), partly trace points. But I'm not very familiar with tracepoints or with lustre debugging yet so this is far from certain. pr_debug() and tracepoints can be compiled out, but only kernel-wide. There is no reason for lustre to be special there. WARN_ON() and BUG_ON() cannot be compiled out, but BUG_ON() must only be used when proceeding is unarguably worse than crashing the machine. In recent years a lot of BUG_ON()s have been removed or changed to warnings. We need to maintain that attitude. I don't like the idea of have two parallel debuging infrastructures that you can choose between - it encourages confusion and brings no benefits. Thanks, NeilBrown -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsimmons at infradead.org Wed Apr 18 13:59:15 2018 From: jsimmons at infradead.org (James Simmons) Date: Wed, 18 Apr 2018 14:59:15 +0100 (BST) Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: unable to handle kernel NULL pointer dereference at 00000050 In-Reply-To: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> References: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> Message-ID: > Hello, > > FYI this happens in mainline kernel 4.17.0-rc1. > It looks like a new regression. > > [ 7.587002] lnet_selftest_init+0x2c4/0x5d9: > lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:134 > [ 7.587002] ? lnet_selftest_exit+0x8d/0x8d: > lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 Are you running lnet selftest ? Is this a UMP setup? The reason I ask is that their is a SMP handling bug in lnet selftest. If you look at the mailing list I pushed a SMP patch series. Can you try that series and tell me if it works for you. Thanks From fengguang.wu at intel.com Wed Apr 18 13:40:58 2018 From: fengguang.wu at intel.com (Fengguang Wu) Date: Wed, 18 Apr 2018 21:40:58 +0800 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb In-Reply-To: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> Message-ID: <20180418134058.l3orjjxcpv7cxjfw@wfg-t540p.sh.intel.com> FYI, it's the same regression, however reported by KASAN. [ 19.940511] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.940884] vhci_hcd: dump_port_status_diff:150: [ 19.941126] vhci_hcd: vhci_hub_control:604: bye [ 19.941703] usb usb2: vhci_bus_suspend [ 20.967090] ================================================================== [ 20.968082] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb: cfs_trace_lock_tcd at drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c:149 [ 20.968856] Read of size 2 at addr 00000000000000a4 by task swapper/1 [ 20.969604] [ 20.969817] CPU: 0 PID: 1 Comm: swapper Tainted: G T 4.17.0-rc1 #1 [ 20.970046] Call Trace: [ 20.970046] dump_stack+0x2e/0x3e: __dump_stack at lib/dump_stack.c:77 (inlined by) dump_stack at lib/dump_stack.c:123 [ 20.970046] kasan_report+0x2f3/0x360: kasan_report_error at mm/kasan/report.c:352 (inlined by) kasan_report at mm/kasan/report.c:412 [ 20.970046] __asan_load2+0x31/0xe4 [ 20.970046] cfs_trace_lock_tcd+0x25/0xeb: cfs_trace_lock_tcd at drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c:149 [ 20.970046] libcfs_debug_vmsg2+0x18d/0xd26: libcfs_debug_vmsg2 at drivers/staging/lustre/lnet/libcfs/tracefile.c:317 [ 20.970046] ? cfs_trace_get_tage+0x957/0x957: libcfs_debug_vmsg2 at drivers/staging/lustre/lnet/libcfs/tracefile.c:293 [ 20.970046] ? mark_lock+0xe9/0xa16: mark_lock at kernel/locking/lockdep.c:3121 [ 20.970046] ? fput+0x111/0x11f: queue_delayed_work at include/linux/workqueue.h:526 (inlined by) schedule_delayed_work at include/linux/workqueue.h:627 (inlined by) fput at fs/file_table.c:280 [ 20.970046] ? lnet_ipif_enumerate+0x541/0x588: lnet_ipif_enumerate at drivers/staging/lustre/lnet/lnet/lib-socket.c:238 [ 20.970046] ? kasan_slab_free+0x15/0x1e: kasan_slab_free at mm/kasan/kasan.c:528 [ 20.970046] ? kfree+0x215/0x2cb: slab_free_hook at mm/slub.c:1388 (inlined by) slab_free_freelist_hook at mm/slub.c:1415 (inlined by) slab_free at mm/slub.c:2988 (inlined by) kfree at mm/slub.c:3944 [ 20.970046] libcfs_debug_msg+0x9b/0xc5: libcfs_debug_msg at drivers/staging/lustre/lnet/libcfs/tracefile.c:278 [ 20.970046] ? libcfs_debug_vmsg2+0xd26/0xd26: libcfs_debug_msg at drivers/staging/lustre/lnet/libcfs/tracefile.c:278 [ 20.970046] ksocknal_startup+0x341/0x1228: ksocknal_enumerate_interfaces at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2634 (inlined by) ksocknal_startup at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2822 [ 20.970046] ? __asan_loadN+0x1d/0x26 [ 20.970046] ? pvclock_clocksource_read+0x162/0x296: pvclock_clocksource_read at arch/x86/kernel/pvclock.c:89 [ 20.970046] ? ksocknal_base_startup+0xbae/0xbae: ksocknal_startup at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2796 [ 20.970046] ? pvclock_read_flags+0x5d/0x5d: pvclock_clocksource_read at arch/x86/kernel/pvclock.c:79 [ 20.970046] ? kasan_check_read+0x1f/0x28: kasan_check_read at mm/kasan/kasan.c:272 [ 20.970046] ? kvm_clock_read+0x24/0x3a: kvm_clock_read at arch/x86/kernel/kvmclock.c:89 [ 20.970046] ? kasan_check_write+0x22/0x2b: kasan_check_write at mm/kasan/kasan.c:278 [ 20.970046] ? sched_clock_local+0xc8/0xfa [ 20.970046] ? reacquire_held_locks+0x1cd/0x1cd: lock_release at kernel/locking/lockdep.c:3929 [ 20.970046] ? cfs_percpt_lock+0xdf/0x1ad: spin_lock at include/linux/spinlock.h:310 (inlined by) cfs_percpt_lock at drivers/staging/lustre/lnet/libcfs/libcfs_lock.c:111 [ 20.970046] ? do_raw_spin_unlock+0x100/0x10d: arch_spin_unlock at include/linux/spinlock_up.h:48 (inlined by) do_raw_spin_unlock at kernel/locking/spinlock_debug.c:135 [ 20.970046] ? _raw_spin_unlock+0x37/0x4e: __raw_spin_unlock at include/linux/spinlock_api_smp.h:151 (inlined by) _raw_spin_unlock at kernel/locking/spinlock.c:176 [ 20.970046] ? cfs_percpt_unlock+0x66/0x13a: spin_unlock at include/linux/spinlock.h:350 (inlined by) cfs_percpt_unlock at drivers/staging/lustre/lnet/libcfs/libcfs_lock.c:140 [ 20.970046] lnet_startup_lndni+0x62a/0xf84: lnet_startup_lndni at drivers/staging/lustre/lnet/lnet/api-ni.c:1306 [ 20.970046] ? lnet_shutdown_lndni+0xcc/0xcc: lnet_startup_lndni at drivers/staging/lustre/lnet/lnet/api-ni.c:1210 [ 20.970046] ? __schedule+0xbff/0xc7f: context_switch at kernel/sched/core.c:2851 (inlined by) __schedule at kernel/sched/core.c:3490 [ 20.970046] ? firmware_map_remove+0x265/0x265: __schedule at kernel/sched/core.c:3401 [ 20.970046] ? kasan_check_read+0x1f/0x28: kasan_check_read at mm/kasan/kasan.c:272 [ 20.970046] LNetNIInit+0x5d4/0xbf8: lnet_startup_lndnis at drivers/staging/lustre/lnet/lnet/api-ni.c:1385 (inlined by) LNetNIInit at drivers/staging/lustre/lnet/lnet/api-ni.c:1543 [ 20.970046] ? lnet_lib_exit+0x147/0x147: LNetNIInit at drivers/staging/lustre/lnet/lnet/api-ni.c:1497 [ 20.970046] ? del_timer+0x6d/0xf8: del_timer at kernel/time/timer.c:1200 [ 20.970046] ? add_timer_on+0x32b/0x32b: del_timer at kernel/time/timer.c:1193 [ 20.970046] ? _raw_spin_unlock_irqrestore+0x74/0x9e: __raw_spin_unlock_irqrestore at include/linux/spinlock_api_smp.h:160 (inlined by) _raw_spin_unlock_irqrestore at kernel/locking/spinlock.c:184 [ 20.970046] ? trace_hardirqs_on_caller+0x2c8/0x33d: trace_hardirqs_on_caller at kernel/locking/lockdep.c:2884 [ 20.970046] ? schedule_timeout+0x82b/0x8a7: schedule_timeout at kernel/time/timer.c:1807 [ 20.970046] ? kasan_kmalloc+0x1c5/0x1e1: save_stack at mm/kasan/kasan.c:454 (inlined by) set_track at mm/kasan/kasan.c:460 (inlined by) kasan_kmalloc at mm/kasan/kasan.c:553 [ 20.970046] ? console_conditional_schedule+0x44/0x44: schedule_timeout at kernel/time/timer.c:1763 [ 20.970046] ? do_one_initcall+0x158/0x3ac: do_one_initcall at init/main.c:883 [ 20.970046] ? kernel_init_freeable+0x2b8/0x434: do_initcall_level at init/main.c:951 (inlined by) do_initcalls at init/main.c:959 (inlined by) do_basic_setup at init/main.c:977 (inlined by) kernel_init_freeable at init/main.c:1127 [ 20.970046] ? kernel_init+0x13/0x1ae: kernel_init at init/main.c:1053 [ 20.970046] ? ret_from_fork+0x24/0x30: ret_from_fork at arch/x86/entry/entry_64.S:418 [ 20.970046] ? __check_object_size+0x8d7/0xa08: __check_object_size at mm/usercopy.c:262 [ 20.970046] ? usercopy_abort+0xb7/0xb7: __check_object_size at mm/usercopy.c:250 [ 20.970046] ? __lock_is_held+0x39/0xbb: __lock_is_held at kernel/locking/lockdep.c:3737 (discriminator 1) [ 20.970046] ? mark_held_locks+0x2c/0xb2: mark_held_locks at kernel/locking/lockdep.c:2795 (discriminator 1) [ 20.970046] ? debug_check_no_locks_freed+0x237/0x25f: debug_check_no_locks_freed at kernel/locking/lockdep.c:4421 (discriminator 2) [ 20.970046] ? collect_expired_timers+0x23b/0x23b: process_timeout at kernel/time/timer.c:1727 [ 20.970046] ? lockdep_init_map+0x10/0x19: lockdep_init_map at kernel/locking/lockdep.c:3239 [ 20.970046] srpc_startup+0x136/0x352: srpc_startup at drivers/staging/lustre/lnet/selftest/rpc.c:1613 [ 20.970046] ? srpc_shutdown+0x1f0/0x1f0: srpc_startup at drivers/staging/lustre/lnet/selftest/rpc.c:1599 [ 20.970046] ? kvmalloc_node+0x6b/0xb6: __kmalloc_node at include/linux/slab.h:383 (inlined by) kmalloc_node at include/linux/slab.h:554 (inlined by) kvmalloc_node at mm/util.c:421 [ 20.970046] lnet_selftest_init+0x33a/0x4f5: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:134 [ 20.970046] ? lnet_selftest_exit+0x13e/0x13e: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 [ 20.970046] ? lustre_insert_debugfs+0x150/0x150: libcfs_init at drivers/staging/lustre/lnet/libcfs/module.c:531 [ 20.970046] ? lnet_init+0x1df/0x1df: ksocklnd_init at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2885 [ 20.970046] ? lnet_selftest_exit+0x13e/0x13e: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 [ 20.970046] do_one_initcall+0x158/0x3ac: do_one_initcall at init/main.c:883 [ 20.970046] ? start_kernel+0xbf5/0xbf5: do_one_initcall at init/main.c:874 [ 20.970046] kernel_init_freeable+0x2b8/0x434: do_initcall_level at init/main.c:951 (inlined by) do_initcalls at init/main.c:959 (inlined by) do_basic_setup at init/main.c:977 (inlined by) kernel_init_freeable at init/main.c:1127 [ 20.970046] ? rest_init+0x1d2/0x1d2: kernel_init at init/main.c:1050 [ 20.970046] kernel_init+0x13/0x1ae: kernel_init at init/main.c:1053 [ 20.970046] ? rest_init+0x1d2/0x1d2: kernel_init at init/main.c:1050 [ 20.970046] ret_from_fork+0x24/0x30: ret_from_fork at arch/x86/entry/entry_64.S:418 [ 20.970046] ================================================================== [ 20.970046] Disabling lock debugging due to kernel taint [ 21.007543] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a4 [ 21.009103] PGD 0 P4D 0 [ 21.009432] Oops: 0000 [#1] DEBUG_PAGEALLOC KASAN PTI [ 21.010063] CPU: 0 PID: 1 Comm: swapper Tainted: G B T 4.17.0-rc1 #1 [ 21.011023] RIP: 0010:cfs_trace_lock_tcd+0x25/0xeb: cfs_trace_lock_tcd at drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c:149 [ 21.011650] RSP: 0000:ffff880014c87380 EFLAGS: 00010202 [ 21.012299] RAX: 0000000000000202 RBX: 0000000000000000 RCX: ffffffff8119215d [ 21.013197] RDX: dffffc0000000000 RSI: 0000000000000003 RDI: 0000000000000202 [ 21.014074] RBP: ffff880014c87398 R08: 0000000000000001 R09: 0000000000000001 [ 21.014940] R10: ffffed0002990e5a R11: 0000000000000001 R12: 00000000000000a4 [ 21.015818] R13: 0000000000000000 R14: ffff88001402d680 R15: ffff880014c87970 [ 21.016634] FS: 0000000000000000(0000) GS:ffffffff842e9000(0000) knlGS:0000000000000000 [ 21.016892] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 21.016892] CR2: 00000000000000a4 CR3: 0000000004226000 CR4: 00000000000006f0 [ 21.016892] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 21.016892] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 21.016892] Call Trace: [ 21.016892] libcfs_debug_vmsg2+0x18d/0xd26: libcfs_debug_vmsg2 at drivers/staging/lustre/lnet/libcfs/tracefile.c:317 [ 21.016892] ? cfs_trace_get_tage+0x957/0x957: libcfs_debug_vmsg2 at drivers/staging/lustre/lnet/libcfs/tracefile.c:293 [ 21.016892] ? mark_lock+0xe9/0xa16: mark_lock at kernel/locking/lockdep.c:3121 [ 21.016892] ? fput+0x111/0x11f: queue_delayed_work at include/linux/workqueue.h:526 (inlined by) schedule_delayed_work at include/linux/workqueue.h:627 (inlined by) fput at fs/file_table.c:280 [ 21.016892] ? lnet_ipif_enumerate+0x541/0x588: lnet_ipif_enumerate at drivers/staging/lustre/lnet/lnet/lib-socket.c:238 [ 21.016892] ? kasan_slab_free+0x15/0x1e: kasan_slab_free at mm/kasan/kasan.c:528 [ 21.016892] ? kfree+0x215/0x2cb: slab_free_hook at mm/slub.c:1388 (inlined by) slab_free_freelist_hook at mm/slub.c:1415 (inlined by) slab_free at mm/slub.c:2988 (inlined by) kfree at mm/slub.c:3944 [ 21.016892] libcfs_debug_msg+0x9b/0xc5: libcfs_debug_msg at drivers/staging/lustre/lnet/libcfs/tracefile.c:278 [ 21.016892] ? libcfs_debug_vmsg2+0xd26/0xd26: libcfs_debug_msg at drivers/staging/lustre/lnet/libcfs/tracefile.c:278 [ 21.016892] ksocknal_startup+0x341/0x1228: ksocknal_enumerate_interfaces at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2634 (inlined by) ksocknal_startup at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2822 [ 21.016892] ? __asan_loadN+0x1d/0x26 [ 21.016892] ? pvclock_clocksource_read+0x162/0x296: pvclock_clocksource_read at arch/x86/kernel/pvclock.c:89 [ 21.016892] ? ksocknal_base_startup+0xbae/0xbae: ksocknal_startup at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2796 [ 21.016892] ? pvclock_read_flags+0x5d/0x5d: pvclock_clocksource_read at arch/x86/kernel/pvclock.c:79 [ 21.016892] ? kasan_check_read+0x1f/0x28: kasan_check_read at mm/kasan/kasan.c:272 [ 21.016892] ? kvm_clock_read+0x24/0x3a: kvm_clock_read at arch/x86/kernel/kvmclock.c:89 [ 21.016892] ? kasan_check_write+0x22/0x2b: kasan_check_write at mm/kasan/kasan.c:278 [ 21.016892] ? sched_clock_local+0xc8/0xfa [ 21.016892] ? reacquire_held_locks+0x1cd/0x1cd: lock_release at kernel/locking/lockdep.c:3929 [ 21.016892] ? cfs_percpt_lock+0xdf/0x1ad: spin_lock at include/linux/spinlock.h:310 (inlined by) cfs_percpt_lock at drivers/staging/lustre/lnet/libcfs/libcfs_lock.c:111 [ 21.016892] ? do_raw_spin_unlock+0x100/0x10d: arch_spin_unlock at include/linux/spinlock_up.h:48 (inlined by) do_raw_spin_unlock at kernel/locking/spinlock_debug.c:135 [ 21.016892] ? _raw_spin_unlock+0x37/0x4e: __raw_spin_unlock at include/linux/spinlock_api_smp.h:151 (inlined by) _raw_spin_unlock at kernel/locking/spinlock.c:176 [ 21.016892] ? cfs_percpt_unlock+0x66/0x13a: spin_unlock at include/linux/spinlock.h:350 (inlined by) cfs_percpt_unlock at drivers/staging/lustre/lnet/libcfs/libcfs_lock.c:140 [ 21.016892] lnet_startup_lndni+0x62a/0xf84: lnet_startup_lndni at drivers/staging/lustre/lnet/lnet/api-ni.c:1306 [ 21.016892] ? lnet_shutdown_lndni+0xcc/0xcc: lnet_startup_lndni at drivers/staging/lustre/lnet/lnet/api-ni.c:1210 [ 21.016892] ? __schedule+0xbff/0xc7f: context_switch at kernel/sched/core.c:2851 (inlined by) __schedule at kernel/sched/core.c:3490 [ 21.016892] ? firmware_map_remove+0x265/0x265: __schedule at kernel/sched/core.c:3401 [ 21.016892] ? kasan_check_read+0x1f/0x28: kasan_check_read at mm/kasan/kasan.c:272 [ 21.016892] LNetNIInit+0x5d4/0xbf8: lnet_startup_lndnis at drivers/staging/lustre/lnet/lnet/api-ni.c:1385 (inlined by) LNetNIInit at drivers/staging/lustre/lnet/lnet/api-ni.c:1543 [ 21.016892] ? lnet_lib_exit+0x147/0x147: LNetNIInit at drivers/staging/lustre/lnet/lnet/api-ni.c:1497 [ 21.016892] ? del_timer+0x6d/0xf8: del_timer at kernel/time/timer.c:1200 [ 21.016892] ? add_timer_on+0x32b/0x32b: del_timer at kernel/time/timer.c:1193 [ 21.016892] ? _raw_spin_unlock_irqrestore+0x74/0x9e: __raw_spin_unlock_irqrestore at include/linux/spinlock_api_smp.h:160 (inlined by) _raw_spin_unlock_irqrestore at kernel/locking/spinlock.c:184 [ 21.016892] ? trace_hardirqs_on_caller+0x2c8/0x33d: trace_hardirqs_on_caller at kernel/locking/lockdep.c:2884 [ 21.016892] ? schedule_timeout+0x82b/0x8a7: schedule_timeout at kernel/time/timer.c:1807 [ 21.016892] ? kasan_kmalloc+0x1c5/0x1e1: save_stack at mm/kasan/kasan.c:454 (inlined by) set_track at mm/kasan/kasan.c:460 (inlined by) kasan_kmalloc at mm/kasan/kasan.c:553 [ 21.016892] ? console_conditional_schedule+0x44/0x44: schedule_timeout at kernel/time/timer.c:1763 [ 21.016892] ? do_one_initcall+0x158/0x3ac: do_one_initcall at init/main.c:883 [ 21.016892] ? kernel_init_freeable+0x2b8/0x434: do_initcall_level at init/main.c:951 (inlined by) do_initcalls at init/main.c:959 (inlined by) do_basic_setup at init/main.c:977 (inlined by) kernel_init_freeable at init/main.c:1127 [ 21.016892] ? kernel_init+0x13/0x1ae: kernel_init at init/main.c:1053 [ 21.016892] ? ret_from_fork+0x24/0x30: ret_from_fork at arch/x86/entry/entry_64.S:418 [ 21.016892] ? __check_object_size+0x8d7/0xa08: __check_object_size at mm/usercopy.c:262 [ 21.016892] ? usercopy_abort+0xb7/0xb7: __check_object_size at mm/usercopy.c:250 [ 21.016892] ? __lock_is_held+0x39/0xbb: __lock_is_held at kernel/locking/lockdep.c:3737 (discriminator 1) [ 21.016892] ? mark_held_locks+0x2c/0xb2: mark_held_locks at kernel/locking/lockdep.c:2795 (discriminator 1) [ 21.016892] ? debug_check_no_locks_freed+0x237/0x25f: debug_check_no_locks_freed at kernel/locking/lockdep.c:4421 (discriminator 2) [ 21.016892] ? collect_expired_timers+0x23b/0x23b: process_timeout at kernel/time/timer.c:1727 [ 21.016892] ? lockdep_init_map+0x10/0x19: lockdep_init_map at kernel/locking/lockdep.c:3239 [ 21.016892] srpc_startup+0x136/0x352: srpc_startup at drivers/staging/lustre/lnet/selftest/rpc.c:1613 [ 21.016892] ? srpc_shutdown+0x1f0/0x1f0: srpc_startup at drivers/staging/lustre/lnet/selftest/rpc.c:1599 [ 21.016892] ? kvmalloc_node+0x6b/0xb6: __kmalloc_node at include/linux/slab.h:383 (inlined by) kmalloc_node at include/linux/slab.h:554 (inlined by) kvmalloc_node at mm/util.c:421 [ 21.016892] lnet_selftest_init+0x33a/0x4f5: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:134 [ 21.016892] ? lnet_selftest_exit+0x13e/0x13e: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 [ 21.016892] ? lustre_insert_debugfs+0x150/0x150: libcfs_init at drivers/staging/lustre/lnet/libcfs/module.c:531 [ 21.016892] ? lnet_init+0x1df/0x1df: ksocklnd_init at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2885 [ 21.016892] ? lnet_selftest_exit+0x13e/0x13e: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 [ 21.016892] do_one_initcall+0x158/0x3ac: do_one_initcall at init/main.c:883 [ 21.016892] ? start_kernel+0xbf5/0xbf5: do_one_initcall at init/main.c:874 [ 21.016892] kernel_init_freeable+0x2b8/0x434: do_initcall_level at init/main.c:951 (inlined by) do_initcalls at init/main.c:959 (inlined by) do_basic_setup at init/main.c:977 (inlined by) kernel_init_freeable at init/main.c:1127 [ 21.016892] ? rest_init+0x1d2/0x1d2: kernel_init at init/main.c:1050 [ 21.016892] kernel_init+0x13/0x1ae: kernel_init at init/main.c:1053 [ 21.016892] ? rest_init+0x1d2/0x1d2: kernel_init at init/main.c:1050 [ 21.016892] ret_from_fork+0x24/0x30: ret_from_fork at arch/x86/entry/entry_64.S:418 [ 21.016892] Code: d4 05 31 c0 5d c3 55 48 ff 05 2b bf d4 05 48 89 e5 41 55 41 54 4c 8d a7 a4 00 00 00 53 48 89 fb 41 89 f5 4c 89 e7 e8 16 a9 18 ff <66> 83 bb a4 00 00 00 02 76 24 48 c7 c6 20 37 75 85 48 c7 c7 40 [ 21.016892] RIP: cfs_trace_lock_tcd+0x25/0xeb: cfs_trace_lock_tcd at drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c:149 RSP: ffff880014c87380 [ 21.016892] CR2: 00000000000000a4 [ 21.016892] ---[ end trace be7ae81fe247d9ae ]--- [ 21.016892] Kernel panic - not syncing: Fatal exception Attached the full dmesg, kconfig and reproduce scripts. Thanks, Fengguang -------------- next part -------------- early console in setup code early console in extract_kernel input_data: 0x0000000006995295 input_len: 0x0000000001885d8b output: 0x0000000001000000 output_len: 0x00000000053754c8 kernel_total_size: 0x000000000723e000 trampoline_32bit: 0x000000000009d000 Decompressing Linux... Parsing ELF... done. Booting the kernel. [ 0.000000] Linux version 4.17.0-rc1 (kbuild at lkp-wsm-ep1) (gcc version 7.3.0 (Debian 7.3.0-1)) #1 Tue Apr 17 12:03:01 CST 2018 [ 0.000000] Command line: ip=::::vm-lkp-hsw01-openwrt-ia32-7::dhcp root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-hsw01-openwrt-ia32-7/boot-1-openwrt-i386-2016-03-16.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180417-30956-psgkzl-wait_kernel-0.yaml ARCH=x86_64 kconfig=x86_64-randconfig-ws0-03101549 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=no [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Centaur CentaurHauls [ 0.000000] x86/fpu: x87 FPU will use FXSAVE [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001a3dffff] usable [ 0.000000] BIOS-e820: [mem 0x000000001a3e0000-0x000000001a3fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] bootconsole [earlyser0] enabled [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] Hypervisor detected: KVM [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0x1a3e0 max_arch_pfn = 0x400000000 [ 0.000000] MTRR default type: write-back [ 0.000000] MTRR fixed ranges enabled: [ 0.000000] 00000-9FFFF write-back [ 0.000000] A0000-BFFFF uncachable [ 0.000000] C0000-FFFFF write-protect [ 0.000000] MTRR variable ranges enabled: [ 0.000000] 0 base 0080000000 mask FF80000000 uncachable [ 0.000000] 1 disabled [ 0.000000] 2 disabled [ 0.000000] 3 disabled [ 0.000000] 4 disabled [ 0.000000] 5 disabled [ 0.000000] 6 disabled [ 0.000000] 7 disabled [ 0.000000] x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC [ 0.000000] Base memory trampoline at [ (ptrval)] 99000 size 24576 [ 0.000000] BRK [0x08228000, 0x08228fff] PGTABLE [ 0.000000] BRK [0x08229000, 0x08229fff] PGTABLE [ 0.000000] BRK [0x0822a000, 0x0822afff] PGTABLE [ 0.000000] BRK [0x0822b000, 0x0822bfff] PGTABLE [ 0.000000] BRK [0x0822c000, 0x0822cfff] PGTABLE [ 0.000000] BRK [0x0822d000, 0x0822dfff] PGTABLE [ 0.000000] RAMDISK: [mem 0x1a0bf000-0x1a3dffff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F68D0 000014 (v00 BOCHS ) [ 0.000000] ACPI: RSDT 0x000000001A3E15CE 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACP 0x000000001A3E142A 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001) [ 0.000000] ACPI: DSDT 0x000000001A3E0040 0013EA (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACS 0x000000001A3E0000 000040 [ 0.000000] ACPI: APIC 0x000000001A3E151E 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001) [ 0.000000] ACPI: HPET 0x000000001A3E1596 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001) [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] mapped APIC to ffffffffff5fd000 ( fee00000) [ 0.000000] kvm-clock: cpu 0, msr 0:1a0bd001, primary cpu clock [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: using sched offset of 270754956 cycles [ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] DMA32 [mem 0x0000000001000000-0x000000001a3dffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff] [ 0.000000] node 0: [mem 0x0000000000100000-0x000000001a3dffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000001a3dffff] [ 0.000000] On node 0 totalpages: 107390 [ 0.000000] DMA zone: 64 pages used for memmap [ 0.000000] DMA zone: 21 pages reserved [ 0.000000] DMA zone: 3998 pages, LIFO batch:0 [ 0.000000] DMA32 zone: 1616 pages used for memmap [ 0.000000] DMA32 zone: 103392 pages, LIFO batch:31 [ 0.000000] Reserved but unavailable: 98 pages [ 0.000000] kasan: KernelAddressSanitizer initialized [ 0.000000] ACPI: PM-Timer IO Port: 0x608 [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1]) [ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 00, APIC ID 0, APIC INT 02 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 05, APIC ID 0, APIC INT 05 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 09, APIC ID 0, APIC INT 09 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 0a, APIC ID 0, APIC INT 0a [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 0b, APIC ID 0, APIC INT 0b [ 0.000000] ACPI: IRQ0 used by override. [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 01, APIC ID 0, APIC INT 01 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 03, APIC ID 0, APIC INT 03 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 04, APIC ID 0, APIC INT 04 [ 0.000000] ACPI: IRQ5 used by override. [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 06, APIC ID 0, APIC INT 06 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 07, APIC ID 0, APIC INT 07 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 08, APIC ID 0, APIC INT 08 [ 0.000000] ACPI: IRQ9 used by override. [ 0.000000] ACPI: IRQ10 used by override. [ 0.000000] ACPI: IRQ11 used by override. [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0c, APIC ID 0, APIC INT 0c [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0d, APIC ID 0, APIC INT 0d [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0e, APIC ID 0, APIC INT 0e [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0f, APIC ID 0, APIC INT 0f [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000 [ 0.000000] mapped IOAPIC to ffffffffff5fc000 (fec00000) [ 0.000000] KVM setup async PF for cpu 0 [ 0.000000] kvm-stealtime: cpu 0, msr 434f600 [ 0.000000] e820: [mem 0x1a400000-0xfeffbfff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.000000] random: fast init done [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 105689 [ 0.000000] Kernel command line: ip=::::vm-lkp-hsw01-openwrt-ia32-7::dhcp root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-hsw01-openwrt-ia32-7/boot-1-openwrt-i386-2016-03-16.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180417-30956-psgkzl-wait_kernel-0.yaml ARCH=x86_64 kconfig=x86_64-randconfig-ws0-03101549 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 [ 0.000000] sysrq: sysrq always enabled. [ 0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) [ 0.000000] Memory: 231040K/429560K available (30732K kernel code, 30174K rwdata, 17200K rodata, 1908K init, 33484K bss, 198520K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Kernel/User page tables isolation: enabled [ 0.010000] Running RCU self tests [ 0.010000] NR_IRQS: 4352, nr_irqs: 48, preallocated irqs: 16 [ 0.010000] console [ttyS0] enabled [ 0.010000] bootconsole [earlyser0] disabled [ 0.010000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.010000] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.010000] ... MAX_LOCK_DEPTH: 48 [ 0.010000] ... MAX_LOCKDEP_KEYS: 8191 [ 0.010000] ... CLASSHASH_SIZE: 4096 [ 0.010000] ... MAX_LOCKDEP_ENTRIES: 32768 [ 0.010000] ... MAX_LOCKDEP_CHAINS: 65536 [ 0.010000] ... CHAINHASH_SIZE: 32768 [ 0.010000] memory used by lock dependency info: 7903 kB [ 0.010000] per task-struct memory footprint: 2688 bytes [ 0.010000] ACPI: Core revision 20180313 [ 0.010000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns [ 0.010000] hpet clockevent registered [ 0.010043] APIC: Switch to symmetric I/O mode setup [ 0.010553] x2apic enabled [ 0.010956] Switched APIC routing to physical x2apic. [ 0.011331] enabled ExtINT on CPU#0 [ 0.012159] ENABLING IO-APIC IRQs [ 0.012458] init IO_APIC IRQs [ 0.012687] apic 0 pin 0 not connected [ 0.013099] IOAPIC[0]: Set routing entry (0-1 -> 0xef -> IRQ 1 Mode:0 Active:0 Dest:0) [ 0.013779] IOAPIC[0]: Set routing entry (0-2 -> 0x30 -> IRQ 0 Mode:0 Active:0 Dest:0) [ 0.014391] IOAPIC[0]: Set routing entry (0-3 -> 0xef -> IRQ 3 Mode:0 Active:0 Dest:0) [ 0.015131] IOAPIC[0]: Set routing entry (0-4 -> 0xef -> IRQ 4 Mode:0 Active:0 Dest:0) [ 0.016126] IOAPIC[0]: Set routing entry (0-5 -> 0xef -> IRQ 5 Mode:1 Active:0 Dest:0) [ 0.017129] IOAPIC[0]: Set routing entry (0-6 -> 0xef -> IRQ 6 Mode:0 Active:0 Dest:0) [ 0.018137] IOAPIC[0]: Set routing entry (0-7 -> 0xef -> IRQ 7 Mode:0 Active:0 Dest:0) [ 0.019142] IOAPIC[0]: Set routing entry (0-8 -> 0xef -> IRQ 8 Mode:0 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-9 -> 0xef -> IRQ 9 Mode:1 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-10 -> 0xef -> IRQ 10 Mode:1 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-11 -> 0xef -> IRQ 11 Mode:1 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-12 -> 0xef -> IRQ 12 Mode:0 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-13 -> 0xef -> IRQ 13 Mode:0 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-14 -> 0xef -> IRQ 14 Mode:0 Active:0 Dest:0) [ 0.020000] IOAPIC[0]: Set routing entry (0-15 -> 0xef -> IRQ 15 Mode:0 Active:0 Dest:0) [ 0.020000] apic 0 pin 16 not connected [ 0.020000] apic 0 pin 17 not connected [ 0.020000] apic 0 pin 18 not connected [ 0.020000] apic 0 pin 19 not connected [ 0.020000] apic 0 pin 20 not connected [ 0.020000] apic 0 pin 21 not connected [ 0.020000] apic 0 pin 22 not connected [ 0.020000] apic 0 pin 23 not connected [ 0.020000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 0.020000] tsc: Detected 2593.992 MHz processor [ 0.020000] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x25641074d3b, max_idle_ns: 440795244898 ns [ 0.020000] Calibrating delay loop (skipped) preset value.. 5187.98 BogoMIPS (lpj=25939920) [ 0.020000] pid_max: default: 32768 minimum: 301 [ 0.020000] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes) [ 0.020000] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes) [ 0.021561] mce: CPU supports 10 MCE banks [ 0.022172] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 0.022782] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 0.023454] CPU: Intel QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3) [ 0.024481] Spectre V2 : Spectre mitigation: kernel not compiled with retpoline; no mitigation available! [ 0.030073] Performance Events: PMU not available due to virtualization, using software events only. [ 0.041231] Using local APIC timer interrupts. [ 0.041231] calibrating APIC timer ... [ 0.050000] ... lapic delta = 6249955 [ 0.050000] ... PM-Timer delta = 357958 [ 0.050000] ... PM-Timer result ok [ 0.050000] ..... delta 6249955 [ 0.050000] ..... mult: 268433523 [ 0.050000] ..... calibration result: 9999928 [ 0.050000] ..... CPU clock speed is 2594.0194 MHz. [ 0.050000] ..... host bus clock speed is 999.9928 MHz. [ 0.050000] devtmpfs: initialized [ 0.050000] x86/mm: Memory block size: 128MB [ 0.050000] gcov: version magic: 0x4137332a [ 0.066466] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.067220] futex hash table entries: 256 (order: 2, 24576 bytes) [ 0.068008] prandom: seed boundary self test passed [ 0.070041] prandom: 100 self tests passed [ 0.073606] NET: Registered protocol family 16 [ 0.079023] cpuidle: using governor menu [ 0.081433] ACPI: bus type PCI registered [ 0.082060] PCI: Using configuration type 1 for base access [ 0.173954] cryptd: max_cpu_qlen set to 1000 [ 0.175725] ACPI: Added _OSI(Module Device) [ 0.176157] ACPI: Added _OSI(Processor Device) [ 0.176598] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.177070] ACPI: Added _OSI(Processor Aggregator Device) [ 0.177628] ACPI: Added _OSI(Linux-Dell-Video) [ 0.223684] ACPI: 1 ACPI AML tables successfully acquired and loaded [ 0.233804] workqueue: round-robin CPU selection forced, expect performance impact [ 0.241272] ACPI: Interpreter enabled [ 0.241766] ACPI: (supports S0 S3 S5) [ 0.242066] ACPI: Using IOAPIC for interrupt routing [ 0.242629] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.246303] ACPI: Enabled 2 GPEs in block 00 to 0F [ 0.336574] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.337129] acpi PNP0A03:00: _OSC: OS supports [Segments] [ 0.337728] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM [ 0.339232] PCI host bridge to bus 0000:00 [ 0.339560] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] [ 0.340029] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] [ 0.340531] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] [ 0.341078] pci_bus 0000:00: root bus resource [mem 0x1a400000-0xfebfffff window] [ 0.341643] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.342184] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 [ 0.346240] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 [ 0.350136] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 [ 0.352896] pci 0000:00:01.1: reg 0x20: [io 0xc040-0xc04f] [ 0.354404] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.354928] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.355403] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.355924] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.359295] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 [ 0.360202] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI [ 0.360740] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB [ 0.364664] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 [ 0.367362] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref] [ 0.370028] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff] [ 0.376297] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref] [ 0.380775] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000 [ 0.382928] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff] [ 0.384147] pci 0000:00:03.0: reg 0x14: [io 0xc000-0xc03f] [ 0.388955] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref] [ 0.392921] pci 0000:00:04.0: [8086:25ab] type 00 class 0x088000 [ 0.393818] pci 0000:00:04.0: reg 0x10: [mem 0xfebf1000-0xfebf100f] [ 0.399967] pci_bus 0000:00: on NUMA node 0 [ 0.408842] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) [ 0.411785] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) [ 0.414287] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) [ 0.416773] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) [ 0.418135] ACPI: PCI Interrupt Link [LNKS] (IRQs *9) [ 0.425196] pci 0000:00:02.0: vgaarb: setting as boot VGA device [ 0.425675] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.426312] pci 0000:00:02.0: vgaarb: bridge control possible [ 0.426750] vgaarb: loaded [ 0.429438] ACPI: bus type USB registered [ 0.430072] usbcore: registered new interface driver usbfs [ 0.430637] usbcore: registered new interface driver hub [ 0.431211] usbcore: registered new device driver usb [ 0.432726] Linux video capture interface: v2.00 [ 0.433365] pps_core: LinuxPPS API ver. 1 registered [ 0.433755] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [ 0.434543] EDAC MC: Ver: 3.0.0 [ 0.436844] FPGA manager framework [ 0.437834] Advanced Linux Sound Architecture Driver Initialized. [ 0.439003] PCI: Using ACPI for IRQ routing [ 0.439527] PCI: pci_cache_line_size set to 64 bytes [ 0.440238] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] [ 0.441017] e820: reserve RAM buffer [mem 0x1a3e0000-0x1bffffff] [ 0.445834] nfc: nfc_init: NFC Core ver 0.1 [ 0.446784] NET: Registered protocol family 39 [ 0.451278] clocksource: Switched to clocksource kvm-clock [ 0.453067] VFS: Disk quotas dquot_6.6.0 [ 0.453711] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.455777] pnp: PnP ACPI init [ 0.457750] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.459737] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active) [ 0.460642] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active) [ 0.461787] pnp 00:03: [dma 2] [ 0.462721] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active) [ 0.465262] pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active) [ 0.467668] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.470149] pnp 00:06: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.479749] pnp: PnP ACPI: found 7 devices [ 0.507998] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.518408] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] [ 0.518923] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] [ 0.519374] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] [ 0.519875] pci_bus 0000:00: resource 7 [mem 0x1a400000-0xfebfffff window] [ 0.523611] NET: Registered protocol family 2 [ 0.526183] tcp_listen_portaddr_hash hash table entries: 256 (order: 2, 22528 bytes) [ 0.526845] TCP established hash table entries: 4096 (order: 3, 32768 bytes) [ 0.527519] TCP bind hash table entries: 4096 (order: 6, 327680 bytes) [ 0.528742] TCP: Hash tables configured (established 4096 bind 4096) [ 0.529433] UDP hash table entries: 256 (order: 3, 49152 bytes) [ 0.530005] UDP-Lite hash table entries: 256 (order: 3, 49152 bytes) [ 0.531162] NET: Registered protocol family 1 [ 0.532748] RPC: Registered named UNIX socket transport module. [ 0.533219] RPC: Registered udp transport module. [ 0.533569] RPC: Registered tcp transport module. [ 0.533914] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.538273] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.538832] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.539311] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.539905] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] [ 0.540639] PCI: CLS 0 bytes, default 64 [ 0.542049] Unpacking initramfs... [ 1.030364] kwatchdog (22) used greatest stack depth: 26312 bytes left [ 2.189507] debug: unmapping init [mem 0xffff88001a0bf000-0xffff88001a3dffff] [ 2.208343] PCLMULQDQ-NI instructions are not detected. [ 2.209601] AVX or AES-NI instructions are not detected. [ 2.210052] CPU feature 'AVX registers' is not supported. [ 2.210459] CPU feature 'AVX registers' is not supported. [ 2.210854] AVX2 or AES-NI instructions are not detected. [ 2.211250] AVX2 instructions are not detected. [ 3.200239] tsc: Refined TSC clocksource calibration: 2593.993 MHz [ 3.200785] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x256411d258c, max_idle_ns: 440795337342 ns [ 8.827981] rcu-torture:--- Start of test: nreaders=1 nfakewriters=4 stat_interval=60 verbose=1 test_no_idle_hz=1 shuffle_interval=3 stutter=5 irqreader=1 fqs_duration=0 fqs_holdoff=0 fqs_stutter=3 test_boost=1/0 test_boost_interval=7 test_boost_duration=4 shutdown_secs=0 stall_cpu=0 stall_cpu_holdoff=10 stall_cpu_irqsoff=0 n_barrier_cbs=0 onoff_interval=0 onoff_holdoff=0 [ 8.833059] rcu-torture: Creating rcu_torture_writer task [ 8.834076] rcu-torture: Creating rcu_torture_fakewriter task [ 8.834818] rcu-torture: rcu_torture_writer task started [ 8.835395] rcu-torture: GP expediting controlled from boot/sysfs for rcu. [ 8.836083] rcu_torture_writer: Testing conditional GPs. [ 8.836604] rcu_torture_writer: Testing expedited GPs. [ 8.837127] rcu_torture_writer: Testing asynchronous GPs. [ 8.837658] rcu_torture_writer: Testing normal GPs. [ 8.838236] rcu-torture: Creating rcu_torture_fakewriter task [ 8.839000] rcu-torture: rcu_torture_fakewriter task started [ 8.839664] rcu-torture: Creating rcu_torture_fakewriter task [ 8.840451] rcu-torture: rcu_torture_fakewriter task started [ 8.841111] rcu-torture: Creating rcu_torture_fakewriter task [ 8.841823] rcu-torture: rcu_torture_fakewriter task started [ 8.842493] rcu-torture: Creating rcu_torture_reader task [ 8.843207] rcu-torture: rcu_torture_fakewriter task started [ 8.843875] rcu-torture: Creating rcu_torture_stats task [ 8.844598] rcu-torture: rcu_torture_reader task started [ 8.845241] rcu-torture: Creating torture_shuffle task [ 8.845897] rcu-torture: rcu_torture_stats task started [ 8.846527] rcu-torture: Creating torture_stutter task [ 8.847205] rcu-torture: torture_shuffle task started [ 8.847828] rcu-torture: Creating rcu_torture_cbflood task [ 8.848545] rcu-torture: torture_stutter task started [ 8.862492] rcu-torture: rcu_torture_cbflood task started [ 13.100860] Initialise system trusted keyrings [ 13.102787] workingset: timestamp_bits=46 max_order=16 bucket_order=0 [ 13.179321] zbud: loaded [ 13.197351] NFS: Registering the id_resolver key type [ 13.198044] Key type id_resolver registered [ 13.198568] Key type id_legacy registered [ 13.212521] romfs: ROMFS MTD (C) 2007 Red Hat, Inc. [ 13.213697] 9p: Installing v9fs 9p2000 file system support [ 13.219036] ceph: loaded (mds proto 32) [ 13.219512] pstore: using deflate compression [ 13.231367] cryptomgr_test (85) used greatest stack depth: 25216 bytes left [ 13.247875] NET: Registered protocol family 38 [ 13.248534] Key type asymmetric registered [ 13.249043] Asymmetric key parser 'x509' registered [ 13.249634] Key type pkcs7_test registered [ 14.057793] String selftests succeeded [ 14.059173] xz_dec_test: module loaded [ 14.059468] xz_dec_test: Create a device node with 'mknod xz_dec_test c 245 0' and write .xz files to it. [ 14.063014] ipmi message handler version 39.2 [ 14.063363] ipmi device interface [ 14.063815] IPMI System Interface driver. [ 14.064739] ipmi_si: Unable to find any System Interface(s) [ 14.065164] IPMI Watchdog: driver initialized [ 14.065492] Copyright (C) 2004 MontaVista Software - IPMI Powerdown via sys_reboot. [ 14.067173] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 [ 14.068019] ACPI: Power Button [PWRF] [ 14.262277] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 14.285763] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 14.313955] 00:06: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 14.323145] lp: driver loaded but no devices found [ 14.323832] Non-volatile memory driver v1.3 [ 14.325146] telclk_interrupt = 0xf non-mcpbl0010 hw. [ 14.325933] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds). [ 14.328232] parport_pc 00:04: reported by Plug and Play ACPI [ 14.329298] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE] [ 14.411809] lp0: using parport0 (interrupt-driven). [ 14.417270] dummy-irq: no IRQ given. Use irq=N [ 14.418062] Silicon Labs C2 port support v. 0.51.0 - (C) 2007 Rodolfo Giometti [ 14.419112] c2port c2port0: C2 port uc added [ 14.419442] c2port c2port0: uc flash has 30 blocks x 512 bytes (15360 bytes total) [ 14.422591] usbcore: registered new interface driver viperboard [ 14.423429] usbcore: registered new interface driver pn533_usb [ 14.424970] nfcsim 0.2 initialized [ 14.425355] usbcore: registered new interface driver port100 [ 14.426575] L440GX flash mapping: failed to find PIIX4 ISA bridge, cannot continue [ 14.427312] platform physmap-flash.0: failed to claim resource 0: [mem 0x08000000-0x07ffffff] [ 14.428045] SBC-GXx flash: IO:0x258-0x259 MEM:0xdc000-0xdffff [ 14.428811] slram: not enough parameters. [ 14.429244] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 14.429927] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 14.430628] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 14.431297] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 14.431966] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 14.432649] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 14.433324] nand: device found, Manufacturer ID: 0x98, Chip ID: 0x39 [ 14.433787] nand: Toshiba NAND 128MiB 1,8V 8-bit [ 14.434134] nand: 128 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16 [ 14.434734] flash size: 128 MiB [ 14.434976] page size: 512 bytes [ 14.435219] OOB area size: 16 bytes [ 14.435485] sector size: 16 KiB [ 14.435721] pages number: 262144 [ 14.435963] pages per sector: 32 [ 14.436206] bus width: 8 [ 14.436406] bits in sector size: 14 [ 14.436678] bits in page size: 9 [ 14.436921] bits in OOB size: 4 [ 14.437157] flash size with OOB: 135168 KiB [ 14.437469] page address bytes: 4 [ 14.437716] sector address bytes: 3 [ 14.437976] options: 0x42 [ 14.443133] Scanning device for bad blocks [ 14.523624] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": [ 14.524118] 0x000000000000-0x000008000000 : "NAND simulator partition 0" [ 14.736585] parport0: AVR Butterfly [ 14.737327] parport0: cannot grant exclusive access for device spi-lm70llp [ 14.737871] spi_lm70llp: spi_lm70llp probe fail, status -12 [ 14.739050] HSI/SSI char device loaded [ 14.739452] eql: Equalizer2002: Simon Janes (simon at ncm.com) and David S. Miller (davem at redhat.com) [ 14.745389] libphy: Fixed MDIO Bus: probed [ 14.753478] tun: Universal TUN/TAP device driver, 1.6 [ 14.754476] arcnet: arcnet loaded [ 14.754742] arcnet:rfc1201: RFC1201 "standard" (`a') encapsulation support loaded [ 14.755279] arcnet:rfc1051: RFC1051 "simple standard" (`s') encapsulation support loaded [ 14.755891] arcnet:com90xx: COM90xx chipset support [ 15.065885] S3: No ARCnet cards found. [ 15.066263] arcnet:arc_rimi: RIM I (entirely mem-mapped) support [ 15.066706] arcnet:arc_rimi: E-mail me if you actually test the RIM I driver, please! [ 15.067265] arcnet:arc_rimi: Given: node 00h, shmem 0h, irq 0 [ 15.067700] arcnet:arc_rimi: No autoprobe for RIM I; you must specify the shmem and irq! [ 15.068601] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 15.069115] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 18.721197] PCI Interrupt Link [LNKC] enabled at IRQ 11 [ 19.623640] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56 [ 19.624225] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection [ 19.624977] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 19.625424] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 19.626020] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k [ 19.626532] igb: Copyright (c) 2007-2014 Intel Corporation. [ 19.627073] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 5.1.0-k [ 19.627630] ixgbe: Copyright (c) 1999-2016 Intel Corporation. [ 19.628525] YAM driver version 0.8 by F1OAT/F6FBB [ 19.635685] NET3 PLIP version 2.4-parport gniibe at mri.co.jp [ 19.636113] plip0: Parallel port at 0x378, using IRQ 7. [ 19.636627] usbcore: registered new interface driver catc [ 19.637143] usbcore: registered new interface driver kaweth [ 19.637697] usbcore: registered new interface driver rtl8150 [ 19.638230] usbcore: registered new interface driver r8152 [ 19.638750] usbcore: registered new interface driver lan78xx [ 19.639273] usbcore: registered new interface driver ipheth [ 19.640680] panel: could not claim access to parport0. Aborting. [ 19.641591] panel: panel driver not yet registered [ 19.642524] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 19.643018] ohci-pci: OHCI PCI platform driver [ 19.643495] ohci-platform: OHCI generic platform driver [ 19.644748] usbcore: registered new interface driver usblp [ 19.645269] usbcore: registered new interface driver usbtmc [ 19.645881] usbcore: registered new interface driver mdc800 [ 19.646294] mdc800: v0.7.5 (30/10/2000):USB Driver for Mustek MDC800 Digital Camera [ 19.646969] usbcore: registered new interface driver adutux [ 19.647494] usbcore: registered new interface driver appledisplay [ 19.648045] usbcore: registered new interface driver cypress_cy7c63 [ 19.648620] usbcore: registered new interface driver cytherm [ 19.649156] usbcore: registered new interface driver emi26 - firmware loader [ 19.649784] usbcore: registered new interface driver emi62 - firmware loader [ 19.650454] usbcore: registered new interface driver idmouse [ 19.650984] usbcore: registered new interface driver usblcd [ 19.651512] usbcore: registered new interface driver legousbtower [ 19.652068] usbcore: registered new interface driver rio500 [ 19.652594] usbcore: registered new interface driver usb_ehset_test [ 19.653164] usbcore: registered new interface driver usbsevseg [ 19.653755] usbcore: registered new interface driver yurex [ 19.656757] vhci_hcd: vhci_hcd_probe:1286: name vhci_hcd id 0 [ 19.657323] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller [ 19.657831] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 1 [ 19.658421] vhci_hcd: vhci_start:1118: enter vhci_start [ 19.658905] vhci_hcd: vhci_start:1160: created sysfs vhci_hcd.0 [ 19.662980] hub 1-0:1.0: USB hub found [ 19.663689] vhci_hcd: vhci_hub_control:335: typeReq a006 wValue 2900 wIndex 0 [ 19.664485] vhci_hcd: vhci_hub_control:388: GetHubDescriptor [ 19.664959] vhci_hcd: vhci_hub_control:596: port -1 [ 19.665319] vhci_hcd: vhci_hub_control:604: bye [ 19.665746] hub 1-0:1.0: 8 ports detected [ 19.666398] vhci_hcd: vhci_hub_control:335: typeReq a000 wValue 0 wIndex 0 [ 19.666979] vhci_hcd: vhci_hub_control:411: GetHubStatus [ 19.667404] vhci_hcd: vhci_hub_control:596: port -1 [ 19.667763] vhci_hcd: vhci_hub_control:604: bye [ 19.671595] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 1 [ 19.672103] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.672640] vhci_hcd: vhci_hub_control:596: port 0 [ 19.672994] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.673586] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.673974] vhci_hcd: dump_port_status_diff:150: [ 19.674320] vhci_hcd: vhci_hub_control:604: bye [ 19.674777] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 2 [ 19.675280] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.675814] vhci_hcd: vhci_hub_control:596: port 1 [ 19.676164] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.676755] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.677140] vhci_hcd: dump_port_status_diff:150: [ 19.677513] vhci_hcd: vhci_hub_control:604: bye [ 19.677961] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 3 [ 19.678471] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.679004] vhci_hcd: vhci_hub_control:596: port 2 [ 19.679356] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.679945] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.680021] vhci_hcd: dump_port_status_diff:150: [ 19.680021] vhci_hcd: vhci_hub_control:604: bye [ 19.681172] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 4 [ 19.681690] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.682222] vhci_hcd: vhci_hub_control:596: port 3 [ 19.682589] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.683173] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.683564] vhci_hcd: dump_port_status_diff:150: [ 19.683909] vhci_hcd: vhci_hub_control:604: bye [ 19.684357] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 5 [ 19.684865] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.685405] vhci_hcd: vhci_hub_control:596: port 4 [ 19.685780] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.686369] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.686762] vhci_hcd: dump_port_status_diff:150: [ 19.687108] vhci_hcd: vhci_hub_control:604: bye [ 19.687567] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 6 [ 19.688069] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.688612] vhci_hcd: vhci_hub_control:596: port 5 [ 19.688971] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.689562] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.689952] vhci_hcd: dump_port_status_diff:150: [ 19.690296] vhci_hcd: vhci_hub_control:604: bye [ 19.690879] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 7 [ 19.691384] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.691920] vhci_hcd: vhci_hub_control:596: port 6 [ 19.692274] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.692866] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.693252] vhci_hcd: dump_port_status_diff:150: [ 19.693624] vhci_hcd: vhci_hub_control:604: bye [ 19.694072] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 8 [ 19.694582] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.695115] vhci_hcd: vhci_hub_control:596: port 7 [ 19.695472] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000100 [ 19.696060] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.696455] vhci_hcd: dump_port_status_diff:150: [ 19.696802] vhci_hcd: vhci_hub_control:604: bye [ 19.698235] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller [ 19.698690] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 2 [ 19.699247] vhci_hcd: vhci_start:1118: enter vhci_start [ 19.699845] vhci_hcd: vhci_hub_control:335: typeReq 8006 wValue f00 wIndex 0 [ 19.700442] vhci_hcd: vhci_hub_control:596: port -1 [ 19.700837] vhci_hcd: vhci_hub_control:604: bye [ 19.701301] vhci_hcd: vhci_hub_control:335: typeReq 8006 wValue f00 wIndex 0 [ 19.701997] vhci_hcd: vhci_hub_control:596: port -1 [ 19.702358] vhci_hcd: vhci_hub_control:604: bye [ 19.702756] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 19.705795] hub 2-0:1.0: USB hub found [ 19.706219] vhci_hcd: vhci_hub_control:335: typeReq a006 wValue 2a00 wIndex 0 [ 19.706746] vhci_hcd: vhci_hub_control:388: GetHubDescriptor [ 19.707169] vhci_hcd: vhci_hub_control:596: port -1 [ 19.707538] vhci_hcd: vhci_hub_control:604: bye [ 19.707943] hub 2-0:1.0: 8 ports detected [ 19.708462] vhci_hcd: vhci_hub_control:335: typeReq a000 wValue 0 wIndex 0 [ 19.708977] vhci_hcd: vhci_hub_control:411: GetHubStatus [ 19.709377] vhci_hcd: vhci_hub_control:596: port -1 [ 19.709770] vhci_hcd: vhci_hub_control:604: bye [ 19.713794] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 1 [ 19.714305] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.714842] vhci_hcd: vhci_hub_control:596: port 0 [ 19.715197] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.715793] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.716183] vhci_hcd: dump_port_status_diff:150: [ 19.716534] vhci_hcd: vhci_hub_control:604: bye [ 19.716986] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 2 [ 19.717515] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.718046] vhci_hcd: vhci_hub_control:596: port 1 [ 19.718404] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.718992] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.719380] vhci_hcd: dump_port_status_diff:150: [ 19.719730] vhci_hcd: vhci_hub_control:604: bye [ 19.720232] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 3 [ 19.720743] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.721278] vhci_hcd: vhci_hub_control:596: port 2 [ 19.721645] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.722234] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.722628] vhci_hcd: dump_port_status_diff:150: [ 19.722975] vhci_hcd: vhci_hub_control:604: bye [ 19.723428] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 4 [ 19.723945] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.724489] vhci_hcd: vhci_hub_control:596: port 3 [ 19.724842] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.725463] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.725857] vhci_hcd: dump_port_status_diff:150: [ 19.726204] vhci_hcd: vhci_hub_control:604: bye [ 19.726660] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 5 [ 19.727164] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.727702] vhci_hcd: vhci_hub_control:596: port 4 [ 19.728056] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.728651] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.729040] vhci_hcd: dump_port_status_diff:150: [ 19.729386] vhci_hcd: vhci_hub_control:604: bye [ 19.729849] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 6 [ 19.730439] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.730982] vhci_hcd: vhci_hub_control:596: port 5 [ 19.731334] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.731923] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.732310] vhci_hcd: dump_port_status_diff:150: [ 19.732660] vhci_hcd: vhci_hub_control:604: bye [ 19.733154] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 7 [ 19.733682] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.734216] vhci_hcd: vhci_hub_control:596: port 6 [ 19.734575] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.735397] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.735795] vhci_hcd: dump_port_status_diff:150: [ 19.736142] vhci_hcd: vhci_hub_control:604: bye [ 19.736603] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 8 wIndex 8 [ 19.737108] vhci_hcd: vhci_hub_control:518: SetPortFeature: USB_PORT_FEAT_POWER [ 19.737671] vhci_hcd: vhci_hub_control:596: port 7 [ 19.738026] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000000 -> 00000200 [ 19.738618] vhci_hcd: dump_port_status_diff:142: +POWER [ 19.739005] vhci_hcd: dump_port_status_diff:150: [ 19.739350] vhci_hcd: vhci_hub_control:604: bye [ 19.740643] vhci_hcd: vhci_hcd_probe:1323: bye [ 19.741870] usbcore: registered new device driver usbip-host [ 19.744467] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 [ 19.746362] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 19.746850] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 19.748584] parport0: cannot grant exclusive access for device parkbd [ 19.750567] mousedev: PS/2 mouse device common for all mice [ 19.751571] evbug: Connected device: input0 (Power Button at LNXPWRBN/button/input0) [ 19.753993] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1 [ 19.758123] usbcore: registered new interface driver bcm5974 [ 19.758755] evbug: Connected device: input1 (AT Translated Set 2 keyboard at isa0060/serio0/input0) [ 19.760587] usbcore: registered new interface driver synaptics_usb [ 19.763612] usbcore: registered new interface driver xpad [ 19.764294] usbcore: registered new interface driver usb_acecad [ 19.764864] usbcore: registered new interface driver aiptek [ 19.765389] usbcore: registered new interface driver gtco [ 19.765913] usbcore: registered new interface driver hanwang [ 19.766455] usbcore: registered new interface driver kbtab [ 19.768652] usbcore: registered new interface driver pegasus_notetaker [ 19.770807] rtc_cmos 00:00: RTC can wake from S4 [ 19.772319] rtc_cmos 00:00: registered as rtc0 [ 19.772674] rtc_cmos 00:00: nvmem registration failed [ 19.773046] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram, hpet irqs [ 19.778198] i2c /dev entries driver [ 19.779104] usbcore: registered new interface driver RobotFuzz Open Source InterFace, OSIF [ 19.779838] usbcore: registered new interface driver i2c-tiny-usb [ 19.785534] usbcore: registered new interface driver ati_remote [ 19.786092] usbcore: registered new interface driver imon [ 19.786624] usbcore: registered new interface driver redrat3 [ 19.787156] usbcore: registered new interface driver streamzap [ 19.787739] Registered IR keymap rc-empty [ 19.788393] rc rc0: rc-core loopback device as /devices/virtual/rc/rc0 [ 19.789306] input: rc-core loopback device as /devices/virtual/rc/rc0/input3 [ 19.790385] evbug: Connected device: input3 (rc-core loopback device at rc-core/virtual) [ 19.791362] rc rc0: lirc_dev: driver rc-loopback registered at minor = 0 [ 19.792190] usbcore: registered new interface driver igorplugusb [ 19.792762] usbcore: registered new interface driver ttusbir [ 19.793923] serial_ir serial_ir.0: port 03f8 already in use [ 19.794341] serial_ir serial_ir.0: use 'setserial /dev/ttySX uart none' [ 19.794824] serial_ir serial_ir.0: or compile the serial port driver as module and [ 19.795371] serial_ir serial_ir.0: make sure this module is loaded first [ 19.795960] serial_ir: probe of serial_ir.0 failed with error -16 [ 19.796422] pps_parport: parallel port PPS client [ 19.796991] parport0: cannot grant exclusive access for device pps_parport [ 19.797499] pps_parport: couldn't register with parport0 [ 19.797900] Driver for 1-wire Dallas network protocol. [ 19.798690] usbcore: registered new interface driver DS9490R [ 19.799232] DS1WM w1 busmaster driver - (c) 2004 Szabolcs Gyurko [ 19.799895] w1_f0d_init() [ 19.800392] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 1 [ 19.800945] vhci_hcd: vhci_hub_control:415: GetPortStatus port 1 [ 19.801421] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.801879] vhci_hcd: vhci_hub_control:596: port 0 [ 19.802230] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.802854] vhci_hcd: dump_port_status_diff:142: POWER [ 19.803244] vhci_hcd: dump_port_status_diff:150: [ 19.803596] vhci_hcd: vhci_hub_control:604: bye [ 19.804078] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 2 [ 19.804588] vhci_hcd: vhci_hub_control:415: GetPortStatus port 2 [ 19.805033] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.805496] vhci_hcd: vhci_hub_control:596: port 1 [ 19.805848] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.806436] vhci_hcd: dump_port_status_diff:142: POWER [ 19.806822] vhci_hcd: dump_port_status_diff:150: [ 19.807167] vhci_hcd: vhci_hub_control:604: bye [ 19.807582] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 3 [ 19.808085] vhci_hcd: vhci_hub_control:415: GetPortStatus port 3 [ 19.808530] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.808992] vhci_hcd: vhci_hub_control:596: port 2 [ 19.809345] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.809932] vhci_hcd: dump_port_status_diff:142: POWER [ 19.810120] vhci_hcd: dump_port_status_diff:150: [ 19.810120] vhci_hcd: vhci_hub_control:604: bye [ 19.815646] f71882fg: Not a Fintek device [ 19.815990] f71882fg: Not a Fintek device [ 19.822137] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 4 [ 19.822655] vhci_hcd: vhci_hub_control:415: GetPortStatus port 4 [ 19.823095] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.823556] vhci_hcd: vhci_hub_control:596: port 3 [ 19.823907] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.824494] vhci_hcd: dump_port_status_diff:142: POWER [ 19.824881] vhci_hcd: dump_port_status_diff:150: [ 19.825225] vhci_hcd: vhci_hub_control:604: bye [ 19.825645] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 5 [ 19.826146] vhci_hcd: vhci_hub_control:415: GetPortStatus port 5 [ 19.826590] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.827059] vhci_hcd: vhci_hub_control:596: port 4 [ 19.827415] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.827996] vhci_hcd: dump_port_status_diff:142: POWER [ 19.828382] vhci_hcd: dump_port_status_diff:150: [ 19.828729] vhci_hcd: vhci_hub_control:604: bye [ 19.829639] pc87360: PC8736x not detected, module not inserted [ 19.830316] sch56xx_common: Unsupported device id: 0xff [ 19.830735] sch56xx_common: Unsupported device id: 0xff [ 19.833962] intel_powerclamp: CPU does not support MWAIT [ 19.834616] usbcore: registered new interface driver pcwd_usb [ 19.835150] advantechwdt: WDT driver for Advantech single board computer initialising [ 19.836732] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 6 [ 19.837240] vhci_hcd: vhci_hub_control:415: GetPortStatus port 6 [ 19.837687] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.838148] vhci_hcd: vhci_hub_control:596: port 5 [ 19.838506] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.839088] vhci_hcd: dump_port_status_diff:142: POWER [ 19.839481] vhci_hcd: dump_port_status_diff:150: [ 19.839827] vhci_hcd: vhci_hub_control:604: bye [ 19.840317] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 7 [ 19.840828] vhci_hcd: vhci_hub_control:415: GetPortStatus port 7 [ 19.841268] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.841728] vhci_hcd: vhci_hub_control:596: port 6 [ 19.842078] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.842663] vhci_hcd: dump_port_status_diff:142: POWER [ 19.843048] vhci_hcd: dump_port_status_diff:150: [ 19.843391] vhci_hcd: vhci_hub_control:604: bye [ 19.843837] advantechwdt: initialized. timeout=60 sec (nowayout=0) [ 19.844493] ib700wdt: WDT driver for IB700 single board computer initialising [ 19.845591] ib700wdt: START method I/O 443 is not available [ 19.846081] ib700wdt: probe of ib700wdt failed with error -5 [ 19.846789] wafer5823wdt: WDT driver for Wafer 5823 single board computer initialising [ 19.847386] wafer5823wdt: I/O address 0x0443 already in use [ 19.847884] it87_wdt: no device [ 19.848238] pc87413_wdt: Version 1.1 at io 0x2E [ 19.848598] pc87413_wdt: cannot register miscdev on minor=130 (err=-16) [ 19.849100] sbc60xxwdt: I/O address 0x0443 already in use [ 19.849519] cpu5wdt: misc_register failed [ 19.849860] smsc37b787_wdt: SMsC 37B787 watchdog component driver 1.1 initialising... [ 19.850583] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 8 [ 19.851090] vhci_hcd: vhci_hub_control:415: GetPortStatus port 8 [ 19.851536] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 100 0 [ 19.851996] vhci_hcd: vhci_hub_control:596: port 7 [ 19.852349] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000100 -> 00000100 [ 19.852937] vhci_hcd: dump_port_status_diff:142: POWER [ 19.853327] vhci_hcd: dump_port_status_diff:150: [ 19.853677] vhci_hcd: vhci_hub_control:604: bye [ 19.854128] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 1 [ 19.854638] vhci_hcd: vhci_hub_control:415: GetPortStatus port 1 [ 19.855079] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.855540] vhci_hcd: vhci_hub_control:596: port 0 [ 19.855894] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.856485] vhci_hcd: dump_port_status_diff:142: POWER [ 19.856874] vhci_hcd: dump_port_status_diff:150: [ 19.857221] vhci_hcd: vhci_hub_control:604: bye [ 19.858741] smsc37b787_wdt: Unable to register miscdev on minor 130 [ 19.859303] w83877f_wdt: I/O address 0x0443 already in use [ 19.859730] sbc_epx_c3: cannot register miscdev on minor=130 (err=-16) [ 19.860315] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 2 [ 19.860825] vhci_hcd: vhci_hub_control:415: GetPortStatus port 2 [ 19.861269] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.861741] vhci_hcd: vhci_hub_control:596: port 1 [ 19.862095] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.862685] vhci_hcd: dump_port_status_diff:142: POWER [ 19.863074] vhci_hcd: dump_port_status_diff:150: [ 19.863423] vhci_hcd: vhci_hub_control:604: bye [ 19.864625] sdhci: Secure Digital Host Controller Interface driver [ 19.865086] sdhci: Copyright(c) Pierre Ossman [ 19.865741] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400 [ 19.866031] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 3 [ 19.867000] vhci_hcd: vhci_hub_control:415: GetPortStatus port 3 [ 19.867451] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.867911] vhci_hcd: vhci_hub_control:596: port 2 [ 19.868264] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.868851] vhci_hcd: dump_port_status_diff:142: POWER [ 19.869239] vhci_hcd: dump_port_status_diff:150: [ 19.869588] vhci_hcd: vhci_hub_control:604: bye [ 19.870736] usbcore: registered new interface driver vub300 [ 19.871395] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 4 [ 19.871907] vhci_hcd: vhci_hub_control:415: GetPortStatus port 4 [ 19.872347] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.872809] vhci_hcd: vhci_hub_control:596: port 3 [ 19.873161] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.873767] vhci_hcd: dump_port_status_diff:142: POWER [ 19.874156] vhci_hcd: dump_port_status_diff:150: [ 19.874508] vhci_hcd: vhci_hub_control:604: bye [ 19.886159] NET: Registered protocol family 4 [ 19.887396] comedi: version 0.7.76 - http://www.comedi.org [ 19.888864] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 5 [ 19.889375] vhci_hcd: vhci_hub_control:415: GetPortStatus port 5 [ 19.889824] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.890023] vhci_hcd: vhci_hub_control:596: port 4 [ 19.890023] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.890023] vhci_hcd: dump_port_status_diff:142: POWER [ 19.890023] vhci_hcd: dump_port_status_diff:150: [ 19.890023] vhci_hcd: vhci_hub_control:604: bye [ 19.892491] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 6 [ 19.892996] vhci_hcd: vhci_hub_control:415: GetPortStatus port 6 [ 19.893441] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.893899] vhci_hcd: vhci_hub_control:596: port 5 [ 19.894250] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.894835] vhci_hcd: dump_port_status_diff:142: POWER [ 19.895221] vhci_hcd: dump_port_status_diff:150: [ 19.895569] vhci_hcd: vhci_hub_control:604: bye [ 19.895976] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 7 [ 19.896481] vhci_hcd: vhci_hub_control:415: GetPortStatus port 7 [ 19.896921] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.897379] vhci_hcd: vhci_hub_control:596: port 6 [ 19.897733] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.898320] vhci_hcd: dump_port_status_diff:142: POWER [ 19.898710] vhci_hcd: dump_port_status_diff:150: [ 19.899056] vhci_hcd: vhci_hub_control:604: bye [ 19.899630] comedi comedi0: comedi_test: 1000000 microvolt, 100000 microsecond waveform attached [ 19.900434] vhci_hcd: vhci_hub_control:335: typeReq a300 wValue 0 wIndex 8 [ 19.900940] vhci_hcd: vhci_hub_control:415: GetPortStatus port 8 [ 19.901381] vhci_hcd: vhci_hub_control:470: GetPortStatus bye 200 0 [ 19.901842] vhci_hcd: vhci_hub_control:596: port 7 [ 19.902193] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 00000200 [ 19.902777] vhci_hcd: dump_port_status_diff:142: POWER [ 19.903162] vhci_hcd: dump_port_status_diff:150: [ 19.903509] vhci_hcd: vhci_hub_control:604: bye [ 19.909346] usb usb1: vhci_bus_suspend [ 19.909817] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 1 [ 19.910416] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.910934] vhci_hcd: vhci_hub_control:596: port 0 [ 19.911287] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.911874] vhci_hcd: dump_port_status_diff:142: POWER [ 19.912261] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.912638] vhci_hcd: dump_port_status_diff:150: [ 19.912983] vhci_hcd: vhci_hub_control:604: bye [ 19.913498] comedi comedi0: driver 'comedi_test' has successfully auto-configured 'comedi_test'. [ 19.916249] LNetError: 1:0:(module.c:546:libcfs_init()) misc_register: error -16 [ 19.917200] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 2 [ 19.917717] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.918196] vhci_hcd: vhci_hub_control:596: port 1 [ 19.918551] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.919134] vhci_hcd: dump_port_status_diff:142: POWER [ 19.919523] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.919897] vhci_hcd: dump_port_status_diff:150: [ 19.920240] vhci_hcd: vhci_hub_control:604: bye [ 19.920815] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 3 [ 19.921326] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.921806] vhci_hcd: vhci_hub_control:596: port 2 [ 19.922157] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.922743] vhci_hcd: dump_port_status_diff:142: POWER [ 19.923131] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.923510] vhci_hcd: dump_port_status_diff:150: [ 19.923857] vhci_hcd: vhci_hub_control:604: bye [ 19.924272] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 4 [ 19.924782] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.925261] vhci_hcd: vhci_hub_control:596: port 3 [ 19.925617] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.926204] vhci_hcd: dump_port_status_diff:142: POWER [ 19.926595] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.926972] vhci_hcd: dump_port_status_diff:150: [ 19.927319] vhci_hcd: vhci_hub_control:604: bye [ 19.927733] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 5 [ 19.928244] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.928732] vhci_hcd: vhci_hub_control:596: port 4 [ 19.929083] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.929667] vhci_hcd: dump_port_status_diff:142: POWER [ 19.930055] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.930428] vhci_hcd: dump_port_status_diff:150: [ 19.930597] vhci_hcd: vhci_hub_control:604: bye [ 19.931289] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 6 [ 19.931803] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.932280] vhci_hcd: vhci_hub_control:596: port 5 [ 19.932633] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.933216] vhci_hcd: dump_port_status_diff:142: POWER [ 19.933606] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.933980] vhci_hcd: dump_port_status_diff:150: [ 19.934323] vhci_hcd: vhci_hub_control:604: bye [ 19.934738] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 7 [ 19.935244] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.935723] vhci_hcd: vhci_hub_control:596: port 6 [ 19.936073] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.936659] vhci_hcd: dump_port_status_diff:142: POWER [ 19.937046] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.937423] vhci_hcd: dump_port_status_diff:150: [ 19.937768] vhci_hcd: vhci_hub_control:604: bye [ 19.938179] vhci_hcd: vhci_hub_control:335: typeReq 2303 wValue 1b wIndex 8 [ 19.938697] vhci_hcd: vhci_hub_control:556: SetPortFeature: default 27 [ 19.939177] vhci_hcd: vhci_hub_control:596: port 7 [ 19.939540] vhci_hcd: dump_port_status_diff:128: status prev -> new: 00000200 -> 08000200 [ 19.940123] vhci_hcd: dump_port_status_diff:142: POWER [ 19.940511] vhci_hcd: dump_port_status_diff:142: +R27 [ 19.940884] vhci_hcd: dump_port_status_diff:150: [ 19.941126] vhci_hcd: vhci_hub_control:604: bye [ 19.941703] usb usb2: vhci_bus_suspend [ 20.967090] ================================================================== [ 20.968082] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb [ 20.968856] Read of size 2 at addr 00000000000000a4 by task swapper/1 [ 20.969604] [ 20.969817] CPU: 0 PID: 1 Comm: swapper Tainted: G T 4.17.0-rc1 #1 [ 20.970046] Call Trace: [ 20.970046] dump_stack+0x2e/0x3e [ 20.970046] kasan_report+0x2f3/0x360 [ 20.970046] __asan_load2+0x31/0xe4 [ 20.970046] cfs_trace_lock_tcd+0x25/0xeb [ 20.970046] libcfs_debug_vmsg2+0x18d/0xd26 [ 20.970046] ? cfs_trace_get_tage+0x957/0x957 [ 20.970046] ? mark_lock+0xe9/0xa16 [ 20.970046] ? fput+0x111/0x11f [ 20.970046] ? lnet_ipif_enumerate+0x541/0x588 [ 20.970046] ? kasan_slab_free+0x15/0x1e [ 20.970046] ? kfree+0x215/0x2cb [ 20.970046] libcfs_debug_msg+0x9b/0xc5 [ 20.970046] ? libcfs_debug_vmsg2+0xd26/0xd26 [ 20.970046] ksocknal_startup+0x341/0x1228 [ 20.970046] ? __asan_loadN+0x1d/0x26 [ 20.970046] ? pvclock_clocksource_read+0x162/0x296 [ 20.970046] ? ksocknal_base_startup+0xbae/0xbae [ 20.970046] ? pvclock_read_flags+0x5d/0x5d [ 20.970046] ? kasan_check_read+0x1f/0x28 [ 20.970046] ? kvm_clock_read+0x24/0x3a [ 20.970046] ? kasan_check_write+0x22/0x2b [ 20.970046] ? sched_clock_local+0xc8/0xfa [ 20.970046] ? reacquire_held_locks+0x1cd/0x1cd [ 20.970046] ? cfs_percpt_lock+0xdf/0x1ad [ 20.970046] ? do_raw_spin_unlock+0x100/0x10d [ 20.970046] ? _raw_spin_unlock+0x37/0x4e [ 20.970046] ? cfs_percpt_unlock+0x66/0x13a [ 20.970046] lnet_startup_lndni+0x62a/0xf84 [ 20.970046] ? lnet_shutdown_lndni+0xcc/0xcc [ 20.970046] ? __schedule+0xbff/0xc7f [ 20.970046] ? firmware_map_remove+0x265/0x265 [ 20.970046] ? kasan_check_read+0x1f/0x28 [ 20.970046] LNetNIInit+0x5d4/0xbf8 [ 20.970046] ? lnet_lib_exit+0x147/0x147 [ 20.970046] ? del_timer+0x6d/0xf8 [ 20.970046] ? add_timer_on+0x32b/0x32b [ 20.970046] ? _raw_spin_unlock_irqrestore+0x74/0x9e [ 20.970046] ? trace_hardirqs_on_caller+0x2c8/0x33d [ 20.970046] ? schedule_timeout+0x82b/0x8a7 [ 20.970046] ? kasan_kmalloc+0x1c5/0x1e1 [ 20.970046] ? console_conditional_schedule+0x44/0x44 [ 20.970046] ? do_one_initcall+0x158/0x3ac [ 20.970046] ? kernel_init_freeable+0x2b8/0x434 [ 20.970046] ? kernel_init+0x13/0x1ae [ 20.970046] ? ret_from_fork+0x24/0x30 [ 20.970046] ? __check_object_size+0x8d7/0xa08 [ 20.970046] ? usercopy_abort+0xb7/0xb7 [ 20.970046] ? __lock_is_held+0x39/0xbb [ 20.970046] ? mark_held_locks+0x2c/0xb2 [ 20.970046] ? debug_check_no_locks_freed+0x237/0x25f [ 20.970046] ? collect_expired_timers+0x23b/0x23b [ 20.970046] ? lockdep_init_map+0x10/0x19 [ 20.970046] srpc_startup+0x136/0x352 [ 20.970046] ? srpc_shutdown+0x1f0/0x1f0 [ 20.970046] ? kvmalloc_node+0x6b/0xb6 [ 20.970046] lnet_selftest_init+0x33a/0x4f5 [ 20.970046] ? lnet_selftest_exit+0x13e/0x13e [ 20.970046] ? lustre_insert_debugfs+0x150/0x150 [ 20.970046] ? lnet_init+0x1df/0x1df [ 20.970046] ? lnet_selftest_exit+0x13e/0x13e [ 20.970046] do_one_initcall+0x158/0x3ac [ 20.970046] ? start_kernel+0xbf5/0xbf5 [ 20.970046] kernel_init_freeable+0x2b8/0x434 [ 20.970046] ? rest_init+0x1d2/0x1d2 [ 20.970046] kernel_init+0x13/0x1ae [ 20.970046] ? rest_init+0x1d2/0x1d2 [ 20.970046] ret_from_fork+0x24/0x30 [ 20.970046] ================================================================== [ 20.970046] Disabling lock debugging due to kernel taint [ 21.007543] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a4 [ 21.009103] PGD 0 P4D 0 [ 21.009432] Oops: 0000 [#1] DEBUG_PAGEALLOC KASAN PTI [ 21.010063] CPU: 0 PID: 1 Comm: swapper Tainted: G B T 4.17.0-rc1 #1 [ 21.011023] RIP: 0010:cfs_trace_lock_tcd+0x25/0xeb [ 21.011650] RSP: 0000:ffff880014c87380 EFLAGS: 00010202 [ 21.012299] RAX: 0000000000000202 RBX: 0000000000000000 RCX: ffffffff8119215d [ 21.013197] RDX: dffffc0000000000 RSI: 0000000000000003 RDI: 0000000000000202 [ 21.014074] RBP: ffff880014c87398 R08: 0000000000000001 R09: 0000000000000001 [ 21.014940] R10: ffffed0002990e5a R11: 0000000000000001 R12: 00000000000000a4 [ 21.015818] R13: 0000000000000000 R14: ffff88001402d680 R15: ffff880014c87970 [ 21.016634] FS: 0000000000000000(0000) GS:ffffffff842e9000(0000) knlGS:0000000000000000 [ 21.016892] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 21.016892] CR2: 00000000000000a4 CR3: 0000000004226000 CR4: 00000000000006f0 [ 21.016892] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 21.016892] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 21.016892] Call Trace: [ 21.016892] libcfs_debug_vmsg2+0x18d/0xd26 [ 21.016892] ? cfs_trace_get_tage+0x957/0x957 [ 21.016892] ? mark_lock+0xe9/0xa16 [ 21.016892] ? fput+0x111/0x11f [ 21.016892] ? lnet_ipif_enumerate+0x541/0x588 [ 21.016892] ? kasan_slab_free+0x15/0x1e [ 21.016892] ? kfree+0x215/0x2cb [ 21.016892] libcfs_debug_msg+0x9b/0xc5 [ 21.016892] ? libcfs_debug_vmsg2+0xd26/0xd26 [ 21.016892] ksocknal_startup+0x341/0x1228 [ 21.016892] ? __asan_loadN+0x1d/0x26 [ 21.016892] ? pvclock_clocksource_read+0x162/0x296 [ 21.016892] ? ksocknal_base_startup+0xbae/0xbae [ 21.016892] ? pvclock_read_flags+0x5d/0x5d [ 21.016892] ? kasan_check_read+0x1f/0x28 [ 21.016892] ? kvm_clock_read+0x24/0x3a [ 21.016892] ? kasan_check_write+0x22/0x2b [ 21.016892] ? sched_clock_local+0xc8/0xfa [ 21.016892] ? reacquire_held_locks+0x1cd/0x1cd [ 21.016892] ? cfs_percpt_lock+0xdf/0x1ad [ 21.016892] ? do_raw_spin_unlock+0x100/0x10d [ 21.016892] ? _raw_spin_unlock+0x37/0x4e [ 21.016892] ? cfs_percpt_unlock+0x66/0x13a [ 21.016892] lnet_startup_lndni+0x62a/0xf84 [ 21.016892] ? lnet_shutdown_lndni+0xcc/0xcc [ 21.016892] ? __schedule+0xbff/0xc7f [ 21.016892] ? firmware_map_remove+0x265/0x265 [ 21.016892] ? kasan_check_read+0x1f/0x28 [ 21.016892] LNetNIInit+0x5d4/0xbf8 [ 21.016892] ? lnet_lib_exit+0x147/0x147 [ 21.016892] ? del_timer+0x6d/0xf8 [ 21.016892] ? add_timer_on+0x32b/0x32b [ 21.016892] ? _raw_spin_unlock_irqrestore+0x74/0x9e [ 21.016892] ? trace_hardirqs_on_caller+0x2c8/0x33d [ 21.016892] ? schedule_timeout+0x82b/0x8a7 [ 21.016892] ? kasan_kmalloc+0x1c5/0x1e1 [ 21.016892] ? console_conditional_schedule+0x44/0x44 [ 21.016892] ? do_one_initcall+0x158/0x3ac [ 21.016892] ? kernel_init_freeable+0x2b8/0x434 [ 21.016892] ? kernel_init+0x13/0x1ae [ 21.016892] ? ret_from_fork+0x24/0x30 [ 21.016892] ? __check_object_size+0x8d7/0xa08 [ 21.016892] ? usercopy_abort+0xb7/0xb7 [ 21.016892] ? __lock_is_held+0x39/0xbb [ 21.016892] ? mark_held_locks+0x2c/0xb2 [ 21.016892] ? debug_check_no_locks_freed+0x237/0x25f [ 21.016892] ? collect_expired_timers+0x23b/0x23b [ 21.016892] ? lockdep_init_map+0x10/0x19 [ 21.016892] srpc_startup+0x136/0x352 [ 21.016892] ? srpc_shutdown+0x1f0/0x1f0 [ 21.016892] ? kvmalloc_node+0x6b/0xb6 [ 21.016892] lnet_selftest_init+0x33a/0x4f5 [ 21.016892] ? lnet_selftest_exit+0x13e/0x13e [ 21.016892] ? lustre_insert_debugfs+0x150/0x150 [ 21.016892] ? lnet_init+0x1df/0x1df [ 21.016892] ? lnet_selftest_exit+0x13e/0x13e [ 21.016892] do_one_initcall+0x158/0x3ac [ 21.016892] ? start_kernel+0xbf5/0xbf5 [ 21.016892] kernel_init_freeable+0x2b8/0x434 [ 21.016892] ? rest_init+0x1d2/0x1d2 [ 21.016892] kernel_init+0x13/0x1ae [ 21.016892] ? rest_init+0x1d2/0x1d2 [ 21.016892] ret_from_fork+0x24/0x30 [ 21.016892] Code: d4 05 31 c0 5d c3 55 48 ff 05 2b bf d4 05 48 89 e5 41 55 41 54 4c 8d a7 a4 00 00 00 53 48 89 fb 41 89 f5 4c 89 e7 e8 16 a9 18 ff <66> 83 bb a4 00 00 00 02 76 24 48 c7 c6 20 37 75 85 48 c7 c7 40 [ 21.016892] RIP: cfs_trace_lock_tcd+0x25/0xeb RSP: ffff880014c87380 [ 21.016892] CR2: 00000000000000a4 [ 21.016892] ---[ end trace be7ae81fe247d9ae ]--- [ 21.016892] Kernel panic - not syncing: Fatal exception [ 21.016892] Kernel Offset: disabled Elapsed time: 30 #!/bin/bash # To reproduce, # 1) save job-script and this script (both are attached in 0day report email) # 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH kernel=$1 initrds=( /osimage/openwrt/openwrt-i386-2016-03-16.cgz /lkp/lkp/lkp-i386.cgz ) HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}" { cat "${initrds[@]//*\//}" [[ $INSTALL_MOD_PATH ]] && ( cd "$INSTALL_MOD_PATH" find lib | cpio -o -H newc --quiet | gzip ) echo job-script | cpio -o -H newc --quiet | gzip } > initrd.img kvm=( qemu-system-x86_64 -enable-kvm -kernel $kernel -initrd initrd.img -m 420 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial stdio -display none -monitor null ) append=( ip=::::vm-lkp-hsw01-openwrt-ia32-7::dhcp root=/dev/ram0 user=lkp job=/job-script ARCH=x86_64 kconfig=x86_64-randconfig-ws0-03101549 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 result_service=tmpfs debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.minor_count=8 rcuperf.shutdown=0 ) "${kvm[@]}" -append "${append[*]}" -------------- next part -------------- # # Automatically generated file; DO NOT EDIT. # Linux/x86_64 4.17.0-rc1 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_MMU=y CONFIG_ARCH_MMAP_RND_BITS_MIN=28 CONFIG_ARCH_MMAP_RND_BITS_MAX=32 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y CONFIG_GENERIC_HWEIGHT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ZONE_DMA32=y CONFIG_AUDIT_ARCH=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000 CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=4 CONFIG_CONSTRUCTORS=y CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # # General setup # CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y # CONFIG_KERNEL_GZIP is not set # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_XZ is not set CONFIG_KERNEL_LZO=y # CONFIG_KERNEL_LZ4 is not set CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_CROSS_MEMORY_ATTACH is not set # CONFIG_USELIB is not set # CONFIG_AUDIT is not set CONFIG_HAVE_ARCH_AUDITSYSCALL=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_SIM=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y CONFIG_GENERIC_IRQ_DEBUGFS=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_GENERIC_CMOS_UPDATE=y # # Timers subsystem # CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ_COMMON=y # CONFIG_HZ_PERIODIC is not set CONFIG_NO_HZ_IDLE=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y # # CPU/Task time and stats accounting # CONFIG_VIRT_CPU_ACCOUNTING=y # CONFIG_TICK_CPU_ACCOUNTING is not set CONFIG_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_IRQ_TIME_ACCOUNTING=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set # # RCU Subsystem # CONFIG_TINY_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_SRCU=y CONFIG_TINY_SRCU=y CONFIG_TASKS_RCU=y CONFIG_CONTEXT_TRACKING=y # CONFIG_CONTEXT_TRACKING_FORCE is not set CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=20 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_CGROUPS=y CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y # CONFIG_CFS_BANDWIDTH is not set # CONFIG_RT_GROUP_SCHED is not set # CONFIG_CGROUP_PIDS is not set CONFIG_CGROUP_RDMA=y # CONFIG_CGROUP_FREEZER is not set # CONFIG_CGROUP_DEVICE is not set # CONFIG_CGROUP_CPUACCT is not set CONFIG_CGROUP_PERF=y # CONFIG_CGROUP_DEBUG is not set CONFIG_SOCK_CGROUP_DATA=y # CONFIG_NAMESPACES is not set # CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y # CONFIG_RD_LZMA is not set CONFIG_RD_XZ=y CONFIG_RD_LZO=y CONFIG_RD_LZ4=y # CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y CONFIG_BPF=y CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_MULTIUSER=y # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set CONFIG_SYSCTL_SYSCALL=y CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y CONFIG_PRINTK_NMI=y CONFIG_BUG=y # CONFIG_ELF_CORE is not set # CONFIG_PCSPKR_PLATFORM is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_FUTEX_PI=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_ADVISE_SYSCALLS=y # CONFIG_MEMBARRIER is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=y # CONFIG_BPF_SYSCALL is not set # CONFIG_USERFAULTFD is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y # CONFIG_PC104 is not set # # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_SLUB_DEBUG=y # CONFIG_SLUB_MEMCG_SYSFS_ON is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set # CONFIG_SLAB_MERGE_DEFAULT is not set # CONFIG_SLAB_FREELIST_RANDOM is not set # CONFIG_SLAB_FREELIST_HARDENED is not set CONFIG_SYSTEM_DATA_VERIFICATION=y # CONFIG_PROFILING is not set CONFIG_CRASH_CORE=y CONFIG_KEXEC_CORE=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y # CONFIG_JUMP_LABEL is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_RCU_TABLE_FREE=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_SECCOMP_FILTER=y CONFIG_HAVE_GCC_PLUGINS=y CONFIG_GCC_PLUGINS=y # CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set CONFIG_GCC_PLUGIN_LATENT_ENTROPY=y # CONFIG_GCC_PLUGIN_STRUCTLEAK is not set CONFIG_GCC_PLUGIN_RANDSTRUCT=y # CONFIG_GCC_PLUGIN_RANDSTRUCT_PERFORMANCE is not set CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_CC_STACKPROTECTOR_NONE=y # CONFIG_CC_STACKPROTECTOR_REGULAR is not set # CONFIG_CC_STACKPROTECTOR_STRONG is not set # CONFIG_CC_STACKPROTECTOR_AUTO is not set CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y CONFIG_HAVE_ARCH_HUGE_VMAP=y CONFIG_HAVE_ARCH_SOFT_DIRTY=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_HAVE_ARCH_MMAP_RND_BITS=y CONFIG_HAVE_EXIT_THREAD=y CONFIG_ARCH_MMAP_RND_BITS=28 CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_HAVE_STACK_VALIDATION=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_ARCH_HAS_REFCOUNT=y # CONFIG_REFCOUNT_FULL is not set # # GCOV-based kernel profiling # CONFIG_GCOV_KERNEL=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y CONFIG_GCOV_PROFILE_ALL=y CONFIG_GCOV_FORMAT_AUTODETECT=y # CONFIG_GCOV_FORMAT_3_4 is not set # CONFIG_GCOV_FORMAT_4_7 is not set CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 # CONFIG_MODULES is not set CONFIG_MODULES_TREE_LOOKUP=y # CONFIG_BLOCK is not set CONFIG_ASN1=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y CONFIG_FREEZER=y # # Processor type and features # CONFIG_ZONE_DMA=y # CONFIG_SMP is not set CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_X2APIC=y # CONFIG_X86_MPPARSE is not set CONFIG_GOLDFISH=y # CONFIG_RETPOLINE is not set # CONFIG_INTEL_RDT is not set CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_GOLDFISH is not set # CONFIG_X86_INTEL_LPSS is not set # CONFIG_X86_AMD_PLATFORM_DEVICE is not set # CONFIG_IOSF_MBI is not set CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y # CONFIG_SCHED_OMIT_FRAME_POINTER is not set CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_DEBUG is not set CONFIG_XEN=y # CONFIG_XEN_PV is not set CONFIG_XEN_PVHVM=y CONFIG_XEN_SAVE_RESTORE=y # CONFIG_XEN_DEBUG_FS is not set # CONFIG_XEN_PVH is not set CONFIG_KVM_GUEST=y # CONFIG_KVM_DEBUG_FS is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set CONFIG_PARAVIRT_CLOCK=y # CONFIG_JAILHOUSE_GUEST is not set CONFIG_NO_BOOTMEM=y # CONFIG_MK8 is not set # CONFIG_MPSC is not set # CONFIG_MCORE2 is not set # CONFIG_MATOM is not set CONFIG_GENERIC_CPU=y CONFIG_X86_INTERNODE_CACHE_SHIFT=6 CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_TSC=y CONFIG_X86_CMPXCHG64=y CONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y CONFIG_PROCESSOR_SELECT=y CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_CENTAUR=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y # CONFIG_DMI is not set # CONFIG_GART_IOMMU is not set # CONFIG_CALGARY_IOMMU is not set CONFIG_SWIOTLB=y CONFIG_IOMMU_HELPER=y CONFIG_NR_CPUS_RANGE_BEGIN=1 CONFIG_NR_CPUS_RANGE_END=1 CONFIG_NR_CPUS_DEFAULT=1 CONFIG_NR_CPUS=1 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_COUNT=y CONFIG_UP_LATE_INIT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y CONFIG_X86_MCE=y # CONFIG_X86_MCELOG_LEGACY is not set # CONFIG_X86_MCE_INTEL is not set CONFIG_X86_MCE_AMD=y CONFIG_X86_MCE_THRESHOLD=y # CONFIG_X86_MCE_INJECT is not set # # Performance monitoring # CONFIG_PERF_EVENTS_INTEL_UNCORE=y CONFIG_PERF_EVENTS_INTEL_RAPL=y CONFIG_PERF_EVENTS_INTEL_CSTATE=y CONFIG_PERF_EVENTS_AMD_POWER=y # CONFIG_X86_16BIT is not set CONFIG_X86_VSYSCALL_EMULATION=y CONFIG_I8K=y CONFIG_MICROCODE=y CONFIG_MICROCODE_INTEL=y # CONFIG_MICROCODE_AMD is not set CONFIG_MICROCODE_OLD_INTERFACE=y CONFIG_X86_MSR=y CONFIG_X86_CPUID=y # CONFIG_X86_5LEVEL is not set CONFIG_ARCH_PHYS_ADDR_T_64BIT=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_HAS_MEM_ENCRYPT=y CONFIG_AMD_MEM_ENCRYPT=y # CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is not set CONFIG_ARCH_USE_MEMREMAP_PROT=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y # CONFIG_ARCH_MEMORY_PROBE is not set CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y # CONFIG_SPARSEMEM_VMEMMAP is not set CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_GENERIC_GUP=y CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_MEMORY_ISOLATION=y CONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y # CONFIG_MEMORY_HOTREMOVE is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y CONFIG_COMPACTION=y CONFIG_MIGRATION=y CONFIG_ARCH_ENABLE_THP_MIGRATION=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_VIRT_TO_BUS=y CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y CONFIG_MEMORY_FAILURE=y # CONFIG_HWPOISON_INJECT is not set CONFIG_TRANSPARENT_HUGEPAGE=y CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y # CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set CONFIG_ARCH_WANTS_THP_SWAP=y CONFIG_THP_SWAP=y CONFIG_TRANSPARENT_HUGE_PAGECACHE=y CONFIG_NEED_PER_CPU_KM=y CONFIG_CLEANCACHE=y CONFIG_CMA=y # CONFIG_CMA_DEBUG is not set # CONFIG_CMA_DEBUGFS is not set CONFIG_CMA_AREAS=7 # CONFIG_ZPOOL is not set CONFIG_ZBUD=y # CONFIG_ZSMALLOC is not set CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set CONFIG_IDLE_PAGE_TRACKING=y CONFIG_ARCH_HAS_ZONE_DEVICE=y CONFIG_FRAME_VECTOR=y # CONFIG_PERCPU_STATS is not set # CONFIG_GUP_BENCHMARK is not set # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_X86_RESERVE_LOW=64 CONFIG_MTRR=y # CONFIG_MTRR_SANITIZER is not set # CONFIG_X86_PAT is not set CONFIG_ARCH_RANDOM=y # CONFIG_X86_SMAP is not set # CONFIG_X86_INTEL_UMIP is not set # CONFIG_X86_INTEL_MPX is not set # CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set # CONFIG_EFI is not set CONFIG_SECCOMP=y CONFIG_HZ_100=y # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=100 CONFIG_SCHED_HRTICK=y CONFIG_KEXEC=y CONFIG_KEXEC_FILE=y CONFIG_ARCH_HAS_KEXEC_PURGATORY=y # CONFIG_KEXEC_VERIFY_SIG is not set # CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x1000000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 CONFIG_COMPAT_VDSO=y CONFIG_LEGACY_VSYSCALL_EMULATE=y # CONFIG_LEGACY_VSYSCALL_NONE is not set # CONFIG_CMDLINE_BOOL is not set CONFIG_MODIFY_LDT_SYSCALL=y CONFIG_HAVE_LIVEPATCH=y CONFIG_ARCH_HAS_ADD_PAGES=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y # # Power management and ACPI options # CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y # CONFIG_SUSPEND_SKIP_SYNC is not set CONFIG_HIBERNATE_CALLBACKS=y CONFIG_PM_SLEEP=y CONFIG_PM_AUTOSLEEP=y # CONFIG_PM_WAKELOCKS is not set CONFIG_PM=y CONFIG_PM_DEBUG=y # CONFIG_PM_ADVANCED_DEBUG is not set # CONFIG_PM_TEST_SUSPEND is not set CONFIG_PM_SLEEP_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # CONFIG_PM_TRACE_RTC is not set CONFIG_PM_CLK=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set CONFIG_ACPI=y CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y # CONFIG_ACPI_DEBUGGER is not set CONFIG_ACPI_SPCR_TABLE=y CONFIG_ACPI_LPIT=y CONFIG_ACPI_SLEEP=y # CONFIG_ACPI_PROCFS_POWER is not set CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y # CONFIG_ACPI_EC_DEBUGFS is not set CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y # CONFIG_ACPI_VIDEO is not set CONFIG_ACPI_FAN=y # CONFIG_ACPI_TAD is not set # CONFIG_ACPI_DOCK is not set CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y CONFIG_ACPI_PROCESSOR_IDLE=y CONFIG_ACPI_PROCESSOR=y # CONFIG_ACPI_IPMI is not set # CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set CONFIG_ACPI_THERMAL=y CONFIG_ACPI_CUSTOM_DSDT_FILE="" CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_TABLE_UPGRADE=y # CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_PCI_SLOT is not set # CONFIG_ACPI_CONTAINER is not set # CONFIG_ACPI_HOTPLUG_MEMORY is not set CONFIG_ACPI_HOTPLUG_IOAPIC=y # CONFIG_ACPI_SBS is not set # CONFIG_ACPI_HED is not set # CONFIG_ACPI_CUSTOM_METHOD is not set # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y # CONFIG_ACPI_APEI is not set # CONFIG_DPTF_POWER is not set # CONFIG_ACPI_EXTLOG is not set # CONFIG_PMIC_OPREGION is not set # CONFIG_ACPI_CONFIGFS is not set CONFIG_X86_PM_TIMER=y CONFIG_SFI=y # # CPU Frequency scaling # CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set # # CPU frequency scaling drivers # CONFIG_X86_INTEL_PSTATE=y # CONFIG_X86_PCC_CPUFREQ is not set # CONFIG_X86_ACPI_CPUFREQ is not set # CONFIG_X86_SPEEDSTEP_CENTRINO is not set # CONFIG_X86_P4_CLOCKMOD is not set # # shared options # # # CPU Idle # CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_INTEL_IDLE is not set # # Bus options (PCI etc.) # CONFIG_PCI=y CONFIG_PCI_DIRECT=y # CONFIG_PCI_MMCONFIG is not set CONFIG_PCI_XEN=y CONFIG_PCI_DOMAINS=y # CONFIG_PCI_CNB20LE_QUIRK is not set # CONFIG_PCIEPORTBUS is not set CONFIG_PCI_BUS_ADDR_T_64BIT=y # CONFIG_PCI_MSI is not set CONFIG_PCI_QUIRKS=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_STUB is not set CONFIG_XEN_PCIDEV_FRONTEND=y CONFIG_PCI_LOCKLESS_CONFIG=y # CONFIG_PCI_IOV is not set # CONFIG_PCI_PRI is not set # CONFIG_PCI_PASID is not set CONFIG_PCI_LABEL=y # CONFIG_HOTPLUG_PCI is not set # # Cadence PCIe controllers support # # # DesignWare PCI Core Support # # # PCI host controller drivers # # # PCI Endpoint # # CONFIG_PCI_ENDPOINT is not set # # PCI switch controller drivers # # CONFIG_PCI_SW_SWITCHTEC is not set # CONFIG_ISA_BUS is not set # CONFIG_ISA_DMA_API is not set CONFIG_AMD_NB=y CONFIG_PCCARD=y CONFIG_PCMCIA=y # CONFIG_PCMCIA_LOAD_CIS is not set CONFIG_CARDBUS=y # # PC-card bridges # # CONFIG_YENTA is not set # CONFIG_PD6729 is not set # CONFIG_I82092 is not set # CONFIG_RAPIDIO is not set # CONFIG_X86_SYSFB is not set # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y CONFIG_COMPAT_BINFMT_ELF=y CONFIG_ELFCORE=y CONFIG_BINFMT_SCRIPT=y # CONFIG_BINFMT_MISC is not set CONFIG_COREDUMP=y CONFIG_IA32_EMULATION=y CONFIG_IA32_AOUT=y # CONFIG_X86_X32 is not set CONFIG_COMPAT_32=y CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_X86_DEV_DMA_OPS=y CONFIG_NET=y CONFIG_COMPAT_NETLINK_MESSAGES=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_DIAG is not set CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set # CONFIG_TLS is not set CONFIG_XFRM=y CONFIG_XFRM_ALGO=y # CONFIG_XFRM_USER is not set CONFIG_XFRM_SUB_POLICY=y CONFIG_XFRM_MIGRATE=y # CONFIG_XFRM_STATISTICS is not set CONFIG_XFRM_IPCOMP=y CONFIG_NET_KEY=y CONFIG_NET_KEY_MIGRATE=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set CONFIG_IP_ADVANCED_ROUTER=y CONFIG_IP_FIB_TRIE_STATS=y # CONFIG_IP_MULTIPLE_TABLES is not set # CONFIG_IP_ROUTE_MULTIPATH is not set CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_ROUTE_CLASSID=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y # CONFIG_IP_PNP_BOOTP is not set # CONFIG_IP_PNP_RARP is not set CONFIG_NET_IPIP=y # CONFIG_NET_IPGRE_DEMUX is not set CONFIG_NET_IP_TUNNEL=y CONFIG_IP_MROUTE_COMMON=y # CONFIG_SYN_COOKIES is not set CONFIG_NET_UDP_TUNNEL=y CONFIG_NET_FOU=y CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_INET_AH=y # CONFIG_INET_ESP is not set CONFIG_INET_IPCOMP=y CONFIG_INET_XFRM_TUNNEL=y CONFIG_INET_TUNNEL=y # CONFIG_INET_XFRM_MODE_TRANSPORT is not set # CONFIG_INET_XFRM_MODE_TUNNEL is not set # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_DIAG is not set CONFIG_TCP_CONG_ADVANCED=y # CONFIG_TCP_CONG_BIC is not set CONFIG_TCP_CONG_CUBIC=y CONFIG_TCP_CONG_WESTWOOD=y CONFIG_TCP_CONG_HTCP=y CONFIG_TCP_CONG_HSTCP=y # CONFIG_TCP_CONG_HYBLA is not set CONFIG_TCP_CONG_VEGAS=y CONFIG_TCP_CONG_NV=y # CONFIG_TCP_CONG_SCALABLE is not set CONFIG_TCP_CONG_LP=y # CONFIG_TCP_CONG_VENO is not set CONFIG_TCP_CONG_YEAH=y CONFIG_TCP_CONG_ILLINOIS=y # CONFIG_TCP_CONG_DCTCP is not set CONFIG_TCP_CONG_CDG=y CONFIG_TCP_CONG_BBR=y # CONFIG_DEFAULT_CUBIC is not set CONFIG_DEFAULT_HTCP=y # CONFIG_DEFAULT_VEGAS is not set # CONFIG_DEFAULT_WESTWOOD is not set # CONFIG_DEFAULT_CDG is not set # CONFIG_DEFAULT_BBR is not set # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_TCP_CONG="htcp" # CONFIG_TCP_MD5SIG is not set CONFIG_IPV6=y # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set # CONFIG_INET6_AH is not set # CONFIG_INET6_ESP is not set CONFIG_INET6_IPCOMP=y CONFIG_IPV6_MIP6=y CONFIG_INET6_XFRM_TUNNEL=y CONFIG_INET6_TUNNEL=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set # CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set CONFIG_IPV6_SIT=y # CONFIG_IPV6_SIT_6RD is not set CONFIG_IPV6_NDISC_NODETYPE=y CONFIG_IPV6_TUNNEL=y CONFIG_IPV6_FOU=y CONFIG_IPV6_FOU_TUNNEL=y # CONFIG_IPV6_MULTIPLE_TABLES is not set CONFIG_IPV6_MROUTE=y CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y CONFIG_IPV6_PIMSM_V2=y # CONFIG_IPV6_SEG6_LWTUNNEL is not set # CONFIG_IPV6_SEG6_HMAC is not set # CONFIG_NETWORK_SECMARK is not set CONFIG_NET_PTP_CLASSIFY=y CONFIG_NETWORK_PHY_TIMESTAMPING=y # CONFIG_NETFILTER is not set # CONFIG_IP_DCCP is not set CONFIG_IP_SCTP=y # CONFIG_SCTP_DBG_OBJCNT is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set CONFIG_SCTP_COOKIE_HMAC_MD5=y CONFIG_SCTP_COOKIE_HMAC_SHA1=y # CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set CONFIG_L2TP=y CONFIG_L2TP_DEBUGFS=y CONFIG_L2TP_V3=y # CONFIG_L2TP_IP is not set # CONFIG_L2TP_ETH is not set # CONFIG_BRIDGE is not set CONFIG_HAVE_NET_DSA=y # CONFIG_NET_DSA is not set # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set CONFIG_LLC=y CONFIG_LLC2=y # CONFIG_ATALK is not set CONFIG_X25=y CONFIG_LAPB=y CONFIG_PHONET=y # CONFIG_6LOWPAN is not set # CONFIG_IEEE802154 is not set CONFIG_NET_SCHED=y # # Queueing/Scheduling # CONFIG_NET_SCH_CBQ=y CONFIG_NET_SCH_HTB=y # CONFIG_NET_SCH_HFSC is not set CONFIG_NET_SCH_PRIO=y # CONFIG_NET_SCH_MULTIQ is not set CONFIG_NET_SCH_RED=y # CONFIG_NET_SCH_SFB is not set CONFIG_NET_SCH_SFQ=y CONFIG_NET_SCH_TEQL=y CONFIG_NET_SCH_TBF=y CONFIG_NET_SCH_CBS=y CONFIG_NET_SCH_GRED=y CONFIG_NET_SCH_DSMARK=y # CONFIG_NET_SCH_NETEM is not set CONFIG_NET_SCH_DRR=y # CONFIG_NET_SCH_MQPRIO is not set CONFIG_NET_SCH_CHOKE=y CONFIG_NET_SCH_QFQ=y # CONFIG_NET_SCH_CODEL is not set CONFIG_NET_SCH_FQ_CODEL=y CONFIG_NET_SCH_FQ=y CONFIG_NET_SCH_HHF=y # CONFIG_NET_SCH_PIE is not set # CONFIG_NET_SCH_PLUG is not set # CONFIG_NET_SCH_DEFAULT is not set # # Classification # CONFIG_NET_CLS=y # CONFIG_NET_CLS_BASIC is not set # CONFIG_NET_CLS_TCINDEX is not set CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_FW=y # CONFIG_NET_CLS_U32 is not set CONFIG_NET_CLS_RSVP=y CONFIG_NET_CLS_RSVP6=y # CONFIG_NET_CLS_FLOW is not set CONFIG_NET_CLS_CGROUP=y CONFIG_NET_CLS_BPF=y # CONFIG_NET_CLS_FLOWER is not set # CONFIG_NET_CLS_MATCHALL is not set # CONFIG_NET_EMATCH is not set # CONFIG_NET_CLS_ACT is not set # CONFIG_NET_CLS_IND is not set CONFIG_NET_SCH_FIFO=y # CONFIG_DCB is not set CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=y # CONFIG_BATMAN_ADV_BATMAN_V is not set CONFIG_BATMAN_ADV_BLA=y # CONFIG_BATMAN_ADV_DAT is not set # CONFIG_BATMAN_ADV_NC is not set # CONFIG_BATMAN_ADV_MCAST is not set CONFIG_BATMAN_ADV_DEBUGFS=y CONFIG_BATMAN_ADV_DEBUG=y CONFIG_OPENVSWITCH=y # CONFIG_OPENVSWITCH_VXLAN is not set # CONFIG_OPENVSWITCH_GENEVE is not set # CONFIG_VSOCKETS is not set CONFIG_NETLINK_DIAG=y CONFIG_MPLS=y CONFIG_NET_MPLS_GSO=y CONFIG_MPLS_ROUTING=y CONFIG_MPLS_IPTUNNEL=y CONFIG_NET_NSH=y # CONFIG_HSR is not set # CONFIG_NET_SWITCHDEV is not set # CONFIG_NET_L3_MASTER_DEV is not set # CONFIG_NET_NCSI is not set # CONFIG_CGROUP_NET_PRIO is not set CONFIG_CGROUP_NET_CLASSID=y CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y # # Network testing # # CONFIG_NET_PKTGEN is not set CONFIG_HAMRADIO=y # # Packet Radio protocols # CONFIG_AX25=y # CONFIG_AX25_DAMA_SLAVE is not set CONFIG_NETROM=y # CONFIG_ROSE is not set # # AX.25 network device drivers # # CONFIG_MKISS is not set # CONFIG_6PACK is not set # CONFIG_BPQETHER is not set # CONFIG_BAYCOM_SER_FDX is not set # CONFIG_BAYCOM_SER_HDX is not set # CONFIG_BAYCOM_PAR is not set CONFIG_YAM=y # CONFIG_CAN is not set # CONFIG_BT is not set CONFIG_AF_RXRPC=y # CONFIG_AF_RXRPC_IPV6 is not set CONFIG_AF_RXRPC_INJECT_LOSS=y CONFIG_AF_RXRPC_DEBUG=y CONFIG_RXKAD=y # CONFIG_AF_KCM is not set CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set CONFIG_CFG80211_DEVELOPER_WARNINGS=y # CONFIG_CFG80211_CERTIFICATION_ONUS is not set CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y # CONFIG_CFG80211_DEFAULT_PS is not set CONFIG_CFG80211_DEBUGFS=y CONFIG_CFG80211_CRDA_SUPPORT=y CONFIG_CFG80211_WEXT=y # CONFIG_MAC80211 is not set CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 # CONFIG_WIMAX is not set # CONFIG_RFKILL is not set CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y # CONFIG_NET_9P_XEN is not set # CONFIG_NET_9P_DEBUG is not set # CONFIG_CAIF is not set CONFIG_CEPH_LIB=y CONFIG_CEPH_LIB_PRETTYDEBUG=y CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y CONFIG_NFC=y CONFIG_NFC_DIGITAL=y # CONFIG_NFC_NCI is not set # CONFIG_NFC_HCI is not set # # Near Field Communication (NFC) devices # CONFIG_NFC_TRF7970A=y CONFIG_NFC_SIM=y CONFIG_NFC_PORT100=y CONFIG_NFC_PN533=y CONFIG_NFC_PN533_USB=y CONFIG_NFC_PN533_I2C=y CONFIG_NFC_ST95HF=y # CONFIG_PSAMPLE is not set CONFIG_NET_IFE=y CONFIG_LWTUNNEL=y # CONFIG_LWTUNNEL_BPF is not set CONFIG_DST_CACHE=y CONFIG_GRO_CELLS=y # CONFIG_NET_DEVLINK is not set CONFIG_MAY_USE_DEVLINK=y CONFIG_HAVE_EBPF_JIT=y # # Device Drivers # # # Generic Driver Options # # CONFIG_UEVENT_HELPER is not set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y CONFIG_REGMAP_SPMI=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y CONFIG_DMA_FENCE_TRACE=y # CONFIG_DMA_CMA is not set # # Bus devices # CONFIG_CONNECTOR=y # CONFIG_PROC_EVENTS is not set CONFIG_MTD=y CONFIG_MTD_REDBOOT_PARTS=y CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set CONFIG_MTD_AR7_PARTS=y # # Partition parsers # # # User Modules And Translation Layers # # CONFIG_MTD_OOPS is not set CONFIG_MTD_PARTITIONED_MASTER=y # # RAM/ROM/Flash chip drivers # # CONFIG_MTD_CFI is not set CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_GEN_PROBE=y CONFIG_MTD_CFI_ADV_OPTIONS=y CONFIG_MTD_CFI_NOSWAP=y # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set CONFIG_MTD_CFI_GEOMETRY=y CONFIG_MTD_MAP_BANK_WIDTH_1=y # CONFIG_MTD_MAP_BANK_WIDTH_2 is not set # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set CONFIG_MTD_MAP_BANK_WIDTH_16=y CONFIG_MTD_MAP_BANK_WIDTH_32=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set CONFIG_MTD_CFI_I8=y # CONFIG_MTD_OTP is not set CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # # Mapping drivers for chip access # CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP_COMPAT=y CONFIG_MTD_PHYSMAP_START=0x8000000 CONFIG_MTD_PHYSMAP_LEN=0 CONFIG_MTD_PHYSMAP_BANKWIDTH=2 CONFIG_MTD_SBC_GXX=y CONFIG_MTD_AMD76XROM=y CONFIG_MTD_ICHXROM=y # CONFIG_MTD_ESB2ROM is not set # CONFIG_MTD_CK804XROM is not set # CONFIG_MTD_SCB2_FLASH is not set # CONFIG_MTD_NETtel is not set CONFIG_MTD_L440GX=y # CONFIG_MTD_PCI is not set # CONFIG_MTD_PCMCIA is not set CONFIG_MTD_GPIO_ADDR=y # CONFIG_MTD_INTEL_VR_NOR is not set CONFIG_MTD_PLATRAM=y CONFIG_MTD_LATCH_ADDR=y # # Self-contained MTD device drivers # # CONFIG_MTD_PMC551 is not set # CONFIG_MTD_DATAFLASH is not set # CONFIG_MTD_M25P80 is not set # CONFIG_MTD_MCHP23K256 is not set CONFIG_MTD_SST25L=y CONFIG_MTD_SLRAM=y CONFIG_MTD_PHRAM=y # CONFIG_MTD_MTDRAM is not set # # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOCG3 is not set # CONFIG_MTD_ONENAND is not set CONFIG_MTD_NAND_ECC=y # CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND=y # CONFIG_MTD_NAND_ECC_BCH is not set # CONFIG_MTD_NAND_DENALI_PCI is not set CONFIG_MTD_NAND_GPIO=y # CONFIG_MTD_NAND_RICOH is not set # CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_DOCG4 is not set # CONFIG_MTD_NAND_CAFE is not set CONFIG_MTD_NAND_NANDSIM=y CONFIG_MTD_NAND_PLATFORM=y # # LPDDR & LPDDR2 PCM memory drivers # CONFIG_MTD_LPDDR=y CONFIG_MTD_QINFO_PROBE=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_MT81xx_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_SPI_INTEL_SPI=y # CONFIG_SPI_INTEL_SPI_PCI is not set CONFIG_SPI_INTEL_SPI_PLATFORM=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_GLUEBI=y # CONFIG_OF is not set CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_PARPORT=y CONFIG_PARPORT_PC=y # CONFIG_PARPORT_SERIAL is not set CONFIG_PARPORT_PC_FIFO=y CONFIG_PARPORT_PC_SUPERIO=y # CONFIG_PARPORT_PC_PCMCIA is not set # CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y CONFIG_PNP=y CONFIG_PNP_DEBUG_MESSAGES=y # # Protocols # CONFIG_PNPACPI=y # # NVME Support # # # Misc devices # CONFIG_SENSORS_LIS3LV02D=y CONFIG_AD525X_DPOT=y CONFIG_AD525X_DPOT_I2C=y # CONFIG_AD525X_DPOT_SPI is not set CONFIG_DUMMY_IRQ=y # CONFIG_IBM_ASM is not set # CONFIG_PHANTOM is not set # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set CONFIG_ICS932S401=y CONFIG_ENCLOSURE_SERVICES=y # CONFIG_HP_ILO is not set # CONFIG_APDS9802ALS is not set CONFIG_ISL29003=y # CONFIG_ISL29020 is not set # CONFIG_SENSORS_TSL2550 is not set # CONFIG_SENSORS_BH1770 is not set CONFIG_SENSORS_APDS990X=y CONFIG_HMC6352=y CONFIG_DS1682=y # CONFIG_USB_SWITCH_FSA9480 is not set # CONFIG_LATTICE_ECP3_CONFIG is not set CONFIG_SRAM=y # CONFIG_PCI_ENDPOINT_TEST is not set CONFIG_C2PORT=y CONFIG_C2PORT_DURAMAR_2150=y # # EEPROM support # # CONFIG_EEPROM_AT24 is not set CONFIG_EEPROM_AT25=y CONFIG_EEPROM_LEGACY=y # CONFIG_EEPROM_MAX6875 is not set # CONFIG_EEPROM_93CX6 is not set CONFIG_EEPROM_93XX46=y # CONFIG_EEPROM_IDT_89HPESX is not set # CONFIG_CB710_CORE is not set # # Texas Instruments shared transport line discipline # # CONFIG_TI_ST is not set CONFIG_SENSORS_LIS3_I2C=y CONFIG_ALTERA_STAPL=y # CONFIG_INTEL_MEI is not set # CONFIG_INTEL_MEI_ME is not set # CONFIG_INTEL_MEI_TXE is not set # CONFIG_VMWARE_VMCI is not set # # Intel MIC & related support # # # Intel MIC Bus Driver # # CONFIG_INTEL_MIC_BUS is not set # # SCIF Bus Driver # # CONFIG_SCIF_BUS is not set # # VOP Bus Driver # # CONFIG_VOP_BUS is not set # # Intel MIC Host Driver # # # Intel MIC Card Driver # # # SCIF Driver # # # Intel MIC Coprocessor State Management (COSM) Drivers # # # VOP Driver # # CONFIG_GENWQE is not set CONFIG_ECHO=y # CONFIG_MISC_RTSX_PCI is not set # CONFIG_MISC_RTSX_USB is not set CONFIG_HAVE_IDE=y # # SCSI device support # CONFIG_SCSI_MOD=y # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y CONFIG_MII=y CONFIG_NET_CORE=y # CONFIG_BONDING is not set # CONFIG_DUMMY is not set CONFIG_EQUALIZER=y CONFIG_NET_TEAM=y CONFIG_NET_TEAM_MODE_BROADCAST=y # CONFIG_NET_TEAM_MODE_ROUNDROBIN is not set CONFIG_NET_TEAM_MODE_RANDOM=y # CONFIG_NET_TEAM_MODE_ACTIVEBACKUP is not set CONFIG_NET_TEAM_MODE_LOADBALANCE=y CONFIG_MACVLAN=y CONFIG_MACVTAP=y CONFIG_VXLAN=y CONFIG_GENEVE=y CONFIG_GTP=y # CONFIG_MACSEC is not set # CONFIG_NETCONSOLE is not set CONFIG_TUN=y CONFIG_TAP=y # CONFIG_TUN_VNET_CROSS_LE is not set # CONFIG_VETH is not set CONFIG_VIRTIO_NET=y CONFIG_NLMON=y CONFIG_ARCNET=y CONFIG_ARCNET_1201=y CONFIG_ARCNET_1051=y # CONFIG_ARCNET_RAW is not set # CONFIG_ARCNET_CAP is not set CONFIG_ARCNET_COM90xx=y # CONFIG_ARCNET_COM90xxIO is not set CONFIG_ARCNET_RIM_I=y CONFIG_ARCNET_COM20020=y # CONFIG_ARCNET_COM20020_PCI is not set CONFIG_ARCNET_COM20020_CS=y # # CAIF transport drivers # # # Distributed Switch Architecture drivers # CONFIG_ETHERNET=y CONFIG_MDIO=y CONFIG_NET_VENDOR_3COM=y # CONFIG_PCMCIA_3C574 is not set # CONFIG_PCMCIA_3C589 is not set # CONFIG_VORTEX is not set # CONFIG_TYPHOON is not set CONFIG_NET_VENDOR_ADAPTEC=y # CONFIG_ADAPTEC_STARFIRE is not set CONFIG_NET_VENDOR_AGERE=y # CONFIG_ET131X is not set CONFIG_NET_VENDOR_ALACRITECH=y # CONFIG_SLICOSS is not set CONFIG_NET_VENDOR_ALTEON=y # CONFIG_ACENIC is not set # CONFIG_ALTERA_TSE is not set CONFIG_NET_VENDOR_AMAZON=y CONFIG_NET_VENDOR_AMD=y # CONFIG_AMD8111_ETH is not set # CONFIG_PCNET32 is not set # CONFIG_PCMCIA_NMCLAN is not set # CONFIG_AMD_XGBE is not set CONFIG_NET_VENDOR_AQUANTIA=y # CONFIG_AQTION is not set CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y # CONFIG_ATL2 is not set # CONFIG_ATL1 is not set # CONFIG_ATL1E is not set # CONFIG_ATL1C is not set # CONFIG_ALX is not set # CONFIG_NET_VENDOR_AURORA is not set CONFIG_NET_CADENCE=y # CONFIG_MACB is not set CONFIG_NET_VENDOR_BROADCOM=y # CONFIG_B44 is not set # CONFIG_BNX2 is not set # CONFIG_CNIC is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2X is not set # CONFIG_BNXT is not set CONFIG_NET_VENDOR_BROCADE=y # CONFIG_BNA is not set CONFIG_NET_VENDOR_CAVIUM=y # CONFIG_THUNDER_NIC_PF is not set # CONFIG_THUNDER_NIC_VF is not set # CONFIG_THUNDER_NIC_BGX is not set # CONFIG_THUNDER_NIC_RGX is not set CONFIG_CAVIUM_PTP=y # CONFIG_LIQUIDIO is not set CONFIG_NET_VENDOR_CHELSIO=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set # CONFIG_CHELSIO_T4 is not set # CONFIG_CHELSIO_T4VF is not set CONFIG_NET_VENDOR_CISCO=y # CONFIG_ENIC is not set CONFIG_NET_VENDOR_CORTINA=y # CONFIG_CX_ECAT is not set # CONFIG_DNET is not set CONFIG_NET_VENDOR_DEC=y # CONFIG_NET_TULIP is not set CONFIG_NET_VENDOR_DLINK=y # CONFIG_DL2K is not set # CONFIG_SUNDANCE is not set CONFIG_NET_VENDOR_EMULEX=y # CONFIG_BE2NET is not set CONFIG_NET_VENDOR_EZCHIP=y CONFIG_NET_VENDOR_EXAR=y # CONFIG_S2IO is not set # CONFIG_VXGE is not set CONFIG_NET_VENDOR_FUJITSU=y # CONFIG_PCMCIA_FMVJ18X is not set CONFIG_NET_VENDOR_HP=y # CONFIG_HP100 is not set CONFIG_NET_VENDOR_HUAWEI=y CONFIG_NET_VENDOR_INTEL=y # CONFIG_E100 is not set CONFIG_E1000=y CONFIG_E1000E=y CONFIG_E1000E_HWTS=y CONFIG_IGB=y CONFIG_IGB_HWMON=y # CONFIG_IGBVF is not set # CONFIG_IXGB is not set CONFIG_IXGBE=y CONFIG_IXGBE_HWMON=y # CONFIG_I40E is not set CONFIG_NET_VENDOR_I825XX=y # CONFIG_JME is not set CONFIG_NET_VENDOR_MARVELL=y # CONFIG_MVMDIO is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set CONFIG_NET_VENDOR_MELLANOX=y # CONFIG_MLX4_EN is not set # CONFIG_MLX5_CORE is not set # CONFIG_MLXSW_CORE is not set # CONFIG_MLXFW is not set CONFIG_NET_VENDOR_MICREL=y # CONFIG_KS8842 is not set # CONFIG_KS8851 is not set # CONFIG_KS8851_MLL is not set # CONFIG_KSZ884X_PCI is not set CONFIG_NET_VENDOR_MICROCHIP=y # CONFIG_ENC28J60 is not set # CONFIG_ENCX24J600 is not set # CONFIG_LAN743X is not set CONFIG_NET_VENDOR_MYRI=y # CONFIG_MYRI10GE is not set # CONFIG_FEALNX is not set CONFIG_NET_VENDOR_NATSEMI=y # CONFIG_NATSEMI is not set # CONFIG_NS83820 is not set CONFIG_NET_VENDOR_NETRONOME=y CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_8390=y # CONFIG_PCMCIA_AXNET is not set # CONFIG_NE2K_PCI is not set # CONFIG_PCMCIA_PCNET is not set CONFIG_NET_VENDOR_NVIDIA=y # CONFIG_FORCEDETH is not set CONFIG_NET_VENDOR_OKI=y # CONFIG_ETHOC is not set CONFIG_NET_PACKET_ENGINE=y # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set CONFIG_NET_VENDOR_QLOGIC=y # CONFIG_QLA3XXX is not set # CONFIG_QLCNIC is not set # CONFIG_QLGE is not set # CONFIG_NETXEN_NIC is not set # CONFIG_QED is not set CONFIG_NET_VENDOR_QUALCOMM=y # CONFIG_QCOM_EMAC is not set # CONFIG_RMNET is not set CONFIG_NET_VENDOR_REALTEK=y # CONFIG_ATP is not set # CONFIG_8139CP is not set # CONFIG_8139TOO is not set # CONFIG_R8169 is not set CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set CONFIG_NET_VENDOR_ROCKER=y CONFIG_NET_VENDOR_SAMSUNG=y # CONFIG_SXGBE_ETH is not set CONFIG_NET_VENDOR_SEEQ=y CONFIG_NET_VENDOR_SILAN=y # CONFIG_SC92031 is not set CONFIG_NET_VENDOR_SIS=y # CONFIG_SIS900 is not set # CONFIG_SIS190 is not set CONFIG_NET_VENDOR_SOLARFLARE=y # CONFIG_SFC is not set # CONFIG_SFC_FALCON is not set CONFIG_NET_VENDOR_SMSC=y # CONFIG_PCMCIA_SMC91C92 is not set # CONFIG_EPIC100 is not set # CONFIG_SMSC911X is not set # CONFIG_SMSC9420 is not set CONFIG_NET_VENDOR_SOCIONEXT=y CONFIG_NET_VENDOR_STMICRO=y # CONFIG_STMMAC_ETH is not set CONFIG_NET_VENDOR_SUN=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_CASSINI is not set # CONFIG_NIU is not set CONFIG_NET_VENDOR_TEHUTI=y # CONFIG_TEHUTI is not set CONFIG_NET_VENDOR_TI=y # CONFIG_TI_CPSW_ALE is not set # CONFIG_TLAN is not set CONFIG_NET_VENDOR_VIA=y # CONFIG_VIA_RHINE is not set # CONFIG_VIA_VELOCITY is not set CONFIG_NET_VENDOR_WIZNET=y # CONFIG_WIZNET_W5100 is not set # CONFIG_WIZNET_W5300 is not set CONFIG_NET_VENDOR_XIRCOM=y # CONFIG_PCMCIA_XIRC2PS is not set CONFIG_NET_VENDOR_SYNOPSYS=y # CONFIG_DWC_XLGMAC is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_NET_SB1000 is not set CONFIG_MDIO_DEVICE=y CONFIG_MDIO_BUS=y # CONFIG_MDIO_BITBANG is not set # CONFIG_MDIO_THUNDER is not set CONFIG_PHYLIB=y CONFIG_SWPHY=y # # MII PHY device drivers # CONFIG_AMD_PHY=y CONFIG_AQUANTIA_PHY=y CONFIG_AT803X_PHY=y CONFIG_BCM7XXX_PHY=y CONFIG_BCM87XX_PHY=y CONFIG_BCM_NET_PHYLIB=y # CONFIG_BROADCOM_PHY is not set CONFIG_CICADA_PHY=y # CONFIG_CORTINA_PHY is not set # CONFIG_DAVICOM_PHY is not set CONFIG_DP83822_PHY=y CONFIG_DP83848_PHY=y CONFIG_DP83867_PHY=y CONFIG_FIXED_PHY=y CONFIG_ICPLUS_PHY=y CONFIG_INTEL_XWAY_PHY=y CONFIG_LSI_ET1011C_PHY=y # CONFIG_LXT_PHY is not set CONFIG_MARVELL_PHY=y CONFIG_MARVELL_10G_PHY=y CONFIG_MICREL_PHY=y CONFIG_MICROCHIP_PHY=y CONFIG_MICROSEMI_PHY=y CONFIG_NATIONAL_PHY=y CONFIG_QSEMI_PHY=y CONFIG_REALTEK_PHY=y CONFIG_RENESAS_PHY=y # CONFIG_ROCKCHIP_PHY is not set CONFIG_SMSC_PHY=y CONFIG_STE10XP=y CONFIG_TERANETICS_PHY=y CONFIG_VITESSE_PHY=y CONFIG_XILINX_GMII2RGMII=y CONFIG_MICREL_KS8995MA=y CONFIG_PLIP=y # CONFIG_PPP is not set # CONFIG_SLIP is not set CONFIG_USB_NET_DRIVERS=y CONFIG_USB_CATC=y CONFIG_USB_KAWETH=y # CONFIG_USB_PEGASUS is not set CONFIG_USB_RTL8150=y CONFIG_USB_RTL8152=y CONFIG_USB_LAN78XX=y # CONFIG_USB_USBNET is not set CONFIG_USB_IPHETH=y # CONFIG_WLAN is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers # CONFIG_WAN=y # CONFIG_HDLC is not set # CONFIG_DLCI is not set # CONFIG_LAPBETHER is not set # CONFIG_X25_ASY is not set # CONFIG_SBNI is not set CONFIG_XEN_NETDEV_FRONTEND=y # CONFIG_VMXNET3 is not set # CONFIG_FUJITSU_ES is not set CONFIG_NETDEVSIM=y # CONFIG_ISDN is not set # # Input device support # CONFIG_INPUT=y CONFIG_INPUT_LEDS=y CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_POLLDEV=y CONFIG_INPUT_SPARSEKMAP=y CONFIG_INPUT_MATRIXKMAP=y # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set CONFIG_INPUT_EVDEV=y CONFIG_INPUT_EVBUG=y # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ADC=y CONFIG_KEYBOARD_ADP5588=y CONFIG_KEYBOARD_ADP5589=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT1070 is not set CONFIG_KEYBOARD_QT2160=y # CONFIG_KEYBOARD_DLINK_DIR685 is not set CONFIG_KEYBOARD_LKKBD=y # CONFIG_KEYBOARD_GPIO is not set CONFIG_KEYBOARD_GPIO_POLLED=y CONFIG_KEYBOARD_TCA6416=y CONFIG_KEYBOARD_TCA8418=y CONFIG_KEYBOARD_MATRIX=y CONFIG_KEYBOARD_LM8323=y CONFIG_KEYBOARD_LM8333=y CONFIG_KEYBOARD_MAX7359=y CONFIG_KEYBOARD_MCS=y CONFIG_KEYBOARD_MPR121=y CONFIG_KEYBOARD_NEWTON=y CONFIG_KEYBOARD_OPENCORES=y # CONFIG_KEYBOARD_SAMSUNG is not set CONFIG_KEYBOARD_GOLDFISH_EVENTS=y CONFIG_KEYBOARD_STOWAWAY=y CONFIG_KEYBOARD_SUNKBD=y CONFIG_KEYBOARD_TM2_TOUCHKEY=y CONFIG_KEYBOARD_TWL4030=y # CONFIG_KEYBOARD_XTKBD is not set CONFIG_KEYBOARD_CROS_EC=y CONFIG_INPUT_MOUSE=y # CONFIG_MOUSE_PS2 is not set CONFIG_MOUSE_SERIAL=y # CONFIG_MOUSE_APPLETOUCH is not set CONFIG_MOUSE_BCM5974=y # CONFIG_MOUSE_CYAPA is not set CONFIG_MOUSE_ELAN_I2C=y CONFIG_MOUSE_ELAN_I2C_I2C=y # CONFIG_MOUSE_ELAN_I2C_SMBUS is not set CONFIG_MOUSE_VSXXXAA=y CONFIG_MOUSE_GPIO=y CONFIG_MOUSE_SYNAPTICS_I2C=y CONFIG_MOUSE_SYNAPTICS_USB=y CONFIG_INPUT_JOYSTICK=y CONFIG_JOYSTICK_ANALOG=y CONFIG_JOYSTICK_A3D=y CONFIG_JOYSTICK_ADI=y CONFIG_JOYSTICK_COBRA=y # CONFIG_JOYSTICK_GF2K is not set CONFIG_JOYSTICK_GRIP=y CONFIG_JOYSTICK_GRIP_MP=y CONFIG_JOYSTICK_GUILLEMOT=y CONFIG_JOYSTICK_INTERACT=y CONFIG_JOYSTICK_SIDEWINDER=y CONFIG_JOYSTICK_TMDC=y # CONFIG_JOYSTICK_IFORCE is not set CONFIG_JOYSTICK_WARRIOR=y CONFIG_JOYSTICK_MAGELLAN=y # CONFIG_JOYSTICK_SPACEORB is not set CONFIG_JOYSTICK_SPACEBALL=y CONFIG_JOYSTICK_STINGER=y # CONFIG_JOYSTICK_TWIDJOY is not set CONFIG_JOYSTICK_ZHENHUA=y CONFIG_JOYSTICK_DB9=y CONFIG_JOYSTICK_GAMECON=y # CONFIG_JOYSTICK_TURBOGRAFX is not set # CONFIG_JOYSTICK_AS5011 is not set # CONFIG_JOYSTICK_JOYDUMP is not set CONFIG_JOYSTICK_XPAD=y CONFIG_JOYSTICK_XPAD_FF=y # CONFIG_JOYSTICK_XPAD_LEDS is not set # CONFIG_JOYSTICK_WALKERA0701 is not set CONFIG_JOYSTICK_PSXPAD_SPI=y # CONFIG_JOYSTICK_PSXPAD_SPI_FF is not set # CONFIG_JOYSTICK_PXRC is not set CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=y CONFIG_TABLET_USB_AIPTEK=y CONFIG_TABLET_USB_GTCO=y CONFIG_TABLET_USB_HANWANG=y CONFIG_TABLET_USB_KBTAB=y CONFIG_TABLET_USB_PEGASUS=y CONFIG_TABLET_SERIAL_WACOM4=y # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set CONFIG_RMI4_CORE=y CONFIG_RMI4_I2C=y CONFIG_RMI4_SPI=y CONFIG_RMI4_SMB=y # CONFIG_RMI4_F03 is not set # CONFIG_RMI4_F11 is not set # CONFIG_RMI4_F12 is not set # CONFIG_RMI4_F30 is not set CONFIG_RMI4_F34=y CONFIG_RMI4_F54=y CONFIG_RMI4_F55=y # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y CONFIG_SERIO_CT82C710=y CONFIG_SERIO_PARKBD=y # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set CONFIG_SERIO_ALTERA_PS2=y CONFIG_SERIO_PS2MULT=y CONFIG_SERIO_ARC_PS2=y CONFIG_SERIO_GPIO_PS2=y CONFIG_USERIO=y CONFIG_GAMEPORT=y # CONFIG_GAMEPORT_NS558 is not set # CONFIG_GAMEPORT_L4 is not set # CONFIG_GAMEPORT_EMU10K1 is not set # CONFIG_GAMEPORT_FM801 is not set # # Character devices # CONFIG_TTY=y # CONFIG_VT is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set # CONFIG_N_GSM is not set # CONFIG_TRACE_SINK is not set # CONFIG_GOLDFISH_TTY is not set CONFIG_DEVMEM=y CONFIG_DEVKMEM=y # # Serial drivers # CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y CONFIG_SERIAL_8250_PNP=y # CONFIG_SERIAL_8250_FINTEK is not set CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_EXAR=y # CONFIG_SERIAL_8250_CS is not set # CONFIG_SERIAL_8250_MEN_MCB is not set CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # CONFIG_SERIAL_8250_DW is not set # CONFIG_SERIAL_8250_RT288X is not set CONFIG_SERIAL_8250_LPSS=y CONFIG_SERIAL_8250_MID=y # CONFIG_SERIAL_8250_MOXA is not set # # Non-8250 serial port support # # CONFIG_SERIAL_MAX3100 is not set # CONFIG_SERIAL_MAX310X is not set # CONFIG_SERIAL_UARTLITE is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_IFX6X60 is not set # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_RP2 is not set # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_MEN_Z135 is not set CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y # CONFIG_TTY_PRINTK is not set CONFIG_PRINTER=y # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set CONFIG_HVC_DRIVER=y CONFIG_HVC_IRQ=y CONFIG_HVC_XEN=y CONFIG_HVC_XEN_FRONTEND=y # CONFIG_VIRTIO_CONSOLE is not set CONFIG_IPMI_HANDLER=y CONFIG_IPMI_PROC_INTERFACE=y # CONFIG_IPMI_PANIC_EVENT is not set CONFIG_IPMI_DEVICE_INTERFACE=y CONFIG_IPMI_SI=y # CONFIG_IPMI_SSIF is not set CONFIG_IPMI_WATCHDOG=y CONFIG_IPMI_POWEROFF=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_TIMERIOMEM=y CONFIG_HW_RANDOM_INTEL=y CONFIG_HW_RANDOM_AMD=y CONFIG_HW_RANDOM_VIA=y CONFIG_HW_RANDOM_VIRTIO=y CONFIG_NVRAM=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # # PCMCIA character devices # # CONFIG_SYNCLINK_CS is not set CONFIG_CARDMAN_4000=y # CONFIG_CARDMAN_4040 is not set CONFIG_SCR24X=y # CONFIG_IPWIRELESS is not set # CONFIG_MWAVE is not set # CONFIG_HPET is not set CONFIG_HANGCHECK_TIMER=y CONFIG_TCG_TPM=y # CONFIG_HW_RANDOM_TPM is not set CONFIG_TCG_TIS_CORE=y CONFIG_TCG_TIS=y # CONFIG_TCG_TIS_SPI is not set CONFIG_TCG_TIS_I2C_ATMEL=y CONFIG_TCG_TIS_I2C_INFINEON=y # CONFIG_TCG_TIS_I2C_NUVOTON is not set CONFIG_TCG_NSC=y CONFIG_TCG_ATMEL=y # CONFIG_TCG_INFINEON is not set CONFIG_TCG_XEN=y # CONFIG_TCG_CRB is not set # CONFIG_TCG_VTPM_PROXY is not set CONFIG_TCG_TIS_ST33ZP24=y CONFIG_TCG_TIS_ST33ZP24_I2C=y CONFIG_TCG_TIS_ST33ZP24_SPI=y CONFIG_TELCLOCK=y CONFIG_DEVPORT=y # CONFIG_XILLYBUS is not set # # I2C support # CONFIG_I2C=y CONFIG_ACPI_I2C_OPREGION=y CONFIG_I2C_BOARDINFO=y # CONFIG_I2C_COMPAT is not set CONFIG_I2C_CHARDEV=y CONFIG_I2C_MUX=y # # Multiplexer I2C Chip support # CONFIG_I2C_MUX_GPIO=y # CONFIG_I2C_MUX_LTC4306 is not set # CONFIG_I2C_MUX_PCA9541 is not set CONFIG_I2C_MUX_PCA954x=y CONFIG_I2C_MUX_REG=y CONFIG_I2C_MUX_MLXCPLD=y # CONFIG_I2C_HELPER_AUTO is not set CONFIG_I2C_SMBUS=y # # I2C Algorithms # CONFIG_I2C_ALGOBIT=y CONFIG_I2C_ALGOPCF=y CONFIG_I2C_ALGOPCA=y # # I2C Hardware Bus support # # # PC SMBus host controller drivers # # CONFIG_I2C_ALI1535 is not set # CONFIG_I2C_ALI1563 is not set # CONFIG_I2C_ALI15X3 is not set # CONFIG_I2C_AMD756 is not set # CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_I801 is not set # CONFIG_I2C_ISCH is not set # CONFIG_I2C_ISMT is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # # ACPI drivers # # CONFIG_I2C_SCMI is not set # # I2C system bus drivers (mostly embedded / system-on-chip) # # CONFIG_I2C_CBUS_GPIO is not set CONFIG_I2C_DESIGNWARE_CORE=y CONFIG_I2C_DESIGNWARE_PLATFORM=y # CONFIG_I2C_DESIGNWARE_SLAVE is not set # CONFIG_I2C_DESIGNWARE_PCI is not set # CONFIG_I2C_EMEV2 is not set CONFIG_I2C_GPIO=y # CONFIG_I2C_GPIO_FAULT_INJECTOR is not set # CONFIG_I2C_KEMPLD is not set CONFIG_I2C_OCORES=y CONFIG_I2C_PCA_PLATFORM=y CONFIG_I2C_SIMTEC=y CONFIG_I2C_XILINX=y # # External I2C/SMBus adapter drivers # # CONFIG_I2C_DIOLAN_U2C is not set # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set CONFIG_I2C_ROBOTFUZZ_OSIF=y # CONFIG_I2C_TAOS_EVM is not set CONFIG_I2C_TINY_USB=y # CONFIG_I2C_VIPERBOARD is not set # # Other I2C/SMBus bus drivers # CONFIG_I2C_MLXCPLD=y # CONFIG_I2C_CROS_EC_TUNNEL is not set # CONFIG_I2C_SLAVE is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set CONFIG_SPI=y # CONFIG_SPI_DEBUG is not set CONFIG_SPI_MASTER=y # # SPI Master Controller Drivers # CONFIG_SPI_ALTERA=y # CONFIG_SPI_AXI_SPI_ENGINE is not set CONFIG_SPI_BITBANG=y CONFIG_SPI_BUTTERFLY=y CONFIG_SPI_CADENCE=y CONFIG_SPI_DESIGNWARE=y # CONFIG_SPI_DW_PCI is not set # CONFIG_SPI_DW_MMIO is not set CONFIG_SPI_GPIO=y CONFIG_SPI_LM70_LLP=y CONFIG_SPI_OC_TINY=y # CONFIG_SPI_PXA2XX is not set # CONFIG_SPI_ROCKCHIP is not set CONFIG_SPI_SC18IS602=y # CONFIG_SPI_XCOMM is not set CONFIG_SPI_XILINX=y CONFIG_SPI_ZYNQMP_GQSPI=y # # SPI Protocol Masters # # CONFIG_SPI_SPIDEV is not set CONFIG_SPI_TLE62X0=y CONFIG_SPI_SLAVE=y CONFIG_SPI_SLAVE_TIME=y CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y CONFIG_SPMI=y CONFIG_HSI=y CONFIG_HSI_BOARDINFO=y # # HSI controllers # # # HSI clients # CONFIG_HSI_CHAR=y CONFIG_PPS=y # CONFIG_PPS_DEBUG is not set # # PPS clients support # # CONFIG_PPS_CLIENT_KTIMER is not set # CONFIG_PPS_CLIENT_LDISC is not set CONFIG_PPS_CLIENT_PARPORT=y # CONFIG_PPS_CLIENT_GPIO is not set # # PPS generators support # # # PTP clock support # # CONFIG_PTP_1588_CLOCK is not set # CONFIG_PINCTRL is not set CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MAX730X=y # # Memory mapped GPIO drivers # # CONFIG_GPIO_AMDPT is not set CONFIG_GPIO_DWAPB=y # CONFIG_GPIO_EXAR is not set CONFIG_GPIO_GENERIC_PLATFORM=y # CONFIG_GPIO_ICH is not set # CONFIG_GPIO_LYNXPOINT is not set CONFIG_GPIO_MB86S7X=y # CONFIG_GPIO_MENZ127 is not set CONFIG_GPIO_MOCKUP=y # CONFIG_GPIO_VX855 is not set # # Port-mapped I/O GPIO drivers # # CONFIG_GPIO_F7188X is not set # CONFIG_GPIO_IT87 is not set # CONFIG_GPIO_SCH is not set # CONFIG_GPIO_SCH311X is not set # CONFIG_GPIO_WINBOND is not set # CONFIG_GPIO_WS16C48 is not set # # I2C GPIO expanders # CONFIG_GPIO_ADP5588=y CONFIG_GPIO_ADP5588_IRQ=y CONFIG_GPIO_MAX7300=y # CONFIG_GPIO_MAX732X is not set CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_PCF857X=y # CONFIG_GPIO_TPIC2810 is not set # # MFD GPIO expanders # CONFIG_GPIO_ARIZONA=y CONFIG_GPIO_BD9571MWV=y CONFIG_GPIO_KEMPLD=y # CONFIG_GPIO_LP3943 is not set CONFIG_GPIO_TPS65086=y CONFIG_GPIO_TPS65912=y # CONFIG_GPIO_TWL4030 is not set # CONFIG_GPIO_WM831X is not set # CONFIG_GPIO_WM8350 is not set CONFIG_GPIO_WM8994=y # # PCI GPIO expanders # # CONFIG_GPIO_AMD8111 is not set # CONFIG_GPIO_BT8XX is not set # CONFIG_GPIO_ML_IOH is not set # CONFIG_GPIO_PCI_IDIO_16 is not set # CONFIG_GPIO_PCIE_IDIO_24 is not set # CONFIG_GPIO_RDC321X is not set # # SPI GPIO expanders # CONFIG_GPIO_MAX3191X=y # CONFIG_GPIO_MAX7301 is not set CONFIG_GPIO_MC33880=y CONFIG_GPIO_PISOSR=y # CONFIG_GPIO_XRA1403 is not set # # USB GPIO expanders # CONFIG_GPIO_VIPERBOARD=y CONFIG_W1=y # CONFIG_W1_CON is not set # # 1-wire Bus Masters # # CONFIG_W1_MASTER_MATROX is not set CONFIG_W1_MASTER_DS2490=y CONFIG_W1_MASTER_DS2482=y CONFIG_W1_MASTER_DS1WM=y # CONFIG_W1_MASTER_GPIO is not set # # 1-wire Slaves # CONFIG_W1_SLAVE_THERM=y # CONFIG_W1_SLAVE_SMEM is not set # CONFIG_W1_SLAVE_DS2405 is not set CONFIG_W1_SLAVE_DS2408=y CONFIG_W1_SLAVE_DS2408_READBACK=y CONFIG_W1_SLAVE_DS2413=y CONFIG_W1_SLAVE_DS2406=y CONFIG_W1_SLAVE_DS2423=y CONFIG_W1_SLAVE_DS2805=y # CONFIG_W1_SLAVE_DS2431 is not set # CONFIG_W1_SLAVE_DS2433 is not set # CONFIG_W1_SLAVE_DS2438 is not set # CONFIG_W1_SLAVE_DS2760 is not set CONFIG_W1_SLAVE_DS2780=y CONFIG_W1_SLAVE_DS2781=y CONFIG_W1_SLAVE_DS28E04=y CONFIG_W1_SLAVE_DS28E17=y CONFIG_POWER_AVS=y CONFIG_POWER_RESET=y # CONFIG_POWER_RESET_RESTART is not set CONFIG_POWER_SUPPLY=y CONFIG_POWER_SUPPLY_DEBUG=y CONFIG_PDA_POWER=y # CONFIG_GENERIC_ADC_BATTERY is not set CONFIG_WM831X_BACKUP=y CONFIG_WM831X_POWER=y # CONFIG_WM8350_POWER is not set # CONFIG_TEST_POWER is not set CONFIG_BATTERY_88PM860X=y CONFIG_BATTERY_DS2780=y CONFIG_BATTERY_DS2781=y CONFIG_BATTERY_DS2782=y # CONFIG_BATTERY_SBS is not set CONFIG_CHARGER_SBS=y CONFIG_MANAGER_SBS=y # CONFIG_BATTERY_BQ27XXX is not set # CONFIG_CHARGER_DA9150 is not set CONFIG_BATTERY_DA9150=y # CONFIG_BATTERY_MAX17040 is not set CONFIG_BATTERY_MAX17042=y # CONFIG_BATTERY_MAX1721X is not set CONFIG_BATTERY_TWL4030_MADC=y CONFIG_CHARGER_88PM860X=y # CONFIG_BATTERY_RX51 is not set # CONFIG_CHARGER_ISP1704 is not set # CONFIG_CHARGER_MAX8903 is not set # CONFIG_CHARGER_TWL4030 is not set CONFIG_CHARGER_LP8727=y CONFIG_CHARGER_GPIO=y # CONFIG_CHARGER_MANAGER is not set # CONFIG_CHARGER_LTC3651 is not set CONFIG_CHARGER_MAX77693=y CONFIG_CHARGER_MAX8998=y CONFIG_CHARGER_BQ2415X=y # CONFIG_CHARGER_BQ24190 is not set CONFIG_CHARGER_BQ24257=y CONFIG_CHARGER_BQ24735=y CONFIG_CHARGER_BQ25890=y CONFIG_CHARGER_SMB347=y # CONFIG_CHARGER_TPS65090 is not set # CONFIG_BATTERY_GAUGE_LTC2941 is not set # CONFIG_BATTERY_GOLDFISH is not set # CONFIG_CHARGER_RT9455 is not set CONFIG_HWMON=y CONFIG_HWMON_VID=y CONFIG_HWMON_DEBUG_CHIP=y # # Native drivers # # CONFIG_SENSORS_AD7314 is not set CONFIG_SENSORS_AD7414=y CONFIG_SENSORS_AD7418=y CONFIG_SENSORS_ADM1021=y CONFIG_SENSORS_ADM1025=y CONFIG_SENSORS_ADM1026=y CONFIG_SENSORS_ADM1029=y # CONFIG_SENSORS_ADM1031 is not set CONFIG_SENSORS_ADM9240=y CONFIG_SENSORS_ADT7X10=y CONFIG_SENSORS_ADT7310=y CONFIG_SENSORS_ADT7410=y CONFIG_SENSORS_ADT7411=y # CONFIG_SENSORS_ADT7462 is not set # CONFIG_SENSORS_ADT7470 is not set CONFIG_SENSORS_ADT7475=y CONFIG_SENSORS_ASC7621=y # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_K10TEMP is not set # CONFIG_SENSORS_FAM15H_POWER is not set # CONFIG_SENSORS_APPLESMC is not set CONFIG_SENSORS_ASB100=y # CONFIG_SENSORS_ASPEED is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_DS620 is not set CONFIG_SENSORS_DS1621=y CONFIG_SENSORS_DELL_SMM=y # CONFIG_SENSORS_I5K_AMB is not set CONFIG_SENSORS_F71805F=y CONFIG_SENSORS_F71882FG=y CONFIG_SENSORS_F75375S=y CONFIG_SENSORS_MC13783_ADC=y CONFIG_SENSORS_FSCHMD=y CONFIG_SENSORS_FTSTEUTATES=y CONFIG_SENSORS_GL518SM=y CONFIG_SENSORS_GL520SM=y CONFIG_SENSORS_G760A=y CONFIG_SENSORS_G762=y CONFIG_SENSORS_HIH6130=y CONFIG_SENSORS_IBMAEM=y # CONFIG_SENSORS_IBMPEX is not set CONFIG_SENSORS_IIO_HWMON=y # CONFIG_SENSORS_I5500 is not set CONFIG_SENSORS_CORETEMP=y # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_JC42 is not set # CONFIG_SENSORS_POWR1220 is not set # CONFIG_SENSORS_LINEAGE is not set CONFIG_SENSORS_LTC2945=y # CONFIG_SENSORS_LTC2990 is not set CONFIG_SENSORS_LTC4151=y CONFIG_SENSORS_LTC4215=y # CONFIG_SENSORS_LTC4222 is not set CONFIG_SENSORS_LTC4245=y CONFIG_SENSORS_LTC4260=y # CONFIG_SENSORS_LTC4261 is not set # CONFIG_SENSORS_MAX1111 is not set CONFIG_SENSORS_MAX16065=y CONFIG_SENSORS_MAX1619=y CONFIG_SENSORS_MAX1668=y CONFIG_SENSORS_MAX197=y CONFIG_SENSORS_MAX31722=y # CONFIG_SENSORS_MAX6621 is not set CONFIG_SENSORS_MAX6639=y CONFIG_SENSORS_MAX6642=y # CONFIG_SENSORS_MAX6650 is not set # CONFIG_SENSORS_MAX6697 is not set # CONFIG_SENSORS_MAX31790 is not set # CONFIG_SENSORS_MCP3021 is not set CONFIG_SENSORS_TC654=y CONFIG_SENSORS_MENF21BMC_HWMON=y CONFIG_SENSORS_ADCXX=y # CONFIG_SENSORS_LM63 is not set CONFIG_SENSORS_LM70=y CONFIG_SENSORS_LM73=y CONFIG_SENSORS_LM75=y CONFIG_SENSORS_LM77=y CONFIG_SENSORS_LM78=y CONFIG_SENSORS_LM80=y CONFIG_SENSORS_LM83=y CONFIG_SENSORS_LM85=y # CONFIG_SENSORS_LM87 is not set # CONFIG_SENSORS_LM90 is not set CONFIG_SENSORS_LM92=y CONFIG_SENSORS_LM93=y # CONFIG_SENSORS_LM95234 is not set CONFIG_SENSORS_LM95241=y CONFIG_SENSORS_LM95245=y CONFIG_SENSORS_PC87360=y # CONFIG_SENSORS_PC87427 is not set # CONFIG_SENSORS_NTC_THERMISTOR is not set CONFIG_SENSORS_NCT6683=y # CONFIG_SENSORS_NCT6775 is not set # CONFIG_SENSORS_NCT7802 is not set CONFIG_SENSORS_NCT7904=y CONFIG_SENSORS_PCF8591=y CONFIG_PMBUS=y # CONFIG_SENSORS_PMBUS is not set # CONFIG_SENSORS_ADM1275 is not set CONFIG_SENSORS_IBM_CFFPS=y CONFIG_SENSORS_IR35221=y CONFIG_SENSORS_LM25066=y CONFIG_SENSORS_LTC2978=y # CONFIG_SENSORS_LTC2978_REGULATOR is not set CONFIG_SENSORS_LTC3815=y CONFIG_SENSORS_MAX16064=y # CONFIG_SENSORS_MAX20751 is not set CONFIG_SENSORS_MAX31785=y CONFIG_SENSORS_MAX34440=y # CONFIG_SENSORS_MAX8688 is not set CONFIG_SENSORS_TPS40422=y CONFIG_SENSORS_TPS53679=y CONFIG_SENSORS_UCD9000=y CONFIG_SENSORS_UCD9200=y CONFIG_SENSORS_ZL6100=y CONFIG_SENSORS_SHT15=y CONFIG_SENSORS_SHT21=y CONFIG_SENSORS_SHT3x=y CONFIG_SENSORS_SHTC1=y # CONFIG_SENSORS_SIS5595 is not set CONFIG_SENSORS_DME1737=y CONFIG_SENSORS_EMC1403=y CONFIG_SENSORS_EMC2103=y # CONFIG_SENSORS_EMC6W201 is not set CONFIG_SENSORS_SMSC47M1=y CONFIG_SENSORS_SMSC47M192=y # CONFIG_SENSORS_SMSC47B397 is not set CONFIG_SENSORS_SCH56XX_COMMON=y CONFIG_SENSORS_SCH5627=y # CONFIG_SENSORS_SCH5636 is not set CONFIG_SENSORS_STTS751=y # CONFIG_SENSORS_SMM665 is not set CONFIG_SENSORS_ADC128D818=y CONFIG_SENSORS_ADS1015=y # CONFIG_SENSORS_ADS7828 is not set CONFIG_SENSORS_ADS7871=y CONFIG_SENSORS_AMC6821=y CONFIG_SENSORS_INA209=y # CONFIG_SENSORS_INA2XX is not set CONFIG_SENSORS_INA3221=y CONFIG_SENSORS_TC74=y # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_TMP102 is not set CONFIG_SENSORS_TMP103=y # CONFIG_SENSORS_TMP108 is not set CONFIG_SENSORS_TMP401=y CONFIG_SENSORS_TMP421=y CONFIG_SENSORS_VIA_CPUTEMP=y # CONFIG_SENSORS_VIA686A is not set CONFIG_SENSORS_VT1211=y # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83773G is not set # CONFIG_SENSORS_W83781D is not set # CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83793 is not set CONFIG_SENSORS_W83795=y CONFIG_SENSORS_W83795_FANCTRL=y CONFIG_SENSORS_W83L785TS=y # CONFIG_SENSORS_W83L786NG is not set CONFIG_SENSORS_W83627HF=y # CONFIG_SENSORS_W83627EHF is not set CONFIG_SENSORS_WM831X=y CONFIG_SENSORS_WM8350=y # # ACPI drivers # # CONFIG_SENSORS_ACPI_POWER is not set # CONFIG_SENSORS_ATK0110 is not set CONFIG_THERMAL=y # CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 # CONFIG_THERMAL_HWMON is not set CONFIG_THERMAL_WRITABLE_TRIPS=y # CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y CONFIG_THERMAL_GOV_FAIR_SHARE=y # CONFIG_THERMAL_GOV_STEP_WISE is not set CONFIG_THERMAL_GOV_BANG_BANG=y # CONFIG_THERMAL_GOV_USER_SPACE is not set CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_THERMAL_EMULATION=y CONFIG_INTEL_POWERCLAMP=y # CONFIG_INTEL_SOC_DTS_THERMAL is not set # # ACPI INT340X thermal drivers # # CONFIG_INT340X_THERMAL is not set # CONFIG_INTEL_PCH_THERMAL is not set CONFIG_GENERIC_ADC_THERMAL=y CONFIG_WATCHDOG=y CONFIG_WATCHDOG_CORE=y # CONFIG_WATCHDOG_NOWAYOUT is not set # CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED is not set CONFIG_WATCHDOG_SYSFS=y # # Watchdog Device Drivers # # CONFIG_SOFT_WATCHDOG is not set CONFIG_DA9063_WATCHDOG=y CONFIG_DA9062_WATCHDOG=y CONFIG_MENF21BMC_WATCHDOG=y # CONFIG_WDAT_WDT is not set CONFIG_WM831X_WATCHDOG=y CONFIG_WM8350_WATCHDOG=y CONFIG_XILINX_WATCHDOG=y # CONFIG_ZIIRAVE_WATCHDOG is not set # CONFIG_CADENCE_WATCHDOG is not set CONFIG_DW_WATCHDOG=y # CONFIG_TWL4030_WATCHDOG is not set # CONFIG_MAX63XX_WATCHDOG is not set # CONFIG_RETU_WATCHDOG is not set # CONFIG_ACQUIRE_WDT is not set CONFIG_ADVANTECH_WDT=y # CONFIG_ALIM1535_WDT is not set # CONFIG_ALIM7101_WDT is not set # CONFIG_EBC_C384_WDT is not set CONFIG_F71808E_WDT=y # CONFIG_SP5100_TCO is not set CONFIG_SBC_FITPC2_WATCHDOG=y # CONFIG_EUROTECH_WDT is not set CONFIG_IB700_WDT=y CONFIG_IBMASR=y CONFIG_WAFER_WDT=y # CONFIG_I6300ESB_WDT is not set # CONFIG_IE6XX_WDT is not set # CONFIG_ITCO_WDT is not set CONFIG_IT8712F_WDT=y CONFIG_IT87_WDT=y # CONFIG_HP_WATCHDOG is not set CONFIG_KEMPLD_WDT=y # CONFIG_SC1200_WDT is not set CONFIG_PC87413_WDT=y # CONFIG_NV_TCO is not set CONFIG_60XX_WDT=y CONFIG_CPU5_WDT=y CONFIG_SMSC_SCH311X_WDT=y CONFIG_SMSC37B787_WDT=y # CONFIG_VIA_WDT is not set CONFIG_W83627HF_WDT=y CONFIG_W83877F_WDT=y # CONFIG_W83977F_WDT is not set # CONFIG_MACHZ_WDT is not set CONFIG_SBC_EPX_C3_WATCHDOG=y # CONFIG_NI903X_WDT is not set # CONFIG_NIC7018_WDT is not set CONFIG_MEN_A21_WDT=y # CONFIG_XEN_WDT is not set # # PCI-based Watchdog Cards # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set # # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=y # # Watchdog Pretimeout Governors # # CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set CONFIG_SSB_POSSIBLE=y # CONFIG_SSB is not set CONFIG_BCMA_POSSIBLE=y CONFIG_BCMA=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y CONFIG_BCMA_HOST_PCI=y CONFIG_BCMA_HOST_SOC=y CONFIG_BCMA_DRIVER_PCI=y # CONFIG_BCMA_SFLASH is not set # CONFIG_BCMA_DRIVER_GMAC_CMN is not set CONFIG_BCMA_DRIVER_GPIO=y CONFIG_BCMA_DEBUG=y # # Multifunction device drivers # CONFIG_MFD_CORE=y CONFIG_MFD_AS3711=y # CONFIG_PMIC_ADP5520 is not set # CONFIG_MFD_AAT2870_CORE is not set CONFIG_MFD_BCM590XX=y CONFIG_MFD_BD9571MWV=y # CONFIG_MFD_AXP20X_I2C is not set CONFIG_MFD_CROS_EC=y CONFIG_MFD_CROS_EC_I2C=y CONFIG_MFD_CROS_EC_SPI=y CONFIG_MFD_CROS_EC_CHARDEV=y # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_I2C is not set # CONFIG_MFD_DA9055 is not set CONFIG_MFD_DA9062=y CONFIG_MFD_DA9063=y CONFIG_MFD_DA9150=y # CONFIG_MFD_DLN2 is not set CONFIG_MFD_MC13XXX=y CONFIG_MFD_MC13XXX_SPI=y # CONFIG_MFD_MC13XXX_I2C is not set CONFIG_HTC_PASIC3=y # CONFIG_HTC_I2CPLD is not set # CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set # CONFIG_LPC_ICH is not set # CONFIG_LPC_SCH is not set # CONFIG_INTEL_SOC_PMIC is not set # CONFIG_INTEL_SOC_PMIC_CHTWC is not set # CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set # CONFIG_MFD_INTEL_LPSS_ACPI is not set # CONFIG_MFD_INTEL_LPSS_PCI is not set # CONFIG_MFD_JANZ_CMODIO is not set CONFIG_MFD_KEMPLD=y # CONFIG_MFD_88PM800 is not set CONFIG_MFD_88PM805=y CONFIG_MFD_88PM860X=y # CONFIG_MFD_MAX14577 is not set CONFIG_MFD_MAX77693=y # CONFIG_MFD_MAX77843 is not set CONFIG_MFD_MAX8907=y # CONFIG_MFD_MAX8925 is not set # CONFIG_MFD_MAX8997 is not set CONFIG_MFD_MAX8998=y # CONFIG_MFD_MT6397 is not set CONFIG_MFD_MENF21BMC=y # CONFIG_EZX_PCAP is not set CONFIG_MFD_VIPERBOARD=y CONFIG_MFD_RETU=y # CONFIG_MFD_PCF50633 is not set # CONFIG_MFD_RDC321X is not set # CONFIG_MFD_RT5033 is not set # CONFIG_MFD_RC5T583 is not set CONFIG_MFD_SEC_CORE=y CONFIG_MFD_SI476X_CORE=y # CONFIG_MFD_SM501 is not set CONFIG_MFD_SKY81452=y CONFIG_MFD_SMSC=y CONFIG_ABX500_CORE=y # CONFIG_AB3100_CORE is not set CONFIG_MFD_SYSCON=y CONFIG_MFD_TI_AM335X_TSCADC=y CONFIG_MFD_LP3943=y # CONFIG_MFD_LP8788 is not set CONFIG_MFD_TI_LMU=y # CONFIG_MFD_PALMAS is not set CONFIG_TPS6105X=y # CONFIG_TPS65010 is not set CONFIG_TPS6507X=y CONFIG_MFD_TPS65086=y CONFIG_MFD_TPS65090=y # CONFIG_MFD_TPS68470 is not set # CONFIG_MFD_TI_LP873X is not set # CONFIG_MFD_TPS6586X is not set # CONFIG_MFD_TPS65910 is not set CONFIG_MFD_TPS65912=y # CONFIG_MFD_TPS65912_I2C is not set CONFIG_MFD_TPS65912_SPI=y # CONFIG_MFD_TPS80031 is not set CONFIG_TWL4030_CORE=y # CONFIG_MFD_TWL4030_AUDIO is not set # CONFIG_TWL6040_CORE is not set CONFIG_MFD_WL1273_CORE=y CONFIG_MFD_LM3533=y # CONFIG_MFD_VX855 is not set CONFIG_MFD_ARIZONA=y # CONFIG_MFD_ARIZONA_I2C is not set CONFIG_MFD_ARIZONA_SPI=y # CONFIG_MFD_CS47L24 is not set # CONFIG_MFD_WM5102 is not set CONFIG_MFD_WM5110=y CONFIG_MFD_WM8997=y CONFIG_MFD_WM8998=y CONFIG_MFD_WM8400=y CONFIG_MFD_WM831X=y # CONFIG_MFD_WM831X_I2C is not set CONFIG_MFD_WM831X_SPI=y CONFIG_MFD_WM8350=y CONFIG_MFD_WM8350_I2C=y CONFIG_MFD_WM8994=y # CONFIG_RAVE_SP_CORE is not set CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_VIRTUAL_CONSUMER=y CONFIG_REGULATOR_USERSPACE_CONSUMER=y # CONFIG_REGULATOR_88PG86X is not set # CONFIG_REGULATOR_88PM8607 is not set CONFIG_REGULATOR_ACT8865=y # CONFIG_REGULATOR_AD5398 is not set CONFIG_REGULATOR_ANATOP=y # CONFIG_REGULATOR_ARIZONA_LDO1 is not set CONFIG_REGULATOR_ARIZONA_MICSUPP=y # CONFIG_REGULATOR_AS3711 is not set CONFIG_REGULATOR_BCM590XX=y # CONFIG_REGULATOR_BD9571MWV is not set # CONFIG_REGULATOR_DA9062 is not set # CONFIG_REGULATOR_DA9063 is not set CONFIG_REGULATOR_DA9210=y # CONFIG_REGULATOR_DA9211 is not set CONFIG_REGULATOR_FAN53555=y # CONFIG_REGULATOR_GPIO is not set # CONFIG_REGULATOR_ISL9305 is not set CONFIG_REGULATOR_ISL6271A=y CONFIG_REGULATOR_LM363X=y CONFIG_REGULATOR_LP3971=y CONFIG_REGULATOR_LP3972=y CONFIG_REGULATOR_LP872X=y CONFIG_REGULATOR_LP8755=y CONFIG_REGULATOR_LTC3589=y # CONFIG_REGULATOR_LTC3676 is not set # CONFIG_REGULATOR_MAX1586 is not set CONFIG_REGULATOR_MAX8649=y # CONFIG_REGULATOR_MAX8660 is not set CONFIG_REGULATOR_MAX8907=y CONFIG_REGULATOR_MAX8952=y CONFIG_REGULATOR_MAX8998=y # CONFIG_REGULATOR_MAX77693 is not set CONFIG_REGULATOR_MC13XXX_CORE=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_REGULATOR_MT6311=y CONFIG_REGULATOR_PFUZE100=y CONFIG_REGULATOR_PV88060=y CONFIG_REGULATOR_PV88080=y CONFIG_REGULATOR_PV88090=y CONFIG_REGULATOR_QCOM_SPMI=y CONFIG_REGULATOR_S2MPA01=y # CONFIG_REGULATOR_S2MPS11 is not set CONFIG_REGULATOR_S5M8767=y # CONFIG_REGULATOR_SKY81452 is not set CONFIG_REGULATOR_TPS51632=y CONFIG_REGULATOR_TPS6105X=y CONFIG_REGULATOR_TPS62360=y # CONFIG_REGULATOR_TPS65023 is not set # CONFIG_REGULATOR_TPS6507X is not set CONFIG_REGULATOR_TPS65086=y CONFIG_REGULATOR_TPS65090=y # CONFIG_REGULATOR_TPS65132 is not set # CONFIG_REGULATOR_TPS6524X is not set CONFIG_REGULATOR_TPS65912=y CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_WM831X=y CONFIG_REGULATOR_WM8350=y CONFIG_REGULATOR_WM8400=y CONFIG_REGULATOR_WM8994=y CONFIG_RC_CORE=y # CONFIG_RC_MAP is not set CONFIG_LIRC=y # CONFIG_RC_DECODERS is not set CONFIG_RC_DEVICES=y CONFIG_RC_ATI_REMOTE=y # CONFIG_IR_ENE is not set CONFIG_IR_IMON=y # CONFIG_IR_IMON_RAW is not set # CONFIG_IR_MCEUSB is not set # CONFIG_IR_ITE_CIR is not set # CONFIG_IR_FINTEK is not set # CONFIG_IR_NUVOTON is not set CONFIG_IR_REDRAT3=y CONFIG_IR_STREAMZAP=y # CONFIG_IR_WINBOND_CIR is not set CONFIG_IR_IGORPLUGUSB=y # CONFIG_IR_IGUANA is not set CONFIG_IR_TTUSBIR=y CONFIG_RC_LOOPBACK=y CONFIG_IR_SERIAL=y # CONFIG_IR_SERIAL_TRANSMITTER is not set # CONFIG_IR_SIR is not set CONFIG_MEDIA_SUPPORT=y # # Multimedia core support # CONFIG_MEDIA_CAMERA_SUPPORT=y # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set # CONFIG_MEDIA_RADIO_SUPPORT is not set CONFIG_MEDIA_SDR_SUPPORT=y CONFIG_MEDIA_CEC_SUPPORT=y # CONFIG_MEDIA_CONTROLLER is not set CONFIG_VIDEO_DEV=y CONFIG_VIDEO_V4L2=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set CONFIG_V4L2_FWNODE=y # # Media drivers # # CONFIG_MEDIA_USB_SUPPORT is not set # CONFIG_MEDIA_PCI_SUPPORT is not set # CONFIG_V4L_PLATFORM_DRIVERS is not set # CONFIG_V4L_MEM2MEM_DRIVERS is not set # CONFIG_V4L_TEST_DRIVERS is not set # CONFIG_CEC_PLATFORM_DRIVERS is not set # CONFIG_SDR_PLATFORM_DRIVERS is not set # # Supported MMC/SDIO adapters # CONFIG_CYPRESS_FIRMWARE=y CONFIG_VIDEOBUF2_CORE=y CONFIG_VIDEOBUF2_V4L2=y CONFIG_VIDEOBUF2_MEMOPS=y CONFIG_VIDEOBUF2_VMALLOC=y # # Media ancillary drivers (tuners, sensors, i2c, spi, frontends) # # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set CONFIG_VIDEO_IR_I2C=y # # I2C Encoders, decoders, sensors and other helper chips # # # Audio decoders, processors and mixers # # CONFIG_VIDEO_TVAUDIO is not set CONFIG_VIDEO_TDA7432=y CONFIG_VIDEO_TDA9840=y CONFIG_VIDEO_TEA6415C=y CONFIG_VIDEO_TEA6420=y # CONFIG_VIDEO_MSP3400 is not set # CONFIG_VIDEO_CS3308 is not set # CONFIG_VIDEO_CS5345 is not set # CONFIG_VIDEO_CS53L32A is not set # CONFIG_VIDEO_TLV320AIC23B is not set CONFIG_VIDEO_UDA1342=y CONFIG_VIDEO_WM8775=y CONFIG_VIDEO_WM8739=y CONFIG_VIDEO_VP27SMPX=y # CONFIG_VIDEO_SONY_BTF_MPX is not set # # RDS decoders # # CONFIG_VIDEO_SAA6588 is not set # # Video decoders # CONFIG_VIDEO_ADV7183=y CONFIG_VIDEO_BT819=y # CONFIG_VIDEO_BT856 is not set CONFIG_VIDEO_BT866=y CONFIG_VIDEO_KS0127=y CONFIG_VIDEO_ML86V7667=y CONFIG_VIDEO_SAA7110=y CONFIG_VIDEO_SAA711X=y # CONFIG_VIDEO_TVP514X is not set # CONFIG_VIDEO_TVP5150 is not set CONFIG_VIDEO_TVP7002=y CONFIG_VIDEO_TW2804=y CONFIG_VIDEO_TW9903=y # CONFIG_VIDEO_TW9906 is not set CONFIG_VIDEO_TW9910=y CONFIG_VIDEO_VPX3220=y # # Video and audio decoders # # CONFIG_VIDEO_SAA717X is not set CONFIG_VIDEO_CX25840=y # # Video encoders # CONFIG_VIDEO_SAA7127=y CONFIG_VIDEO_SAA7185=y CONFIG_VIDEO_ADV7170=y CONFIG_VIDEO_ADV7175=y # CONFIG_VIDEO_ADV7343 is not set CONFIG_VIDEO_ADV7393=y # CONFIG_VIDEO_AK881X is not set CONFIG_VIDEO_THS8200=y # # Camera sensor devices # # CONFIG_VIDEO_OV2640 is not set CONFIG_VIDEO_OV2659=y CONFIG_VIDEO_OV6650=y CONFIG_VIDEO_OV5695=y # CONFIG_VIDEO_OV772X is not set CONFIG_VIDEO_OV7640=y CONFIG_VIDEO_OV7670=y CONFIG_VIDEO_OV7740=y # CONFIG_VIDEO_VS6624 is not set CONFIG_VIDEO_MT9M111=y # CONFIG_VIDEO_MT9T112 is not set CONFIG_VIDEO_MT9V011=y CONFIG_VIDEO_SR030PC30=y # # Flash devices # # # Video improvement chips # # CONFIG_VIDEO_UPD64031A is not set CONFIG_VIDEO_UPD64083=y # # Audio/Video compression chips # CONFIG_VIDEO_SAA6752HS=y # # SDR tuner chips # CONFIG_SDR_MAX2175=y # # Miscellaneous helper chips # CONFIG_VIDEO_THS7303=y # CONFIG_VIDEO_M52790 is not set # # Sensors used on soc_camera driver # # # SPI helper chips # # # Media SPI Adapters # CONFIG_MEDIA_TUNER=y # # Customize TV tuners # # CONFIG_MEDIA_TUNER_SIMPLE is not set CONFIG_MEDIA_TUNER_TDA18250=y CONFIG_MEDIA_TUNER_TDA8290=y CONFIG_MEDIA_TUNER_TDA827X=y CONFIG_MEDIA_TUNER_TDA18271=y # CONFIG_MEDIA_TUNER_TDA9887 is not set CONFIG_MEDIA_TUNER_TEA5761=y CONFIG_MEDIA_TUNER_TEA5767=y CONFIG_MEDIA_TUNER_MSI001=y # CONFIG_MEDIA_TUNER_MT20XX is not set CONFIG_MEDIA_TUNER_MT2060=y CONFIG_MEDIA_TUNER_MT2063=y # CONFIG_MEDIA_TUNER_MT2266 is not set # CONFIG_MEDIA_TUNER_MT2131 is not set CONFIG_MEDIA_TUNER_QT1010=y # CONFIG_MEDIA_TUNER_XC2028 is not set # CONFIG_MEDIA_TUNER_XC5000 is not set CONFIG_MEDIA_TUNER_XC4000=y # CONFIG_MEDIA_TUNER_MXL5005S is not set CONFIG_MEDIA_TUNER_MXL5007T=y CONFIG_MEDIA_TUNER_MC44S803=y CONFIG_MEDIA_TUNER_MAX2165=y CONFIG_MEDIA_TUNER_TDA18218=y CONFIG_MEDIA_TUNER_FC0011=y # CONFIG_MEDIA_TUNER_FC0012 is not set # CONFIG_MEDIA_TUNER_FC0013 is not set CONFIG_MEDIA_TUNER_TDA18212=y CONFIG_MEDIA_TUNER_E4000=y CONFIG_MEDIA_TUNER_FC2580=y CONFIG_MEDIA_TUNER_M88RS6000T=y CONFIG_MEDIA_TUNER_TUA9001=y CONFIG_MEDIA_TUNER_SI2157=y # CONFIG_MEDIA_TUNER_IT913X is not set CONFIG_MEDIA_TUNER_R820T=y CONFIG_MEDIA_TUNER_MXL301RF=y # CONFIG_MEDIA_TUNER_QM1D1C0042 is not set # # Customise DVB Frontends # # # Tools to develop new frontends # # # Graphics support # # CONFIG_AGP is not set CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=16 # CONFIG_VGA_SWITCHEROO is not set # CONFIG_DRM is not set # # ACP (Audio CoProcessor) Configuration # # # AMD Library routines # # # Frame buffer Devices # # CONFIG_FB is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_BACKLIGHT_GENERIC=y CONFIG_BACKLIGHT_LM3533=y # CONFIG_BACKLIGHT_APPLE is not set CONFIG_BACKLIGHT_PM8941_WLED=y CONFIG_BACKLIGHT_SAHARA=y CONFIG_BACKLIGHT_WM831X=y CONFIG_BACKLIGHT_ADP8860=y # CONFIG_BACKLIGHT_ADP8870 is not set CONFIG_BACKLIGHT_88PM860X=y # CONFIG_BACKLIGHT_LM3639 is not set CONFIG_BACKLIGHT_PANDORA=y CONFIG_BACKLIGHT_SKY81452=y CONFIG_BACKLIGHT_AS3711=y # CONFIG_BACKLIGHT_GPIO is not set # CONFIG_BACKLIGHT_LV5207LP is not set # CONFIG_BACKLIGHT_BD6107 is not set CONFIG_BACKLIGHT_ARCXCNN=y CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y CONFIG_SND_DMAENGINE_PCM=y CONFIG_SND_SEQ_DEVICE=y CONFIG_SND_RAWMIDI=y CONFIG_SND_JACK=y CONFIG_SND_JACK_INPUT_DEV=y # CONFIG_SND_OSSEMUL is not set # CONFIG_SND_PCM_TIMER is not set CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y CONFIG_SND_MAX_CARDS=32 # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_PROC_FS is not set CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_DEBUG_VERBOSE=y CONFIG_SND_DMA_SGBUF=y CONFIG_SND_SEQUENCER=y CONFIG_SND_SEQ_DUMMY=y # CONFIG_SND_SEQ_HRTIMER_DEFAULT is not set CONFIG_SND_SEQ_MIDI_EVENT=y CONFIG_SND_SEQ_MIDI=y CONFIG_SND_SEQ_VIRMIDI=y CONFIG_SND_DRIVERS=y CONFIG_SND_DUMMY=y CONFIG_SND_ALOOP=y CONFIG_SND_VIRMIDI=y CONFIG_SND_MTPAV=y # CONFIG_SND_MTS64 is not set CONFIG_SND_SERIAL_U16550=y # CONFIG_SND_MPU401 is not set # CONFIG_SND_PORTMAN2X4 is not set CONFIG_SND_PCI=y # CONFIG_SND_AD1889 is not set # CONFIG_SND_ALS300 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ASIHPI is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set # CONFIG_SND_AW2 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set # CONFIG_SND_CA0106 is not set # CONFIG_SND_CMIPCI is not set # CONFIG_SND_OXYGEN is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set # CONFIG_SND_CTXFI is not set # CONFIG_SND_DARLA20 is not set # CONFIG_SND_GINA20 is not set # CONFIG_SND_LAYLA20 is not set # CONFIG_SND_DARLA24 is not set # CONFIG_SND_GINA24 is not set # CONFIG_SND_LAYLA24 is not set # CONFIG_SND_MONA is not set # CONFIG_SND_MIA is not set # CONFIG_SND_ECHO3G is not set # CONFIG_SND_INDIGO is not set # CONFIG_SND_INDIGOIO is not set # CONFIG_SND_INDIGODJ is not set # CONFIG_SND_INDIGOIOX is not set # CONFIG_SND_INDIGODJX is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set # CONFIG_SND_ENS1371 is not set # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_FM801 is not set # CONFIG_SND_HDSP is not set # CONFIG_SND_HDSPM is not set # CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1724 is not set # CONFIG_SND_INTEL8X0 is not set # CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_KORG1212 is not set # CONFIG_SND_LOLA is not set # CONFIG_SND_LX6464ES is not set # CONFIG_SND_MAESTRO3 is not set # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set # CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set # CONFIG_SND_SE6X is not set # CONFIG_SND_SONICVIBES is not set # CONFIG_SND_TRIDENT is not set # CONFIG_SND_VIA82XX is not set # CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VIRTUOSO is not set # CONFIG_SND_VX222 is not set # CONFIG_SND_YMFPCI is not set # # HD-Audio # # CONFIG_SND_HDA_INTEL is not set CONFIG_SND_HDA_PREALLOC_SIZE=64 CONFIG_SND_SPI=y # CONFIG_SND_USB is not set # CONFIG_SND_PCMCIA is not set CONFIG_SND_SOC=y CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y CONFIG_SND_SOC_AMD_ACP=y # CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH is not set CONFIG_SND_SOC_AMD_CZ_RT5645_MACH=y CONFIG_SND_ATMEL_SOC=y # CONFIG_SND_DESIGNWARE_I2S is not set # # SoC Audio for Freescale CPUs # # # Common SoC Audio options for Freescale CPUs: # CONFIG_SND_SOC_FSL_ASRC=y # CONFIG_SND_SOC_FSL_SAI is not set # CONFIG_SND_SOC_FSL_SSI is not set CONFIG_SND_SOC_FSL_SPDIF=y # CONFIG_SND_SOC_FSL_ESAI is not set CONFIG_SND_SOC_IMX_AUDMUX=y CONFIG_SND_I2S_HI6210_I2S=y CONFIG_SND_SOC_IMG=y CONFIG_SND_SOC_IMG_I2S_IN=y CONFIG_SND_SOC_IMG_I2S_OUT=y # CONFIG_SND_SOC_IMG_PARALLEL_OUT is not set CONFIG_SND_SOC_IMG_SPDIF_IN=y # CONFIG_SND_SOC_IMG_SPDIF_OUT is not set CONFIG_SND_SOC_IMG_PISTACHIO_INTERNAL_DAC=y CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y # CONFIG_SND_SOC_INTEL_HASWELL is not set # CONFIG_SND_SOC_INTEL_BAYTRAIL is not set # CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI is not set # CONFIG_SND_SST_ATOM_HIFI2_PLATFORM is not set # CONFIG_SND_SOC_INTEL_SKYLAKE is not set CONFIG_SND_SOC_INTEL_MACH=y # # STMicroelectronics STM32 SOC audio support # CONFIG_SND_SOC_XTFPGA_I2S=y # CONFIG_ZX_TDM is not set CONFIG_SND_SOC_I2C_AND_SPI=y # # CODEC drivers # # CONFIG_SND_SOC_AC97_CODEC is not set CONFIG_SND_SOC_ADAU_UTILS=y CONFIG_SND_SOC_ADAU1701=y CONFIG_SND_SOC_ADAU17X1=y CONFIG_SND_SOC_ADAU1761=y CONFIG_SND_SOC_ADAU1761_I2C=y # CONFIG_SND_SOC_ADAU1761_SPI is not set # CONFIG_SND_SOC_ADAU7002 is not set CONFIG_SND_SOC_AK4104=y # CONFIG_SND_SOC_AK4458 is not set CONFIG_SND_SOC_AK4554=y CONFIG_SND_SOC_AK4613=y CONFIG_SND_SOC_AK4642=y CONFIG_SND_SOC_AK5386=y # CONFIG_SND_SOC_AK5558 is not set CONFIG_SND_SOC_ALC5623=y # CONFIG_SND_SOC_BD28623 is not set CONFIG_SND_SOC_BT_SCO=y CONFIG_SND_SOC_CS35L32=y # CONFIG_SND_SOC_CS35L33 is not set # CONFIG_SND_SOC_CS35L34 is not set CONFIG_SND_SOC_CS35L35=y CONFIG_SND_SOC_CS42L42=y CONFIG_SND_SOC_CS42L51=y CONFIG_SND_SOC_CS42L51_I2C=y # CONFIG_SND_SOC_CS42L52 is not set CONFIG_SND_SOC_CS42L56=y CONFIG_SND_SOC_CS42L73=y CONFIG_SND_SOC_CS4265=y # CONFIG_SND_SOC_CS4270 is not set # CONFIG_SND_SOC_CS4271_I2C is not set # CONFIG_SND_SOC_CS4271_SPI is not set # CONFIG_SND_SOC_CS42XX8_I2C is not set CONFIG_SND_SOC_CS43130=y CONFIG_SND_SOC_CS4349=y CONFIG_SND_SOC_CS53L30=y CONFIG_SND_SOC_DIO2125=y CONFIG_SND_SOC_ES7134=y # CONFIG_SND_SOC_ES8316 is not set CONFIG_SND_SOC_ES8328=y # CONFIG_SND_SOC_ES8328_I2C is not set CONFIG_SND_SOC_ES8328_SPI=y # CONFIG_SND_SOC_GTM601 is not set CONFIG_SND_SOC_INNO_RK3036=y CONFIG_SND_SOC_MAX98504=y # CONFIG_SND_SOC_MAX9867 is not set CONFIG_SND_SOC_MAX98927=y # CONFIG_SND_SOC_MAX98373 is not set CONFIG_SND_SOC_MAX9860=y # CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set # CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set # CONFIG_SND_SOC_PCM1681 is not set # CONFIG_SND_SOC_PCM1789_I2C is not set CONFIG_SND_SOC_PCM179X=y CONFIG_SND_SOC_PCM179X_I2C=y CONFIG_SND_SOC_PCM179X_SPI=y CONFIG_SND_SOC_PCM186X=y CONFIG_SND_SOC_PCM186X_I2C=y CONFIG_SND_SOC_PCM186X_SPI=y CONFIG_SND_SOC_PCM3168A=y # CONFIG_SND_SOC_PCM3168A_I2C is not set CONFIG_SND_SOC_PCM3168A_SPI=y # CONFIG_SND_SOC_PCM512x_I2C is not set # CONFIG_SND_SOC_PCM512x_SPI is not set CONFIG_SND_SOC_RL6231=y # CONFIG_SND_SOC_RT5616 is not set CONFIG_SND_SOC_RT5631=y CONFIG_SND_SOC_RT5645=y CONFIG_SND_SOC_SGTL5000=y CONFIG_SND_SOC_SIGMADSP=y CONFIG_SND_SOC_SIGMADSP_I2C=y CONFIG_SND_SOC_SIGMADSP_REGMAP=y CONFIG_SND_SOC_SIRF_AUDIO_CODEC=y # CONFIG_SND_SOC_SPDIF is not set # CONFIG_SND_SOC_SSM2602_SPI is not set # CONFIG_SND_SOC_SSM2602_I2C is not set CONFIG_SND_SOC_SSM4567=y CONFIG_SND_SOC_STA32X=y # CONFIG_SND_SOC_STA350 is not set CONFIG_SND_SOC_STI_SAS=y # CONFIG_SND_SOC_TAS2552 is not set # CONFIG_SND_SOC_TAS5086 is not set # CONFIG_SND_SOC_TAS571X is not set CONFIG_SND_SOC_TAS5720=y # CONFIG_SND_SOC_TAS6424 is not set # CONFIG_SND_SOC_TDA7419 is not set CONFIG_SND_SOC_TFA9879=y CONFIG_SND_SOC_TLV320AIC23=y CONFIG_SND_SOC_TLV320AIC23_I2C=y # CONFIG_SND_SOC_TLV320AIC23_SPI is not set # CONFIG_SND_SOC_TLV320AIC31XX is not set CONFIG_SND_SOC_TLV320AIC32X4=y CONFIG_SND_SOC_TLV320AIC32X4_I2C=y CONFIG_SND_SOC_TLV320AIC32X4_SPI=y CONFIG_SND_SOC_TLV320AIC3X=y # CONFIG_SND_SOC_TS3A227E is not set CONFIG_SND_SOC_TSCS42XX=y CONFIG_SND_SOC_WM8510=y # CONFIG_SND_SOC_WM8523 is not set # CONFIG_SND_SOC_WM8524 is not set # CONFIG_SND_SOC_WM8580 is not set CONFIG_SND_SOC_WM8711=y # CONFIG_SND_SOC_WM8728 is not set CONFIG_SND_SOC_WM8731=y CONFIG_SND_SOC_WM8737=y CONFIG_SND_SOC_WM8741=y CONFIG_SND_SOC_WM8750=y CONFIG_SND_SOC_WM8753=y # CONFIG_SND_SOC_WM8770 is not set # CONFIG_SND_SOC_WM8776 is not set CONFIG_SND_SOC_WM8804=y # CONFIG_SND_SOC_WM8804_I2C is not set CONFIG_SND_SOC_WM8804_SPI=y # CONFIG_SND_SOC_WM8903 is not set # CONFIG_SND_SOC_WM8960 is not set CONFIG_SND_SOC_WM8962=y # CONFIG_SND_SOC_WM8974 is not set # CONFIG_SND_SOC_WM8978 is not set CONFIG_SND_SOC_WM8985=y CONFIG_SND_SOC_ZX_AUD96P22=y # CONFIG_SND_SOC_MAX9759 is not set # CONFIG_SND_SOC_NAU8540 is not set CONFIG_SND_SOC_NAU8810=y CONFIG_SND_SOC_NAU8824=y CONFIG_SND_SOC_TPA6130A2=y # CONFIG_SND_SIMPLE_CARD is not set # CONFIG_SND_X86 is not set # # HID support # CONFIG_HID=y # CONFIG_HID_BATTERY_STRENGTH is not set # CONFIG_HIDRAW is not set # CONFIG_UHID is not set # CONFIG_HID_GENERIC is not set # # Special HID drivers # CONFIG_HID_A4TECH=y # CONFIG_HID_ACRUX is not set CONFIG_HID_APPLE=y CONFIG_HID_ASUS=y CONFIG_HID_AUREAL=y CONFIG_HID_BELKIN=y # CONFIG_HID_CHERRY is not set CONFIG_HID_CHICONY=y CONFIG_HID_CORSAIR=y # CONFIG_HID_PRODIKEYS is not set CONFIG_HID_CMEDIA=y CONFIG_HID_CYPRESS=y CONFIG_HID_DRAGONRISE=y # CONFIG_DRAGONRISE_FF is not set # CONFIG_HID_EMS_FF is not set # CONFIG_HID_ELECOM is not set # CONFIG_HID_EZKEY is not set CONFIG_HID_GEMBIRD=y CONFIG_HID_GFRM=y # CONFIG_HID_KEYTOUCH is not set CONFIG_HID_KYE=y CONFIG_HID_WALTOP=y CONFIG_HID_GYRATION=y CONFIG_HID_ICADE=y # CONFIG_HID_ITE is not set # CONFIG_HID_JABRA is not set # CONFIG_HID_TWINHAN is not set CONFIG_HID_KENSINGTON=y CONFIG_HID_LCPOWER=y CONFIG_HID_LED=y CONFIG_HID_LENOVO=y CONFIG_HID_LOGITECH=y CONFIG_HID_LOGITECH_HIDPP=y # CONFIG_LOGITECH_FF is not set CONFIG_LOGIRUMBLEPAD2_FF=y # CONFIG_LOGIG940_FF is not set # CONFIG_LOGIWHEELS_FF is not set CONFIG_HID_MAGICMOUSE=y CONFIG_HID_MAYFLASH=y CONFIG_HID_MICROSOFT=y CONFIG_HID_MONTEREY=y # CONFIG_HID_MULTITOUCH is not set CONFIG_HID_NTI=y CONFIG_HID_ORTEK=y # CONFIG_HID_PANTHERLORD is not set CONFIG_HID_PETALYNX=y CONFIG_HID_PICOLCD=y # CONFIG_HID_PICOLCD_BACKLIGHT is not set CONFIG_HID_PICOLCD_LEDS=y # CONFIG_HID_PICOLCD_CIR is not set # CONFIG_HID_PLANTRONICS is not set CONFIG_HID_PRIMAX=y CONFIG_HID_SAITEK=y CONFIG_HID_SAMSUNG=y CONFIG_HID_SPEEDLINK=y CONFIG_HID_STEELSERIES=y CONFIG_HID_SUNPLUS=y # CONFIG_HID_RMI is not set CONFIG_HID_GREENASIA=y # CONFIG_GREENASIA_FF is not set CONFIG_HID_SMARTJOYPLUS=y # CONFIG_SMARTJOYPLUS_FF is not set CONFIG_HID_TIVO=y CONFIG_HID_TOPSEED=y CONFIG_HID_THINGM=y # CONFIG_HID_THRUSTMASTER is not set CONFIG_HID_UDRAW_PS3=y # CONFIG_HID_WIIMOTE is not set CONFIG_HID_XINMO=y CONFIG_HID_ZEROPLUS=y CONFIG_ZEROPLUS_FF=y CONFIG_HID_ZYDACRON=y CONFIG_HID_SENSOR_HUB=y # CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set CONFIG_HID_ALPS=y # # USB HID support # # CONFIG_USB_HID is not set # CONFIG_HID_PID is not set # # USB HID Boot Protocol drivers # # CONFIG_USB_KBD is not set # CONFIG_USB_MOUSE is not set # # I2C HID support # CONFIG_I2C_HID=y # # Intel ISH HID support # # CONFIG_INTEL_ISH_HID is not set CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y CONFIG_USB_PCI=y # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set # # Miscellaneous USB options # # CONFIG_USB_DEFAULT_PERSIST is not set CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_OTG=y # CONFIG_USB_OTG_WHITELIST is not set CONFIG_USB_OTG_BLACKLIST_HUB=y CONFIG_USB_OTG_FSM=y # CONFIG_USB_MON is not set CONFIG_USB_WUSB_CBAF=y CONFIG_USB_WUSB_CBAF_DEBUG=y # # USB Host Controller Drivers # CONFIG_USB_C67X00_HCD=y CONFIG_USB_XHCI_HCD=y # CONFIG_USB_XHCI_DBGCAP is not set CONFIG_USB_XHCI_PCI=y CONFIG_USB_XHCI_PLATFORM=y # CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_FOTG210_HCD is not set CONFIG_USB_MAX3421_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PCI=y CONFIG_USB_OHCI_HCD_PLATFORM=y # CONFIG_USB_UHCI_HCD is not set CONFIG_USB_SL811_HCD=y # CONFIG_USB_SL811_HCD_ISO is not set # CONFIG_USB_SL811_CS is not set # CONFIG_USB_R8A66597_HCD is not set CONFIG_USB_HCD_BCMA=y CONFIG_USB_HCD_TEST_MODE=y # # USB Device Class drivers # # CONFIG_USB_ACM is not set CONFIG_USB_PRINTER=y # CONFIG_USB_WDM is not set CONFIG_USB_TMC=y # # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may # # # also be needed; see USB_STORAGE Help for more info # # # USB Imaging devices # CONFIG_USB_MDC800=y CONFIG_USBIP_CORE=y CONFIG_USBIP_VHCI_HCD=y CONFIG_USBIP_VHCI_HC_PORTS=8 CONFIG_USBIP_VHCI_NR_HCS=1 CONFIG_USBIP_HOST=y CONFIG_USBIP_VUDC=y CONFIG_USBIP_DEBUG=y CONFIG_USB_MUSB_HDRC=y CONFIG_USB_MUSB_HOST=y # CONFIG_USB_MUSB_GADGET is not set # CONFIG_USB_MUSB_DUAL_ROLE is not set # # Platform Glue Layer # # # MUSB DMA mode # CONFIG_MUSB_PIO_ONLY=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_ULPI=y CONFIG_USB_DWC3_HOST=y # CONFIG_USB_DWC3_GADGET is not set # CONFIG_USB_DWC3_DUAL_ROLE is not set # # Platform Glue Driver Support # CONFIG_USB_DWC3_PCI=y CONFIG_USB_DWC2=y # CONFIG_USB_DWC2_HOST is not set # # Gadget/Dual-role mode requires USB Gadget support to be enabled # CONFIG_USB_DWC2_PERIPHERAL=y # CONFIG_USB_DWC2_DUAL_ROLE is not set # CONFIG_USB_DWC2_PCI is not set CONFIG_USB_DWC2_DEBUG=y # CONFIG_USB_DWC2_VERBOSE is not set CONFIG_USB_DWC2_TRACK_MISSED_SOFS=y # CONFIG_USB_DWC2_DEBUG_PERIODIC is not set CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_PCI=y # CONFIG_USB_CHIPIDEA_UDC is not set CONFIG_USB_CHIPIDEA_ULPI=y # CONFIG_USB_ISP1760 is not set # # USB port drivers # # CONFIG_USB_USS720 is not set # CONFIG_USB_SERIAL is not set # # USB Miscellaneous drivers # CONFIG_USB_EMI62=y CONFIG_USB_EMI26=y CONFIG_USB_ADUTUX=y CONFIG_USB_SEVSEG=y CONFIG_USB_RIO500=y CONFIG_USB_LEGOTOWER=y CONFIG_USB_LCD=y CONFIG_USB_CYPRESS_CY7C63=y CONFIG_USB_CYTHERM=y CONFIG_USB_IDMOUSE=y # CONFIG_USB_FTDI_ELAN is not set CONFIG_USB_APPLEDISPLAY=y # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TRANCEVIBRATOR is not set # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set CONFIG_USB_EHSET_TEST_FIXTURE=y # CONFIG_USB_ISIGHTFW is not set CONFIG_USB_YUREX=y # CONFIG_USB_EZUSB_FX2 is not set CONFIG_USB_HUB_USB251XB=y # CONFIG_USB_HSIC_USB3503 is not set CONFIG_USB_HSIC_USB4604=y # CONFIG_USB_LINK_LAYER_TEST is not set # CONFIG_USB_CHAOSKEY is not set # # USB Physical Layer drivers # CONFIG_USB_PHY=y CONFIG_NOP_USB_XCEIV=y CONFIG_USB_GPIO_VBUS=y # CONFIG_TAHVO_USB is not set CONFIG_USB_ISP1301=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG=y # CONFIG_USB_GADGET_VERBOSE is not set CONFIG_USB_GADGET_DEBUG_FILES=y # CONFIG_USB_GADGET_DEBUG_FS is not set CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 # # USB Peripheral Controller # CONFIG_USB_FOTG210_UDC=y # CONFIG_USB_GR_UDC is not set CONFIG_USB_R8A66597=y CONFIG_USB_PXA27X=y CONFIG_USB_MV_UDC=y CONFIG_USB_MV_U3D=y # CONFIG_USB_M66592 is not set CONFIG_USB_BDC_UDC=y # # Platform Support # CONFIG_USB_BDC_PCI=y # CONFIG_USB_AMD5536UDC is not set CONFIG_USB_NET2272=y # CONFIG_USB_NET2272_DMA is not set # CONFIG_USB_NET2280 is not set # CONFIG_USB_GOKU is not set # CONFIG_USB_EG20T is not set # CONFIG_USB_DUMMY_HCD is not set # CONFIG_USB_CONFIGFS is not set CONFIG_TYPEC=y # CONFIG_TYPEC_TCPM is not set # CONFIG_TYPEC_UCSI is not set CONFIG_TYPEC_TPS6598X=y # # USB Type-C Multiplexer/DeMultiplexer Switch support # # CONFIG_TYPEC_MUX_PI3USB30532 is not set CONFIG_USB_ULPI_BUS=y # CONFIG_UWB is not set CONFIG_MMC=y # CONFIG_SDIO_UART is not set # CONFIG_MMC_TEST is not set # # MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_DEBUG is not set CONFIG_MMC_SDHCI=y # CONFIG_MMC_SDHCI_PCI is not set # CONFIG_MMC_SDHCI_ACPI is not set # CONFIG_MMC_SDHCI_PLTFM is not set # CONFIG_MMC_TIFM_SD is not set CONFIG_MMC_GOLDFISH=y CONFIG_MMC_SPI=y # CONFIG_MMC_SDRICOH_CS is not set # CONFIG_MMC_CB710 is not set # CONFIG_MMC_VIA_SDMMC is not set CONFIG_MMC_VUB300=y # CONFIG_MMC_USHC is not set # CONFIG_MMC_USDHI6ROL0 is not set # CONFIG_MMC_CQHCI is not set # CONFIG_MMC_TOSHIBA_PCI is not set CONFIG_MMC_MTK=y CONFIG_MEMSTICK=y CONFIG_MEMSTICK_DEBUG=y # # MemoryStick drivers # # CONFIG_MEMSTICK_UNSAFE_RESUME is not set # # MemoryStick Host Controller Drivers # # CONFIG_MEMSTICK_TIFM_MS is not set # CONFIG_MEMSTICK_JMICRON_38X is not set # CONFIG_MEMSTICK_R592 is not set CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y # CONFIG_LEDS_CLASS_FLASH is not set # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # # LED drivers # # CONFIG_LEDS_88PM860X is not set # CONFIG_LEDS_LM3530 is not set CONFIG_LEDS_LM3533=y # CONFIG_LEDS_LM3642 is not set # CONFIG_LEDS_PCA9532 is not set # CONFIG_LEDS_GPIO is not set CONFIG_LEDS_LP3944=y CONFIG_LEDS_LP3952=y CONFIG_LEDS_LP55XX_COMMON=y # CONFIG_LEDS_LP5521 is not set CONFIG_LEDS_LP5523=y CONFIG_LEDS_LP5562=y # CONFIG_LEDS_LP8501 is not set # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_PCA963X is not set CONFIG_LEDS_WM831X_STATUS=y # CONFIG_LEDS_WM8350 is not set CONFIG_LEDS_DAC124S085=y # CONFIG_LEDS_REGULATOR is not set # CONFIG_LEDS_BD2802 is not set # CONFIG_LEDS_LT3593 is not set # CONFIG_LEDS_MC13783 is not set # CONFIG_LEDS_TCA6507 is not set CONFIG_LEDS_TLC591XX=y CONFIG_LEDS_LM355x=y CONFIG_LEDS_MENF21BMC=y # # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # CONFIG_LEDS_BLINKM=y # CONFIG_LEDS_MLXREG is not set CONFIG_LEDS_USER=y # CONFIG_LEDS_NIC78BX is not set # # LED Triggers # # CONFIG_LEDS_TRIGGERS is not set # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EDAC=y # CONFIG_EDAC_LEGACY_SYSFS is not set # CONFIG_EDAC_DEBUG is not set CONFIG_EDAC_DECODE_MCE=y # CONFIG_EDAC_AMD64 is not set # CONFIG_EDAC_E752X is not set # CONFIG_EDAC_I82975X is not set # CONFIG_EDAC_I3000 is not set # CONFIG_EDAC_I3200 is not set # CONFIG_EDAC_IE31200 is not set # CONFIG_EDAC_X38 is not set # CONFIG_EDAC_I5400 is not set # CONFIG_EDAC_I5000 is not set # CONFIG_EDAC_I5100 is not set # CONFIG_EDAC_I7300 is not set CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y CONFIG_RTC_CLASS=y # CONFIG_RTC_HCTOSYS is not set # CONFIG_RTC_SYSTOHC is not set # CONFIG_RTC_DEBUG is not set # CONFIG_RTC_NVMEM is not set # # RTC interfaces # # CONFIG_RTC_INTF_SYSFS is not set CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y CONFIG_RTC_INTF_DEV_UIE_EMUL=y # CONFIG_RTC_DRV_TEST is not set # # I2C RTC drivers # CONFIG_RTC_DRV_88PM860X=y CONFIG_RTC_DRV_ABB5ZES3=y CONFIG_RTC_DRV_ABX80X=y CONFIG_RTC_DRV_DS1307=y # CONFIG_RTC_DRV_DS1307_HWMON is not set # CONFIG_RTC_DRV_DS1307_CENTURY is not set CONFIG_RTC_DRV_DS1374=y CONFIG_RTC_DRV_DS1374_WDT=y # CONFIG_RTC_DRV_DS1672 is not set CONFIG_RTC_DRV_MAX6900=y CONFIG_RTC_DRV_MAX8907=y CONFIG_RTC_DRV_MAX8998=y # CONFIG_RTC_DRV_RS5C372 is not set # CONFIG_RTC_DRV_ISL1208 is not set CONFIG_RTC_DRV_ISL12022=y CONFIG_RTC_DRV_X1205=y # CONFIG_RTC_DRV_PCF8523 is not set CONFIG_RTC_DRV_PCF85063=y CONFIG_RTC_DRV_PCF85363=y # CONFIG_RTC_DRV_PCF8563 is not set CONFIG_RTC_DRV_PCF8583=y # CONFIG_RTC_DRV_M41T80 is not set CONFIG_RTC_DRV_BQ32K=y CONFIG_RTC_DRV_S35390A=y CONFIG_RTC_DRV_FM3130=y CONFIG_RTC_DRV_RX8010=y CONFIG_RTC_DRV_RX8581=y # CONFIG_RTC_DRV_RX8025 is not set CONFIG_RTC_DRV_EM3027=y CONFIG_RTC_DRV_RV8803=y CONFIG_RTC_DRV_S5M=y # # SPI RTC drivers # CONFIG_RTC_DRV_M41T93=y CONFIG_RTC_DRV_M41T94=y # CONFIG_RTC_DRV_DS1302 is not set CONFIG_RTC_DRV_DS1305=y # CONFIG_RTC_DRV_DS1343 is not set CONFIG_RTC_DRV_DS1347=y CONFIG_RTC_DRV_DS1390=y CONFIG_RTC_DRV_MAX6916=y CONFIG_RTC_DRV_R9701=y # CONFIG_RTC_DRV_RX4581 is not set CONFIG_RTC_DRV_RX6110=y # CONFIG_RTC_DRV_RS5C348 is not set CONFIG_RTC_DRV_MAX6902=y # CONFIG_RTC_DRV_PCF2123 is not set # CONFIG_RTC_DRV_MCP795 is not set CONFIG_RTC_I2C_AND_SPI=y # # SPI and I2C RTC drivers # CONFIG_RTC_DRV_DS3232=y # CONFIG_RTC_DRV_DS3232_HWMON is not set CONFIG_RTC_DRV_PCF2127=y CONFIG_RTC_DRV_RV3029C2=y # CONFIG_RTC_DRV_RV3029_HWMON is not set # # Platform RTC drivers # CONFIG_RTC_DRV_CMOS=y # CONFIG_RTC_DRV_DS1286 is not set CONFIG_RTC_DRV_DS1511=y CONFIG_RTC_DRV_DS1553=y # CONFIG_RTC_DRV_DS1685_FAMILY is not set CONFIG_RTC_DRV_DS1742=y # CONFIG_RTC_DRV_DS2404 is not set CONFIG_RTC_DRV_DA9063=y CONFIG_RTC_DRV_STK17TA8=y CONFIG_RTC_DRV_M48T86=y CONFIG_RTC_DRV_M48T35=y CONFIG_RTC_DRV_M48T59=y CONFIG_RTC_DRV_MSM6242=y CONFIG_RTC_DRV_BQ4802=y CONFIG_RTC_DRV_RP5C01=y CONFIG_RTC_DRV_V3020=y # CONFIG_RTC_DRV_WM831X is not set # CONFIG_RTC_DRV_WM8350 is not set # CONFIG_RTC_DRV_CROS_EC is not set # # on-CPU RTC drivers # CONFIG_RTC_DRV_FTRTC010=y CONFIG_RTC_DRV_MC13XXX=y # # HID Sensor RTC drivers # CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set # # DMA Devices # CONFIG_DMA_ENGINE=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_ACPI=y CONFIG_ALTERA_MSGDMA=y # CONFIG_INTEL_IDMA64 is not set # CONFIG_INTEL_IOATDMA is not set CONFIG_QCOM_HIDMA_MGMT=y # CONFIG_QCOM_HIDMA is not set CONFIG_DW_DMAC_CORE=y CONFIG_DW_DMAC=y # CONFIG_DW_DMAC_PCI is not set CONFIG_HSU_DMA=y # # DMA Clients # CONFIG_ASYNC_TX_DMA=y # CONFIG_DMATEST is not set # # DMABUF options # # CONFIG_SYNC_FILE is not set # CONFIG_AUXDISPLAY is not set CONFIG_CHARLCD=y CONFIG_PANEL=y CONFIG_PANEL_PARPORT=0 CONFIG_PANEL_PROFILE=5 CONFIG_PANEL_CHANGE_MESSAGE=y CONFIG_PANEL_BOOT_MESSAGE="" # CONFIG_UIO is not set # CONFIG_VIRT_DRIVERS is not set CONFIG_VIRTIO=y # CONFIG_VIRTIO_MENU is not set # # Microsoft Hyper-V guest support # # CONFIG_HYPERV is not set # # Xen driver support # CONFIG_XEN_BALLOON=y # CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not set CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DEV_EVTCHN=y CONFIG_XENFS=y CONFIG_XEN_COMPAT_XENFS=y # CONFIG_XEN_SYS_HYPERVISOR is not set CONFIG_XEN_XENBUS_FRONTEND=y # CONFIG_XEN_GNTDEV is not set CONFIG_XEN_GRANT_DEV_ALLOC=y CONFIG_SWIOTLB_XEN=y CONFIG_XEN_TMEM=y # CONFIG_XEN_PVCALLS_FRONTEND is not set CONFIG_XEN_PRIVCMD=y CONFIG_XEN_AUTO_XLATE=y CONFIG_XEN_ACPI=y CONFIG_STAGING=y CONFIG_IPX=y CONFIG_IPX_INTERN=y CONFIG_NCP_FS=y # CONFIG_NCPFS_PACKET_SIGNING is not set CONFIG_NCPFS_IOCTL_LOCKING=y # CONFIG_NCPFS_STRONG is not set CONFIG_NCPFS_NFS_NS=y CONFIG_NCPFS_OS2_NS=y # CONFIG_NCPFS_SMALLDOS is not set CONFIG_NCPFS_NLS=y CONFIG_NCPFS_EXTRAS=y CONFIG_COMEDI=y # CONFIG_COMEDI_DEBUG is not set CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048 CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480 CONFIG_COMEDI_MISC_DRIVERS=y CONFIG_COMEDI_BOND=y CONFIG_COMEDI_TEST=y CONFIG_COMEDI_PARPORT=y # CONFIG_COMEDI_SERIAL2002 is not set # CONFIG_COMEDI_ISA_DRIVERS is not set # CONFIG_COMEDI_PCI_DRIVERS is not set # CONFIG_COMEDI_PCMCIA_DRIVERS is not set # CONFIG_COMEDI_USB_DRIVERS is not set CONFIG_COMEDI_8255=y CONFIG_COMEDI_8255_SA=y CONFIG_COMEDI_KCOMEDILIB=y # # IIO staging drivers # # # Accelerometers # CONFIG_ADIS16201=y CONFIG_ADIS16203=y CONFIG_ADIS16209=y CONFIG_ADIS16240=y # # Analog to digital converters # # CONFIG_AD7606 is not set # CONFIG_AD7780 is not set CONFIG_AD7816=y CONFIG_AD7192=y CONFIG_AD7280=y # # Analog digital bi-direction converters # CONFIG_ADT7316=y # CONFIG_ADT7316_SPI is not set CONFIG_ADT7316_I2C=y # # Capacitance to digital converters # CONFIG_AD7150=y # CONFIG_AD7152 is not set CONFIG_AD7746=y # # Direct Digital Synthesis # # CONFIG_AD9832 is not set # CONFIG_AD9834 is not set # # Digital gyroscope sensors # # CONFIG_ADIS16060 is not set # # Network Analyzer, Impedance Converters # CONFIG_AD5933=y # # Light sensors # CONFIG_TSL2x7x=y # # Active energy metering IC # CONFIG_ADE7753=y # CONFIG_ADE7754 is not set CONFIG_ADE7758=y CONFIG_ADE7759=y CONFIG_ADE7854=y CONFIG_ADE7854_I2C=y CONFIG_ADE7854_SPI=y # # Resolver to digital converters # CONFIG_AD2S90=y # CONFIG_AD2S1200 is not set CONFIG_AD2S1210=y # # Speakup console speech # # CONFIG_STAGING_MEDIA is not set # # Android # # CONFIG_GOLDFISH_AUDIO is not set CONFIG_MTD_GOLDFISH_NAND=y CONFIG_MTD_SPINAND_MT29F=y # CONFIG_MTD_SPINAND_ONDIEECC is not set CONFIG_LNET=y CONFIG_LNET_MAX_PAYLOAD=1048576 CONFIG_LNET_SELFTEST=y # CONFIG_LUSTRE_FS is not set # CONFIG_DGNC is not set # CONFIG_GS_FPGABOOT is not set CONFIG_CRYPTO_SKEIN=y CONFIG_UNISYSSPAR=y CONFIG_WILC1000=y CONFIG_WILC1000_SDIO=y # CONFIG_WILC1000_SPI is not set CONFIG_WILC1000_HW_OOB_INTR=y # CONFIG_MOST is not set # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set # # USB Power Delivery and Type-C drivers # CONFIG_PI433=y # CONFIG_MTK_MMC is not set # CONFIG_X86_PLATFORM_DEVICES is not set CONFIG_PMC_ATOM=y CONFIG_GOLDFISH_BUS=y CONFIG_GOLDFISH_PIPE=y CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_PSTORE=y CONFIG_CROS_EC_CTL=y # CONFIG_CROS_EC_LPC is not set CONFIG_CROS_EC_PROTO=y # CONFIG_CROS_KBD_LED_BACKLIGHT is not set # CONFIG_MELLANOX_PLATFORM is not set CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y # # Common Clock Framework # # CONFIG_COMMON_CLK_WM831X is not set # CONFIG_COMMON_CLK_SI5351 is not set # CONFIG_COMMON_CLK_SI544 is not set # CONFIG_COMMON_CLK_CDCE706 is not set # CONFIG_COMMON_CLK_CS2000_CP is not set # CONFIG_COMMON_CLK_S2MPS11 is not set # CONFIG_HWSPINLOCK is not set # # Clock Source drivers # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y # CONFIG_MAILBOX is not set CONFIG_IOMMU_SUPPORT=y # # Generic IOMMU Pagetable Support # # CONFIG_AMD_IOMMU is not set # # Remoteproc drivers # CONFIG_REMOTEPROC=y # # Rpmsg drivers # CONFIG_RPMSG=y CONFIG_RPMSG_CHAR=y CONFIG_RPMSG_VIRTIO=y CONFIG_SOUNDWIRE=y # # SoundWire Devices # # CONFIG_SOUNDWIRE_INTEL is not set # # SOC (System On Chip) specific Drivers # # # Amlogic SoC drivers # # # Broadcom SoC drivers # # # i.MX SoC drivers # # # Qualcomm SoC drivers # # CONFIG_SOC_TI is not set # # Xilinx SoC drivers # CONFIG_XILINX_VCU=y # CONFIG_PM_DEVFREQ is not set CONFIG_EXTCON=y # # Extcon Device Drivers # CONFIG_EXTCON_ADC_JACK=y CONFIG_EXTCON_ARIZONA=y # CONFIG_EXTCON_GPIO is not set # CONFIG_EXTCON_INTEL_INT3496 is not set CONFIG_EXTCON_MAX3355=y CONFIG_EXTCON_MAX77693=y CONFIG_EXTCON_RT8973A=y # CONFIG_EXTCON_SM5502 is not set CONFIG_EXTCON_USB_GPIO=y # CONFIG_EXTCON_USBC_CROS_EC is not set # CONFIG_MEMORY is not set CONFIG_IIO=y CONFIG_IIO_BUFFER=y CONFIG_IIO_BUFFER_CB=y CONFIG_IIO_BUFFER_HW_CONSUMER=y CONFIG_IIO_KFIFO_BUF=y CONFIG_IIO_TRIGGERED_BUFFER=y CONFIG_IIO_CONFIGFS=y CONFIG_IIO_TRIGGER=y CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 CONFIG_IIO_SW_DEVICE=y # CONFIG_IIO_SW_TRIGGER is not set CONFIG_IIO_TRIGGERED_EVENT=y # # Accelerometers # # CONFIG_ADXL345_I2C is not set # CONFIG_ADXL345_SPI is not set CONFIG_BMA180=y CONFIG_BMA220=y # CONFIG_BMC150_ACCEL is not set CONFIG_DA280=y CONFIG_DA311=y # CONFIG_DMARD09 is not set # CONFIG_DMARD10 is not set CONFIG_HID_SENSOR_ACCEL_3D=y # CONFIG_IIO_CROS_EC_ACCEL_LEGACY is not set CONFIG_KXSD9=y CONFIG_KXSD9_SPI=y CONFIG_KXSD9_I2C=y # CONFIG_KXCJK1013 is not set CONFIG_MC3230=y # CONFIG_MMA7455_I2C is not set # CONFIG_MMA7455_SPI is not set CONFIG_MMA7660=y CONFIG_MMA8452=y CONFIG_MMA9551_CORE=y # CONFIG_MMA9551 is not set CONFIG_MMA9553=y CONFIG_MXC4005=y # CONFIG_MXC6255 is not set CONFIG_SCA3000=y # CONFIG_STK8312 is not set CONFIG_STK8BA50=y # # Analog to digital converters # CONFIG_AD_SIGMA_DELTA=y CONFIG_AD7266=y # CONFIG_AD7291 is not set # CONFIG_AD7298 is not set CONFIG_AD7476=y # CONFIG_AD7766 is not set CONFIG_AD7791=y CONFIG_AD7793=y # CONFIG_AD7887 is not set CONFIG_AD7923=y # CONFIG_AD799X is not set # CONFIG_CC10001_ADC is not set CONFIG_DA9150_GPADC=y CONFIG_HI8435=y CONFIG_HX711=y CONFIG_INA2XX_ADC=y CONFIG_LTC2471=y CONFIG_LTC2485=y CONFIG_LTC2497=y # CONFIG_MAX1027 is not set # CONFIG_MAX11100 is not set CONFIG_MAX1118=y # CONFIG_MAX1363 is not set CONFIG_MAX9611=y CONFIG_MCP320X=y CONFIG_MCP3422=y CONFIG_MEN_Z188_ADC=y CONFIG_NAU7802=y CONFIG_QCOM_VADC_COMMON=y # CONFIG_QCOM_SPMI_IADC is not set CONFIG_QCOM_SPMI_VADC=y # CONFIG_TI_ADC081C is not set # CONFIG_TI_ADC0832 is not set # CONFIG_TI_ADC084S021 is not set CONFIG_TI_ADC12138=y CONFIG_TI_ADC108S102=y CONFIG_TI_ADC128S052=y # CONFIG_TI_ADC161S626 is not set CONFIG_TI_ADS7950=y # CONFIG_TI_AM335X_ADC is not set CONFIG_TI_TLC4541=y CONFIG_TWL4030_MADC=y # CONFIG_TWL6030_GPADC is not set CONFIG_VIPERBOARD_ADC=y # # Amplifiers # CONFIG_AD8366=y # # Chemical Sensors # CONFIG_ATLAS_PH_SENSOR=y CONFIG_CCS811=y CONFIG_IAQCORE=y # CONFIG_VZ89X is not set CONFIG_IIO_CROS_EC_SENSORS_CORE=y # CONFIG_IIO_CROS_EC_SENSORS is not set # # Hid Sensor IIO Common # CONFIG_HID_SENSOR_IIO_COMMON=y CONFIG_HID_SENSOR_IIO_TRIGGER=y CONFIG_IIO_MS_SENSORS_I2C=y # # SSP Sensor Common # # CONFIG_IIO_SSP_SENSORS_COMMONS is not set CONFIG_IIO_SSP_SENSORHUB=y CONFIG_IIO_ST_SENSORS_I2C=y CONFIG_IIO_ST_SENSORS_SPI=y CONFIG_IIO_ST_SENSORS_CORE=y # # Counters # # # Digital to analog converters # CONFIG_AD5064=y CONFIG_AD5360=y CONFIG_AD5380=y # CONFIG_AD5421 is not set CONFIG_AD5446=y CONFIG_AD5449=y CONFIG_AD5592R_BASE=y CONFIG_AD5592R=y CONFIG_AD5593R=y CONFIG_AD5504=y CONFIG_AD5624R_SPI=y CONFIG_LTC2632=y CONFIG_AD5686=y # CONFIG_AD5755 is not set CONFIG_AD5761=y CONFIG_AD5764=y CONFIG_AD5791=y CONFIG_AD7303=y # CONFIG_AD8801 is not set CONFIG_DS4424=y CONFIG_M62332=y CONFIG_MAX517=y CONFIG_MCP4725=y CONFIG_MCP4922=y CONFIG_TI_DAC082S085=y # # IIO dummy driver # CONFIG_IIO_DUMMY_EVGEN=y CONFIG_IIO_SIMPLE_DUMMY=y CONFIG_IIO_SIMPLE_DUMMY_EVENTS=y CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y # # Frequency Synthesizers DDS/PLL # # # Clock Generator/Distribution # # CONFIG_AD9523 is not set # # Phase-Locked Loop (PLL) frequency synthesizers # # CONFIG_ADF4350 is not set # # Digital gyroscope sensors # # CONFIG_ADIS16080 is not set CONFIG_ADIS16130=y CONFIG_ADIS16136=y # CONFIG_ADIS16260 is not set # CONFIG_ADXRS450 is not set CONFIG_BMG160=y CONFIG_BMG160_I2C=y CONFIG_BMG160_SPI=y # CONFIG_HID_SENSOR_GYRO_3D is not set CONFIG_MPU3050=y CONFIG_MPU3050_I2C=y CONFIG_IIO_ST_GYRO_3AXIS=y CONFIG_IIO_ST_GYRO_I2C_3AXIS=y CONFIG_IIO_ST_GYRO_SPI_3AXIS=y CONFIG_ITG3200=y # # Health Sensors # # # Heart Rate Monitors # CONFIG_AFE4403=y # CONFIG_AFE4404 is not set CONFIG_MAX30100=y CONFIG_MAX30102=y # # Humidity sensors # CONFIG_AM2315=y CONFIG_DHT11=y CONFIG_HDC100X=y CONFIG_HID_SENSOR_HUMIDITY=y # CONFIG_HTS221 is not set CONFIG_HTU21=y CONFIG_SI7005=y # CONFIG_SI7020 is not set # # Inertial measurement units # CONFIG_ADIS16400=y CONFIG_ADIS16480=y # CONFIG_BMI160_I2C is not set # CONFIG_BMI160_SPI is not set CONFIG_KMX61=y CONFIG_INV_MPU6050_IIO=y CONFIG_INV_MPU6050_I2C=y CONFIG_INV_MPU6050_SPI=y CONFIG_IIO_ST_LSM6DSX=y CONFIG_IIO_ST_LSM6DSX_I2C=y CONFIG_IIO_ST_LSM6DSX_SPI=y CONFIG_IIO_ADIS_LIB=y CONFIG_IIO_ADIS_LIB_BUFFER=y # # Light sensors # # CONFIG_ACPI_ALS is not set CONFIG_ADJD_S311=y CONFIG_AL3320A=y CONFIG_APDS9300=y # CONFIG_APDS9960 is not set # CONFIG_BH1750 is not set # CONFIG_BH1780 is not set CONFIG_CM32181=y CONFIG_CM3232=y CONFIG_CM3323=y # CONFIG_CM36651 is not set CONFIG_IIO_CROS_EC_LIGHT_PROX=y CONFIG_GP2AP020A00F=y # CONFIG_SENSORS_ISL29018 is not set CONFIG_SENSORS_ISL29028=y CONFIG_ISL29125=y # CONFIG_HID_SENSOR_ALS is not set CONFIG_HID_SENSOR_PROX=y CONFIG_JSA1212=y # CONFIG_RPR0521 is not set # CONFIG_SENSORS_LM3533 is not set CONFIG_LTR501=y # CONFIG_LV0104CS is not set CONFIG_MAX44000=y # CONFIG_OPT3001 is not set # CONFIG_PA12203001 is not set CONFIG_SI1145=y CONFIG_STK3310=y CONFIG_ST_UVIS25=y CONFIG_ST_UVIS25_I2C=y CONFIG_ST_UVIS25_SPI=y CONFIG_TCS3414=y CONFIG_TCS3472=y # CONFIG_SENSORS_TSL2563 is not set CONFIG_TSL2583=y CONFIG_TSL4531=y # CONFIG_US5182D is not set # CONFIG_VCNL4000 is not set # CONFIG_VEML6070 is not set # CONFIG_VL6180 is not set CONFIG_ZOPT2201=y # # Magnetometer sensors # CONFIG_AK8975=y CONFIG_AK09911=y CONFIG_BMC150_MAGN=y CONFIG_BMC150_MAGN_I2C=y # CONFIG_BMC150_MAGN_SPI is not set # CONFIG_MAG3110 is not set CONFIG_HID_SENSOR_MAGNETOMETER_3D=y # CONFIG_MMC35240 is not set CONFIG_IIO_ST_MAGN_3AXIS=y CONFIG_IIO_ST_MAGN_I2C_3AXIS=y CONFIG_IIO_ST_MAGN_SPI_3AXIS=y CONFIG_SENSORS_HMC5843=y CONFIG_SENSORS_HMC5843_I2C=y # CONFIG_SENSORS_HMC5843_SPI is not set # # Multiplexers # # # Inclinometer sensors # CONFIG_HID_SENSOR_INCLINOMETER_3D=y CONFIG_HID_SENSOR_DEVICE_ROTATION=y # # Triggers - standalone # CONFIG_IIO_INTERRUPT_TRIGGER=y # CONFIG_IIO_SYSFS_TRIGGER is not set # # Digital potentiometers # CONFIG_AD5272=y CONFIG_DS1803=y CONFIG_MAX5481=y CONFIG_MAX5487=y # CONFIG_MCP4018 is not set # CONFIG_MCP4131 is not set CONFIG_MCP4531=y CONFIG_TPL0102=y # # Digital potentiostats # CONFIG_LMP91000=y # # Pressure sensors # # CONFIG_ABP060MG is not set CONFIG_BMP280=y CONFIG_BMP280_I2C=y CONFIG_BMP280_SPI=y CONFIG_IIO_CROS_EC_BARO=y CONFIG_HID_SENSOR_PRESS=y CONFIG_HP03=y # CONFIG_MPL115_I2C is not set # CONFIG_MPL115_SPI is not set CONFIG_MPL3115=y CONFIG_MS5611=y # CONFIG_MS5611_I2C is not set # CONFIG_MS5611_SPI is not set CONFIG_MS5637=y # CONFIG_IIO_ST_PRESS is not set CONFIG_T5403=y CONFIG_HP206C=y CONFIG_ZPA2326=y CONFIG_ZPA2326_I2C=y CONFIG_ZPA2326_SPI=y # # Lightning sensors # CONFIG_AS3935=y # # Proximity and distance sensors # CONFIG_LIDAR_LITE_V2=y CONFIG_RFD77402=y CONFIG_SRF04=y CONFIG_SX9500=y CONFIG_SRF08=y # # Temperature sensors # CONFIG_MAXIM_THERMOCOUPLE=y # CONFIG_HID_SENSOR_TEMP is not set CONFIG_MLX90614=y CONFIG_MLX90632=y CONFIG_TMP006=y CONFIG_TMP007=y # CONFIG_TSYS01 is not set # CONFIG_TSYS02D is not set # CONFIG_NTB is not set # CONFIG_VME_BUS is not set # CONFIG_PWM is not set # # IRQ chip support # CONFIG_ARM_GIC_MAX_NR=1 CONFIG_IPACK_BUS=y # CONFIG_BOARD_TPCI200 is not set # CONFIG_SERIAL_IPOCTAL is not set CONFIG_RESET_CONTROLLER=y CONFIG_RESET_TI_SYSCON=y CONFIG_FMC=y CONFIG_FMC_FAKEDEV=y CONFIG_FMC_TRIVIAL=y CONFIG_FMC_WRITE_EEPROM=y # CONFIG_FMC_CHARDEV is not set # # PHY Subsystem # CONFIG_GENERIC_PHY=y CONFIG_BCM_KONA_USB2_PHY=y # CONFIG_PHY_PXA_28NM_HSIC is not set CONFIG_PHY_PXA_28NM_USB2=y # CONFIG_PHY_CPCAP_USB is not set CONFIG_PHY_QCOM_USB_HS=y CONFIG_PHY_QCOM_USB_HSIC=y CONFIG_PHY_SAMSUNG_USB2=y CONFIG_PHY_TUSB1210=y # CONFIG_POWERCAP is not set CONFIG_MCB=y # CONFIG_MCB_PCI is not set CONFIG_MCB_LPC=y # # Performance monitor support # CONFIG_RAS=y # CONFIG_RAS_CEC is not set # CONFIG_THUNDERBOLT is not set # # Android # # CONFIG_ANDROID is not set CONFIG_DAX=y CONFIG_DEV_DAX=y CONFIG_NVMEM=y # # HW tracing support # # CONFIG_STM is not set CONFIG_INTEL_TH=y # CONFIG_INTEL_TH_PCI is not set # CONFIG_INTEL_TH_ACPI is not set # CONFIG_INTEL_TH_GTH is not set CONFIG_INTEL_TH_MSU=y CONFIG_INTEL_TH_PTI=y # CONFIG_INTEL_TH_DEBUG is not set CONFIG_FPGA=y # CONFIG_ALTERA_PR_IP_CORE is not set CONFIG_FPGA_MGR_ALTERA_PS_SPI=y # CONFIG_FPGA_MGR_ALTERA_CVP is not set CONFIG_FPGA_MGR_XILINX_SPI=y # CONFIG_FPGA_BRIDGE is not set # CONFIG_UNISYS_VISORBUS is not set CONFIG_SIOX=y # CONFIG_SIOX_BUS_GPIO is not set CONFIG_SLIMBUS=y CONFIG_SLIM_QCOM_CTRL=y # # Firmware Drivers # # CONFIG_EDD is not set CONFIG_FIRMWARE_MEMMAP=y CONFIG_DELL_RBU=y # CONFIG_DCDBAS is not set # CONFIG_ISCSI_IBFT_FIND is not set CONFIG_FW_CFG_SYSFS=y # CONFIG_FW_CFG_SYSFS_CMDLINE is not set # CONFIG_GOOGLE_FIRMWARE is not set # # Tegra firmware driver # # # File systems # CONFIG_DCACHE_WORD_ACCESS=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y # CONFIG_EXPORTFS_BLOCK_OPS is not set CONFIG_FILE_LOCKING=y CONFIG_MANDATORY_FILE_LOCKING=y # CONFIG_FS_ENCRYPTION is not set CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y CONFIG_FANOTIFY=y CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y # CONFIG_PRINT_QUOTA_WARNING is not set CONFIG_QUOTA_DEBUG=y # CONFIG_QFMT_V1 is not set # CONFIG_QFMT_V2 is not set CONFIG_QUOTACTL=y CONFIG_QUOTACTL_COMPAT=y # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set # CONFIG_OVERLAY_FS is not set # # Caches # # CONFIG_FSCACHE is not set # # Pseudo filesystems # CONFIG_PROC_FS=y # CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=y # CONFIG_PROC_PAGE_MONITOR is not set # CONFIG_PROC_CHILDREN is not set CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y # CONFIG_HUGETLBFS is not set CONFIG_ARCH_HAS_GIGANTIC_PAGE=y CONFIG_CONFIGFS_FS=y CONFIG_MISC_FILESYSTEMS=y # CONFIG_ORANGEFS_FS is not set # CONFIG_ECRYPT_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_FS_WBUF_VERIFY=y # CONFIG_JFFS2_SUMMARY is not set # CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y CONFIG_UBIFS_FS=y CONFIG_UBIFS_FS_ADVANCED_COMPR=y # CONFIG_UBIFS_FS_LZO is not set CONFIG_UBIFS_FS_ZLIB=y # CONFIG_UBIFS_ATIME_SUPPORT is not set CONFIG_UBIFS_FS_SECURITY=y # CONFIG_CRAMFS is not set CONFIG_ROMFS_FS=y CONFIG_ROMFS_BACKED_BY_MTD=y CONFIG_ROMFS_ON_MTD=y CONFIG_PSTORE=y CONFIG_PSTORE_DEFLATE_COMPRESS=y # CONFIG_PSTORE_LZO_COMPRESS is not set # CONFIG_PSTORE_LZ4_COMPRESS is not set # CONFIG_PSTORE_LZ4HC_COMPRESS is not set # CONFIG_PSTORE_842_COMPRESS is not set CONFIG_PSTORE_COMPRESS=y CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_PMSG is not set CONFIG_PSTORE_RAM=y CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V2=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4=y # CONFIG_NFS_SWAP is not set # CONFIG_NFS_V4_1 is not set # CONFIG_ROOT_NFS is not set # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y # CONFIG_NFSD is not set CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_SUNRPC_DEBUG is not set CONFIG_CEPH_FS=y # CONFIG_CEPH_FS_POSIX_ACL is not set CONFIG_CIFS=y CONFIG_CIFS_STATS=y CONFIG_CIFS_STATS2=y CONFIG_CIFS_WEAK_PW_HASH=y # CONFIG_CIFS_UPCALL is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y # CONFIG_CIFS_ACL is not set # CONFIG_CIFS_DEBUG is not set # CONFIG_CIFS_DFS_UPCALL is not set CONFIG_CIFS_SMB311=y CONFIG_CODA_FS=y CONFIG_AFS_FS=y CONFIG_AFS_DEBUG=y CONFIG_9P_FS=y # CONFIG_9P_FS_POSIX_ACL is not set # CONFIG_9P_FS_SECURITY is not set CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set CONFIG_NLS_CODEPAGE_737=y # CONFIG_NLS_CODEPAGE_775 is not set CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_CODEPAGE_852=y CONFIG_NLS_CODEPAGE_855=y # CONFIG_NLS_CODEPAGE_857 is not set CONFIG_NLS_CODEPAGE_860=y CONFIG_NLS_CODEPAGE_861=y CONFIG_NLS_CODEPAGE_862=y CONFIG_NLS_CODEPAGE_863=y CONFIG_NLS_CODEPAGE_864=y CONFIG_NLS_CODEPAGE_865=y CONFIG_NLS_CODEPAGE_866=y # CONFIG_NLS_CODEPAGE_869 is not set CONFIG_NLS_CODEPAGE_936=y # CONFIG_NLS_CODEPAGE_950 is not set CONFIG_NLS_CODEPAGE_932=y CONFIG_NLS_CODEPAGE_949=y CONFIG_NLS_CODEPAGE_874=y # CONFIG_NLS_ISO8859_8 is not set CONFIG_NLS_CODEPAGE_1250=y # CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y # CONFIG_NLS_ISO8859_3 is not set CONFIG_NLS_ISO8859_4=y CONFIG_NLS_ISO8859_5=y CONFIG_NLS_ISO8859_6=y CONFIG_NLS_ISO8859_7=y CONFIG_NLS_ISO8859_9=y # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set CONFIG_NLS_ISO8859_15=y # CONFIG_NLS_KOI8_R is not set CONFIG_NLS_KOI8_U=y CONFIG_NLS_MAC_ROMAN=y CONFIG_NLS_MAC_CELTIC=y CONFIG_NLS_MAC_CENTEURO=y CONFIG_NLS_MAC_CROATIAN=y CONFIG_NLS_MAC_CYRILLIC=y CONFIG_NLS_MAC_GAELIC=y CONFIG_NLS_MAC_GREEK=y # CONFIG_NLS_MAC_ICELAND is not set CONFIG_NLS_MAC_INUIT=y # CONFIG_NLS_MAC_ROMANIAN is not set # CONFIG_NLS_MAC_TURKISH is not set CONFIG_NLS_UTF8=y # CONFIG_DLM is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # # printk and dmesg options # CONFIG_PRINTK_TIME=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set # # Compile-time checks and compiler options # CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=y # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_GDB_SCRIPTS is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=8192 # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_READABLE_ASM is not set CONFIG_UNUSED_SYMBOLS=y # CONFIG_PAGE_OWNER is not set CONFIG_DEBUG_FS=y CONFIG_HEADERS_CHECK=y # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_FRAME_POINTER=y # CONFIG_STACK_VALIDATION is not set CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 # CONFIG_MAGIC_SYSRQ_SERIAL is not set CONFIG_DEBUG_KERNEL=y # # Memory Debugging # CONFIG_PAGE_EXTENSION=y CONFIG_DEBUG_PAGEALLOC=y CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y # CONFIG_PAGE_POISONING is not set CONFIG_DEBUG_RODATA_TEST=y CONFIG_DEBUG_OBJECTS=y # CONFIG_DEBUG_OBJECTS_SELFTEST is not set # CONFIG_DEBUG_OBJECTS_FREE is not set # CONFIG_DEBUG_OBJECTS_TIMERS is not set # CONFIG_DEBUG_OBJECTS_WORK is not set CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 # CONFIG_SLUB_DEBUG_ON is not set CONFIG_SLUB_STATS=y CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUG_VM is not set CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set CONFIG_DEBUG_MEMORY_INIT=y CONFIG_HAVE_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_STACKOVERFLOW is not set CONFIG_HAVE_ARCH_KASAN=y CONFIG_KASAN=y CONFIG_KASAN_EXTRA=y CONFIG_KASAN_OUTLINE=y # CONFIG_KASAN_INLINE is not set CONFIG_ARCH_HAS_KCOV=y # CONFIG_KCOV is not set CONFIG_DEBUG_SHIRQ=y # # Debug Lockups and Hangs # # CONFIG_SOFTLOCKUP_DETECTOR is not set CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y # CONFIG_HARDLOCKUP_DETECTOR is not set # CONFIG_DETECT_HUNG_TASK is not set CONFIG_WQ_WATCHDOG=y CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_ON_OOPS_VALUE=1 CONFIG_PANIC_TIMEOUT=0 # CONFIG_SCHED_DEBUG is not set # CONFIG_SCHEDSTATS is not set # CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_TIMEKEEPING is not set # # Lock Debugging (spinlocks, mutexes, etc...) # CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_PROVE_LOCKING=y CONFIG_LOCK_STAT=y CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_LOCKDEP=y # CONFIG_DEBUG_LOCKDEP is not set CONFIG_DEBUG_ATOMIC_SLEEP=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set CONFIG_WW_MUTEX_SELFTEST=y CONFIG_TRACE_IRQFLAGS=y CONFIG_STACKTRACE=y CONFIG_WARN_ALL_UNSEEDED_RANDOM=y # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_LIST=y CONFIG_DEBUG_PI_LIST=y CONFIG_DEBUG_SG=y CONFIG_DEBUG_NOTIFIERS=y # CONFIG_DEBUG_CREDENTIALS is not set # # RCU Debugging # CONFIG_PROVE_RCU=y CONFIG_TORTURE_TEST=y # CONFIG_RCU_PERF_TEST is not set CONFIG_RCU_TORTURE_TEST=y CONFIG_RCU_TRACE=y # CONFIG_RCU_EQS_DEBUG is not set CONFIG_DEBUG_WQ_FORCE_RR_CPU=y # CONFIG_NOTIFIER_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_FENTRY=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACE_CLOCK=y CONFIG_TRACING_SUPPORT=y # CONFIG_FTRACE is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_DMA_API_DEBUG is not set # CONFIG_RUNTIME_TESTING_MENU is not set CONFIG_MEMTEST=y # CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y # CONFIG_UBSAN is not set CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y CONFIG_STRICT_DEVMEM=y # CONFIG_IO_STRICT_DEVMEM is not set CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set # CONFIG_EARLY_PRINTK_USB_XDBC is not set CONFIG_X86_PTDUMP_CORE=y CONFIG_X86_PTDUMP=y CONFIG_DEBUG_WX=y CONFIG_DOUBLEFAULT=y # CONFIG_DEBUG_TLBFLUSH is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2 CONFIG_IO_DELAY_TYPE_NONE=3 # CONFIG_IO_DELAY_0X80 is not set CONFIG_IO_DELAY_0XED=y # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=1 # CONFIG_DEBUG_BOOT_PARAMS is not set # CONFIG_CPA_DEBUG is not set # CONFIG_OPTIMIZE_INLINING is not set # CONFIG_DEBUG_ENTRY is not set CONFIG_DEBUG_NMI_SELFTEST=y CONFIG_X86_DEBUG_FPU=y # CONFIG_PUNIT_ATOM_DEBUG is not set # CONFIG_UNWINDER_ORC is not set CONFIG_UNWINDER_FRAME_POINTER=y # # Security options # CONFIG_KEYS=y CONFIG_KEYS_COMPAT=y # CONFIG_PERSISTENT_KEYRINGS is not set CONFIG_BIG_KEYS=y CONFIG_TRUSTED_KEYS=y # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEY_DH_OPERATIONS is not set # CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set CONFIG_SECURITYFS=y CONFIG_PAGE_TABLE_ISOLATION=y CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y CONFIG_HARDENED_USERCOPY=y CONFIG_HARDENED_USERCOPY_FALLBACK=y CONFIG_HARDENED_USERCOPY_PAGESPAN=y # CONFIG_FORTIFY_SOURCE is not set # CONFIG_STATIC_USERMODEHELPER is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY="" CONFIG_CRYPTO=y # # Crypto core or helper # CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_BLKCIPHER=y CONFIG_CRYPTO_BLKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_DH=y # CONFIG_CRYPTO_ECDH is not set CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_USER=y CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_CRYPTD=y CONFIG_CRYPTO_MCRYPTD=y CONFIG_CRYPTO_AUTHENC=y CONFIG_CRYPTO_SIMD=y CONFIG_CRYPTO_GLUE_HELPER_X86=y # # Authenticated Encryption with Associated Data # CONFIG_CRYPTO_CCM=y CONFIG_CRYPTO_GCM=y # CONFIG_CRYPTO_CHACHA20POLY1305 is not set CONFIG_CRYPTO_SEQIV=y # CONFIG_CRYPTO_ECHAINIV is not set # # Block modes # CONFIG_CRYPTO_CBC=y # CONFIG_CRYPTO_CFB is not set CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_LRW=y CONFIG_CRYPTO_PCBC=y CONFIG_CRYPTO_XTS=y CONFIG_CRYPTO_KEYWRAP=y # # Hash modes # CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_XCBC=y CONFIG_CRYPTO_VMAC=y # # Digest # CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRC32C_INTEL=y # CONFIG_CRYPTO_CRC32 is not set CONFIG_CRYPTO_CRC32_PCLMUL=y CONFIG_CRYPTO_CRCT10DIF=y CONFIG_CRYPTO_GHASH=y CONFIG_CRYPTO_POLY1305=y CONFIG_CRYPTO_POLY1305_X86_64=y CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_RMD128=y CONFIG_CRYPTO_RMD160=y CONFIG_CRYPTO_RMD256=y # CONFIG_CRYPTO_RMD320 is not set CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_SSSE3=y CONFIG_CRYPTO_SHA256_SSSE3=y # CONFIG_CRYPTO_SHA512_SSSE3 is not set CONFIG_CRYPTO_SHA1_MB=y # CONFIG_CRYPTO_SHA256_MB is not set CONFIG_CRYPTO_SHA512_MB=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y # CONFIG_CRYPTO_SHA3 is not set CONFIG_CRYPTO_SM3=y CONFIG_CRYPTO_TGR192=y CONFIG_CRYPTO_WP512=y CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=y # # Ciphers # CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES_TI=y CONFIG_CRYPTO_AES_X86_64=y CONFIG_CRYPTO_AES_NI_INTEL=y # CONFIG_CRYPTO_ANUBIS is not set CONFIG_CRYPTO_ARC4=y CONFIG_CRYPTO_BLOWFISH=y CONFIG_CRYPTO_BLOWFISH_COMMON=y CONFIG_CRYPTO_BLOWFISH_X86_64=y CONFIG_CRYPTO_CAMELLIA=y CONFIG_CRYPTO_CAMELLIA_X86_64=y CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=y CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=y CONFIG_CRYPTO_CAST_COMMON=y CONFIG_CRYPTO_CAST5=y CONFIG_CRYPTO_CAST5_AVX_X86_64=y # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_DES3_EDE_X86_64 is not set CONFIG_CRYPTO_FCRYPT=y # CONFIG_CRYPTO_KHAZAD is not set CONFIG_CRYPTO_SALSA20=y CONFIG_CRYPTO_SALSA20_X86_64=y CONFIG_CRYPTO_CHACHA20=y CONFIG_CRYPTO_CHACHA20_X86_64=y CONFIG_CRYPTO_SEED=y CONFIG_CRYPTO_SERPENT=y CONFIG_CRYPTO_SERPENT_SSE2_X86_64=y CONFIG_CRYPTO_SERPENT_AVX_X86_64=y CONFIG_CRYPTO_SERPENT_AVX2_X86_64=y # CONFIG_CRYPTO_SM4 is not set # CONFIG_CRYPTO_SPECK is not set CONFIG_CRYPTO_TEA=y CONFIG_CRYPTO_TWOFISH=y CONFIG_CRYPTO_TWOFISH_COMMON=y CONFIG_CRYPTO_TWOFISH_X86_64=y CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y # CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set # # Compression # CONFIG_CRYPTO_DEFLATE=y # CONFIG_CRYPTO_LZO is not set # CONFIG_CRYPTO_842 is not set CONFIG_CRYPTO_LZ4=y # CONFIG_CRYPTO_LZ4HC is not set # # Random Number Generation # CONFIG_CRYPTO_ANSI_CPRNG=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_DRBG_HMAC=y # CONFIG_CRYPTO_DRBG_HASH is not set # CONFIG_CRYPTO_DRBG_CTR is not set CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_USER_API=y CONFIG_CRYPTO_USER_API_HASH=y # CONFIG_CRYPTO_USER_API_SKCIPHER is not set CONFIG_CRYPTO_USER_API_RNG=y # CONFIG_CRYPTO_USER_API_AEAD is not set CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=y CONFIG_CRYPTO_DEV_PADLOCK_AES=y CONFIG_CRYPTO_DEV_PADLOCK_SHA=y # CONFIG_CRYPTO_DEV_CCP is not set # CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set # CONFIG_CRYPTO_DEV_QAT_C3XXX is not set # CONFIG_CRYPTO_DEV_QAT_C62X is not set # CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set # CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set # CONFIG_CRYPTO_DEV_QAT_C62XVF is not set # CONFIG_CRYPTO_DEV_VIRTIO is not set CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y CONFIG_X509_CERTIFICATE_PARSER=y CONFIG_PKCS7_MESSAGE_PARSER=y CONFIG_PKCS7_TEST_KEY=y CONFIG_SIGNED_PE_FILE_VERIFICATION=y # # Certificates for signature checking # CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set # CONFIG_SECONDARY_TRUSTED_KEYRING is not set # CONFIG_SYSTEM_BLACKLIST_KEYRING is not set CONFIG_HAVE_KVM=y # CONFIG_VIRTUALIZATION is not set # # Library routines # CONFIG_BITREVERSE=y CONFIG_RATIONAL=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_HAS_FAST_MULTIPLIER=y CONFIG_CRC_CCITT=y CONFIG_CRC16=y # CONFIG_CRC_T10DIF is not set CONFIG_CRC_ITU_T=y CONFIG_CRC32=y # CONFIG_CRC32_SELFTEST is not set # CONFIG_CRC32_SLICEBY8 is not set # CONFIG_CRC32_SLICEBY4 is not set CONFIG_CRC32_SARWATE=y # CONFIG_CRC32_BIT is not set # CONFIG_CRC4 is not set CONFIG_CRC7=y CONFIG_LIBCRC32C=y CONFIG_CRC8=y CONFIG_RANDOM32_SELFTEST=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_DECOMPRESS=y CONFIG_LZ4_COMPRESS=y CONFIG_LZ4_DECOMPRESS=y CONFIG_XZ_DEC=y # CONFIG_XZ_DEC_X86 is not set # CONFIG_XZ_DEC_POWERPC is not set CONFIG_XZ_DEC_IA64=y CONFIG_XZ_DEC_ARM=y # CONFIG_XZ_DEC_ARMTHUMB is not set # CONFIG_XZ_DEC_SPARC is not set CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_TEST=y CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_BZIP2=y CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZO=y CONFIG_DECOMPRESS_LZ4=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_ENC8=y CONFIG_REED_SOLOMON_DEC8=y CONFIG_RADIX_TREE_MULTIORDER=y CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y CONFIG_SGL_ALLOC=y CONFIG_DMA_DIRECT_OPS=y CONFIG_DQL=y CONFIG_NLATTR=y CONFIG_CLZ_TAB=y # CONFIG_CORDIC is not set CONFIG_DDR=y # CONFIG_IRQ_POLL is not set CONFIG_MPILIB=y CONFIG_OID_REGISTRY=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_ARCH_HAS_PMEM_API=y CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y CONFIG_STACKDEPOT=y CONFIG_STRING_SELFTEST=y -------------- next part -------------- #!/bin/sh export_top_env() { export suite='boot' export testcase='boot' export timeout='10m' export job_origin='/lkp/lkp/src/jobs/boot.yaml' export queue='rand' export testbox='vm-lkp-hsw01-openwrt-ia32-7' export tbox_group='vm-lkp-hsw01-openwrt-ia32' export branch='linus/master' export commit='60cc43fc888428bb2f18f08997432d426a243338' export kconfig='x86_64-randconfig-ws0-03101549' export submit_id='5ad570ee0b9a9378ec104ef9' export job_file='/lkp/scheduled/vm-lkp-hsw01-openwrt-ia32-7/boot-1-openwrt-i386-2016-03-16.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180417-30956-psgkzl-wait_kernel-0.yaml' export id='bf835a0112573d011ff7fcaab14c3b2f0c4e8eda' export model='qemu-system-x86_64 -enable-kvm' export nr_vm=30 export nr_cpu=1 export memory='420M' export rootfs='openwrt-i386-2016-03-16.cgz' export need_kconfig='CONFIG_KVM_GUEST=y' export compiler='gcc-7' export enqueue_time='2018-04-17 11:58:38 +0800' export _id='5ad570ee0b9a9378ec104ef9' export _rt='/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338' export user='lkp' export kernel='/pkg/linux/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1' export result_root='/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0' export dequeue_time='2018-04-17 12:08:37 +0800' export LKP_SERVER='inn' export max_uptime=600 export initrd='/osimage/openwrt/openwrt-i386-2016-03-16.cgz' export bootloader_append='root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-hsw01-openwrt-ia32-7/boot-1-openwrt-i386-2016-03-16.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180417-30956-psgkzl-wait_kernel-0.yaml ARCH=x86_64 kconfig=x86_64-randconfig-ws0-03101549 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw' export lkp_initrd='/lkp/lkp/lkp-i386.cgz' export site='inn' export LKP_CGI_PORT=80 export LKP_CIFS_PORT=139 export job_initrd='/lkp/scheduled/vm-lkp-hsw01-openwrt-ia32-7/boot-1-openwrt-i386-2016-03-16.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180417-30956-psgkzl-wait_kernel-0.cgz' [ -n "$LKP_SRC" ] || export LKP_SRC=/lkp/${user:-lkp}/src } run_job() { echo $$ > $TMP/run-job.pid . $LKP_SRC/lib/http.sh . $LKP_SRC/lib/job.sh . $LKP_SRC/lib/env.sh export_top_env run_monitor $LKP_SRC/monitors/one-shot/wrapper boot-slabinfo run_monitor $LKP_SRC/monitors/one-shot/wrapper boot-meminfo run_monitor $LKP_SRC/monitors/one-shot/wrapper memmap run_monitor $LKP_SRC/monitors/no-stdout/wrapper boot-time run_monitor $LKP_SRC/monitors/wrapper kmsg run_monitor $LKP_SRC/monitors/wrapper oom-killer run_monitor $LKP_SRC/monitors/plain/watchdog run_monitor $LKP_SRC/monitors/wrapper nfs-hang run_test $LKP_SRC/tests/wrapper sleep 1 } extract_stats() { $LKP_SRC/stats/wrapper boot-slabinfo $LKP_SRC/stats/wrapper boot-meminfo $LKP_SRC/stats/wrapper memmap $LKP_SRC/stats/wrapper boot-memory $LKP_SRC/stats/wrapper boot-time $LKP_SRC/stats/wrapper kernel-size $LKP_SRC/stats/wrapper kmsg $LKP_SRC/stats/wrapper time sleep.time $LKP_SRC/stats/wrapper time $LKP_SRC/stats/wrapper dmesg $LKP_SRC/stats/wrapper kmsg $LKP_SRC/stats/wrapper stderr $LKP_SRC/stats/wrapper last_state } "$@" -------------- next part -------------- #!/bin/bash # To reproduce, # 1) save job-script and this script (both are attached in 0day report email) # 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH kernel=$1 initrds=( /osimage/openwrt/openwrt-i386-2016-03-16.cgz /lkp/lkp/lkp-i386.cgz ) HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}" { cat "${initrds[@]//*\//}" [[ $INSTALL_MOD_PATH ]] && ( cd "$INSTALL_MOD_PATH" find lib | cpio -o -H newc --quiet | gzip ) echo job-script | cpio -o -H newc --quiet | gzip } > initrd.img kvm=( qemu-system-x86_64 -enable-kvm -kernel $kernel -initrd initrd.img -m 420 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial stdio -display none -monitor null ) append=( ip=::::vm-lkp-hsw01-openwrt-ia32-7::dhcp root=/dev/ram0 user=lkp job=/job-script ARCH=x86_64 kconfig=x86_64-randconfig-ws0-03101549 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-hsw01-openwrt-ia32/openwrt-i386-2016-03-16.cgz/x86_64-randconfig-ws0-03101549/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 result_service=tmpfs debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.minor_count=8 rcuperf.shutdown=0 ) "${kvm[@]}" -append "${append[*]}" From fengguang.wu at intel.com Wed Apr 18 13:38:31 2018 From: fengguang.wu at intel.com (Fengguang Wu) Date: Wed, 18 Apr 2018 21:38:31 +0800 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: unable to handle kernel NULL pointer dereference at 00000050 Message-ID: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> Hello, FYI this happens in mainline kernel 4.17.0-rc1. It looks like a new regression. It occurs in 5 out of 5 boots. [ 6.524361] ledtrig-cpu: registered to indicate activity on CPUs [ 6.527658] NET: Registered protocol family 4 [ 6.528191] comedi: version 0.7.76 - http://www.comedi.org [ 6.528851] LNetError: 1:0:(module.c:546:libcfs_init()) misc_register: error -16 [ 7.220272] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3 [ 7.586283] BUG: unable to handle kernel NULL pointer dereference at 00000050 [ 7.586962] *pdpt = 0000000000000000 *pde = f000ff53f000ff53 [ 7.587002] Oops: 0000 [#1] PREEMPT [ 7.587002] CPU: 0 PID: 1 Comm: swapper Not tainted 4.17.0-rc1 #1 [ 7.587002] EIP: cfs_trace_lock_tcd+0xb/0xa0: cfs_trace_lock_tcd at drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c:149 [ 7.587002] EFLAGS: 00210246 CPU: 0 [ 7.587002] EAX: 00000000 EBX: 00000000 ECX: 81fcb588 EDX: 00000000 [ 7.587002] ESI: 00001800 EDI: 8f5d1e08 EBP: 8f5d1d7c ESP: 8f5d1d70 [ 7.587002] DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068 [ 7.587002] CR0: 80050033 CR2: 00000050 CR3: 022f0000 CR4: 000006b0 [ 7.587002] Call Trace: [ 7.587002] libcfs_debug_vmsg2+0x8f/0x82f: libcfs_debug_vmsg2 at drivers/staging/lustre/lnet/libcfs/tracefile.c:317 [ 7.587002] ? trace_irq_enable_rcuidle+0x25/0x62: static_key_false at include/linux/jump_label.h:206 (inlined by) trace_irq_enable_rcuidle at include/trace/events/preemptirq.h:40 [ 7.587002] ? slob_free+0x249/0x251: slob_free at mm/slob.c:421 [ 7.587002] libcfs_debug_msg+0x19/0x1b: libcfs_debug_msg at drivers/staging/lustre/lnet/libcfs/tracefile.c:287 [ 7.587002] ksocknal_startup+0xe77/0x12b2: ksocknal_startup at drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2845 (discriminator 3) [ 7.587002] ? lock_release+0x135/0x1ec: lock_release at kernel/locking/lockdep.c:3942 [ 7.587002] ? _raw_spin_unlock+0x3c/0x4b: __raw_spin_unlock at include/linux/spinlock_api_smp.h:152 (inlined by) _raw_spin_unlock at kernel/locking/spinlock.c:176 [ 7.587002] lnet_startup_lndni+0x4cd/0x9ec: lnet_startup_lndni at drivers/staging/lustre/lnet/lnet/api-ni.c:1304 [ 7.587002] LNetNIInit+0x880/0xa00: lnet_startup_lndnis at drivers/staging/lustre/lnet/lnet/api-ni.c:1385 (inlined by) LNetNIInit at drivers/staging/lustre/lnet/lnet/api-ni.c:1543 [ 7.587002] ? read_seqcount_retry+0x1b/0x22: read_seqcount_retry at include/linux/seqlock.h:222 read_seqcount_retry+0x1b/0x22: read_seqcount_retry at include/linux/seqlock.h:222 read_seqcount_retry+0x1b/0x22: read_seqcount_retry at include/linux/seqlock.h:222 [ 7.587002] srpc_startup+0x84/0x381: srpc_startup at drivers/staging/lustre/lnet/selftest/rpc.c:1613 [ 7.587002] lnet_selftest_init+0x2c4/0x5d9: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:134 [ 7.587002] ? lnet_selftest_exit+0x8d/0x8d: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 [ 7.587002] do_one_initcall+0x76/0x1d7: __read_once_size at include/linux/compiler.h:188 (inlined by) arch_atomic_read at arch/x86/include/asm/atomic.h:31 (inlined by) atomic_read at include/asm-generic/atomic-instrumented.h:22 (inlined by) static_key_count at include/linux/jump_label.h:194 (inlined by) static_key_false at include/linux/jump_label.h:206 (inlined by) trace_initcall_finish at include/trace/events/initcall.h:44 (inlined by) do_one_initcall at init/main.c:884 [ 7.587002] ? do_early_param+0x78/0x78: repair_env_string at init/main.c:250 [ 7.587002] ? rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 rcu_read_unlock_sched_notrace+0x1e/0x2d: rcu_read_unlock_sched_notrace at include/linux/rcupdate.h:778 [ 7.587002] ? trace_initcall_level+0x3e/0x64: trace_initcall_level at include/trace/events/initcall.h:10 (discriminator 18) [ 7.587002] kernel_init_freeable+0xfc/0x177: do_initcall_level at init/main.c:951 (inlined by) do_initcalls at init/main.c:959 (inlined by) do_basic_setup at init/main.c:977 (inlined by) kernel_init_freeable at init/main.c:1127 [ 7.587002] ? rest_init+0xbe/0xbe: kernel_init at init/main.c:1050 [ 7.587002] kernel_init+0xd/0xd0: kernel_init at init/main.c:1055 [ 7.587002] ret_from_fork+0x2e/0x38: ret_from_fork at arch/x86/entry/entry_32.S:311 [ 7.587002] Code: 16 94 ff 8b 15 68 ab 03 82 f7 c2 00 00 0f 00 b8 02 00 00 00 75 08 31 c0 80 e6 ff 0f 95 c0 5d c3 55 89 e5 57 56 53 e8 99 16 94 ff <8b> 78 50 89 d6 6a 00 31 d2 89 c3 b8 50 f0 1b 82 66 83 ff 02 0f [ 7.587002] EIP: cfs_trace_lock_tcd+0xb/0xa0: cfs_trace_lock_tcd at drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c:149 SS:ESP: 0068:8f5d1d70 [ 7.587002] CR2: 0000000000000050 [ 7.587002] ---[ end trace 4fbdcb515c61525e ]--- [ 7.587002] Kernel panic - not syncing: Fatal exception Attached the full dmesg, kconfig and reproduce scripts. Thanks, Fengguang -------------- next part -------------- early console in setup code early console in extract_kernel input_data: 0x02a85069 input_len: 0x006fa377 output: 0x01000000 output_len: 0x012ed220 kernel_total_size: 0x02193000 Decompressing Linux... Parsing ELF... done. Booting the kernel. [ 0.000000] Linux version 4.17.0-rc1 (kbuild at lkp-hsx02) (gcc version 6.4.0 20171026 (Debian 6.4.0-9)) #1 PREEMPT Mon Apr 16 20:40:43 CST 2018 [ 0.000000] KERNEL supported cpus: [ 0.000000] Intel GenuineIntel [ 0.000000] AMD AuthenticAMD [ 0.000000] Transmeta GenuineTMx86 [ 0.000000] Transmeta TransmetaCPU [ 0.000000] UMC UMC UMC UMC [ 0.000000] x86/fpu: x87 FPU will use FXSAVE [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000000ffdffff] usable [ 0.000000] BIOS-e820: [mem 0x000000000ffe0000-0x000000000fffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] bootconsole [earlyser0] enabled [ 0.000000] Notice: NX (Execute Disable) protection missing in CPU! [ 0.000000] Hypervisor detected: KVM [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0xffe0 max_arch_pfn = 0x1000000 [ 0.000000] x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC [ 0.000000] initial memory mapped: [mem 0x00000000-0x035fffff] [ 0.000000] Base memory trampoline at [(ptrval)] 9b000 size 16384 [ 0.000000] BRK [0x02d94000, 0x02d94fff] PGTABLE [ 0.000000] BRK [0x02d95000, 0x02d95fff] PGTABLE [ 0.000000] RAMDISK: [mem 0x0fd21000-0x0ffdffff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F68D0 000014 (v00 BOCHS ) [ 0.000000] ACPI: RSDT 0x000000000FFE15CE 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACP 0x000000000FFE142A 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001) [ 0.000000] ACPI: DSDT 0x000000000FFE0040 0013EA (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACS 0x000000000FFE0000 000040 [ 0.000000] ACPI: APIC 0x000000000FFE151E 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001) [ 0.000000] ACPI: HPET 0x000000000FFE1596 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001) [ 0.000000] 255MB LOWMEM available. [ 0.000000] mapped low ram: 0 - 0ffe0000 [ 0.000000] low ram: 0 - 0ffe0000 [ 0.000000] cma: dma_contiguous_reserve(limit 0ffe0000) [ 0.000000] kvm-clock: cpu 0, msr 0:fd1f001, primary cpu clock [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: using sched offset of 1045972660 cycles [ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] Normal [mem 0x0000000001000000-0x000000000ffdffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff] [ 0.000000] node 0: [mem 0x0000000000100000-0x000000000ffdffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000000ffdffff] [ 0.000000] On node 0 totalpages: 65406 [ 0.000000] DMA zone: 32 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 3998 pages, LIFO batch:0 [ 0.000000] Normal zone: 480 pages used for memmap [ 0.000000] Normal zone: 61408 pages, LIFO batch:15 [ 0.000000] Reserved but unavailable: 98 pages [ 0.000000] ACPI: PM-Timer IO Port: 0x608 [ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000 [ 0.000000] KVM setup async PF for cpu 0 [ 0.000000] kvm-stealtime: cpu 0, msr 203c2c0 [ 0.000000] e820: [mem 0x10000000-0xfeffbfff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns [ 0.000000] random: fast init done [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64894 [ 0.000000] Kernel command line: ip=::::vm-lkp-nhm-dp1-yocto-i386-7::dhcp root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-nhm-dp1-yocto-i386-7/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180416-74153-1703sy7-0.yaml ARCH=i386 kconfig=i386-randconfig-s1-201814 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp1-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.mi [ 0.000000] sysrq: sysrq always enabled. [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Initializing CPU#0 [ 0.000000] Memory: 226136K/261624K available (10931K kernel code, 2040K rwdata, 5520K rodata, 764K init, 10804K bss, 35488K reserved, 0K cma-reserved) [ 0.000000] virtual kernel memory layout: [ 0.000000] fixmap : 0xfffe4000 - 0xfffff000 ( 108 kB) [ 0.000000] cpu_entry : 0xffa00000 - 0xffa28000 ( 160 kB) [ 0.000000] vmalloc : 0x907e0000 - 0xff9fe000 (1778 MB) [ 0.000000] lowmem : 0x80000000 - 0x8ffe0000 ( 255 MB) [ 0.000000] .init : 0x8222d000 - 0x822ec000 ( 764 kB) [ 0.000000] .data : 0x81aace54 - 0x82213040 (7576 kB) [ 0.000000] .text : 0x81000000 - 0x81aace54 (10931 kB) [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok. [ 0.000000] [ 0.000000] ********************************************************** [ 0.000000] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** [ 0.000000] ** ** [ 0.000000] ** trace_printk() being used. Allocating extra memory. ** [ 0.000000] ** ** [ 0.000000] ** This means that this is a DEBUG kernel and it is ** [ 0.000000] ** unsafe for production use. ** [ 0.000000] ** ** [ 0.000000] ** If you see this message and you are not debugging ** [ 0.000000] ** the kernel, report this immediately to your vendor! ** [ 0.000000] ** ** [ 0.000000] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** [ 0.000000] ********************************************************** [ 0.001000] Preemptible hierarchical RCU implementation. [ 0.001000] RCU event tracing is enabled. [ 0.001000] RCU debug extended QS entry/exit. [ 0.001000] RCU CPU stall warnings timeout set to 100 (rcu_cpu_stall_timeout). [ 0.001000] Tasks RCU enabled. [ 0.001000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.001000] CPU 0 irqstacks, hard=(ptrval) soft=(ptrval) [ 0.001000] console [ttyS0] enabled [ 0.001000] bootconsole [earlyser0] disabled [ 0.001000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.001000] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.001000] ... MAX_LOCK_DEPTH: 48 [ 0.001000] ... MAX_LOCKDEP_KEYS: 8191 [ 0.001000] ... CLASSHASH_SIZE: 4096 [ 0.001000] ... MAX_LOCKDEP_ENTRIES: 32768 [ 0.001000] ... MAX_LOCKDEP_CHAINS: 65536 [ 0.001000] ... CHAINHASH_SIZE: 32768 [ 0.001000] memory used by lock dependency info: 4383 kB [ 0.001000] per task-struct memory footprint: 1344 bytes [ 0.001000] ACPI: Core revision 20180313 [ 0.001000] ACPI: setting ELCR to 0200 (from 0c00) [ 0.001000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns [ 0.001000] hpet clockevent registered [ 0.001009] tsc: Detected 2925.998 MHz processor [ 0.001475] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2a2d3295deb, max_idle_ns: 440795332860 ns [ 0.002008] Calibrating delay loop (skipped) preset value.. 5851.99 BogoMIPS (lpj=2925998) [ 0.003006] pid_max: default: 32768 minimum: 301 [ 0.004027] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.004655] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.005332] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 0.006006] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 0.007005] CPU: Intel QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3) [ 0.007806] Spectre V2 : Vulnerable: Minimal generic ASM retpoline [ 0.008005] Spectre V2 : Spectre v2 mitigation: Filling RSB on context switch [ 0.009632] Performance Events: PMU not available due to virtualization, using software events only. [ 0.011082] Hierarchical SRCU implementation. [ 0.011658] NMI watchdog: Perf event create on CPU 0 failed with -2 [ 0.012006] NMI watchdog: Perf NMI watchdog permanently disabled [ 0.013238] devtmpfs: initialized [ 0.015894] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns [ 0.016011] futex hash table entries: 256 (order: 1, 11264 bytes) [ 0.017062] prandom: seed boundary self test passed [ 0.018484] prandom: 100 self tests passed [ 0.018881] pinctrl core: initialized pinctrl subsystem [ 0.019404] RTC time: 20:44:40, date: 04/16/18 [ 0.020188] NET: Registered protocol family 16 [ 0.021978] audit: initializing netlink subsys (disabled) [ 0.022296] EISA bus registered [ 0.023014] workqueue: round-robin CPU selection forced, expect performance impact [ 0.023768] audit: type=2000 audit(1523882680.447:1): state=initialized audit_enabled=0 res=1 [ 0.024059] cpuidle: using governor ladder [ 0.026043] ACPI: bus type PCI registered [ 0.026792] PCI: PCI BIOS revision 2.10 entry at 0xfd501, last bus=0 [ 0.027006] PCI: Using configuration type 1 for base access [ 0.073497] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages [ 0.074253] cryptd: max_cpu_qlen set to 1000 [ 0.074716] gpio-f7188x: Not a Fintek device at 0x0000002e [ 0.075047] gpio-f7188x: Not a Fintek device at 0x0000004e [ 0.076140] ACPI: Added _OSI(Module Device) [ 0.076541] ACPI: Added _OSI(Processor Device) [ 0.077007] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.077452] ACPI: Added _OSI(Processor Aggregator Device) [ 0.078009] ACPI: Added _OSI(Linux-Dell-Video) [ 0.082807] ACPI: 1 ACPI AML tables successfully acquired and loaded [ 0.086798] ACPI: Interpreter enabled [ 0.087036] ACPI: (supports S0 S3 S5) [ 0.087408] ACPI: Using PIC for interrupt routing [ 0.088036] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.089373] ACPI: Enabled 2 GPEs in block 00 to 0F [ 0.101397] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.102012] acpi PNP0A03:00: _OSC: OS supports [Segments] [ 0.102549] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM [ 0.103018] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. [ 0.104141] PCI host bridge to bus 0000:00 [ 0.104552] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] [ 0.105008] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] [ 0.106008] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] [ 0.106718] pci_bus 0000:00: root bus resource [mem 0x10000000-0xfebfffff window] [ 0.107010] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.108048] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 [ 0.109606] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 [ 0.111023] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 [ 0.114328] pci 0000:00:01.1: reg 0x20: [io 0xc040-0xc04f] [ 0.116343] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.117008] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.117670] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.118007] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.119417] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 [ 0.120343] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI [ 0.121016] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB [ 0.122478] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 [ 0.124629] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref] [ 0.127668] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff] [ 0.134746] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref] [ 0.136082] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000 [ 0.137463] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff] [ 0.138955] pci 0000:00:03.0: reg 0x14: [io 0xc000-0xc03f] [ 0.145467] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref] [ 0.146524] pci 0000:00:04.0: [8086:25ab] type 00 class 0x088000 [ 0.147576] pci 0000:00:04.0: reg 0x10: [mem 0xfebf1000-0xfebf100f] [ 0.152138] pci_bus 0000:00: on NUMA node 0 [ 0.153731] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) [ 0.154314] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) [ 0.155287] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) [ 0.156288] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) [ 0.157131] ACPI: PCI Interrupt Link [LNKS] (IRQs *9) [ 0.158914] pci 0000:00:02.0: vgaarb: setting as boot VGA device [ 0.159000] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.159008] pci 0000:00:02.0: vgaarb: bridge control possible [ 0.159561] vgaarb: loaded [ 0.160524] EDAC MC: Ver: 3.0.0 [ 0.161203] EDAC DEBUG: edac_mc_sysfs_init: device mc created [ 0.162429] FPGA manager framework [ 0.162789] PCI: Using ACPI for IRQ routing [ 0.163013] PCI: pci_cache_line_size set to 32 bytes [ 0.163619] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] [ 0.164010] e820: reserve RAM buffer [mem 0x0ffe0000-0x0fffffff] [ 0.165324] Bluetooth: Core ver 2.22 [ 0.165719] NET: Registered protocol family 31 [ 0.166015] Bluetooth: HCI device and connection manager initialized [ 0.166631] Bluetooth: HCI socket layer initialized [ 0.167015] Bluetooth: L2CAP socket layer initialized [ 0.168069] nfc: nfc_init: NFC Core ver 0.1 [ 0.168504] NET: Registered protocol family 39 [ 0.170061] clocksource: Switched to clocksource kvm-clock [ 0.183743] Warning: could not register annotated branches stats [ 0.228216] pnp: PnP ACPI init [ 0.228695] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.229472] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active) [ 0.230278] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active) [ 0.230989] pnp 00:03: [dma 2] [ 0.231358] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active) [ 0.232245] pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active) [ 0.233058] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.233869] pnp 00:06: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.235172] pnp: PnP ACPI: found 7 devices [ 0.270919] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.271860] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] [ 0.272450] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] [ 0.273064] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] [ 0.273717] pci_bus 0000:00: resource 7 [mem 0x10000000-0xfebfffff window] [ 0.274406] NET: Registered protocol family 2 [ 0.275169] tcp_listen_portaddr_hash hash table entries: 128 (order: 0, 5120 bytes) [ 0.276013] TCP established hash table entries: 2048 (order: 1, 8192 bytes) [ 0.276874] TCP bind hash table entries: 2048 (order: 4, 73728 bytes) [ 0.277880] TCP: Hash tables configured (established 2048 bind 2048) [ 0.278538] UDP hash table entries: 256 (order: 2, 20480 bytes) [ 0.279179] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes) [ 0.279868] NET: Registered protocol family 1 [ 0.280860] RPC: Registered named UNIX socket transport module. [ 0.281648] RPC: Registered udp transport module. [ 0.282313] RPC: Registered tcp transport module. [ 0.282874] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.284053] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 0.284997] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 0.285984] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 0.287047] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] [ 0.288445] PCI: CLS 0 bytes, default 32 [ 0.289323] Unpacking initramfs... [ 0.691059] Freeing initrd memory: 2812K [ 0.692337] apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac) [ 0.692944] apm: overridden by ACPI. [ 0.693874] cryptomgr_test (32) used greatest stack depth: 7424 bytes left [ 0.694553] PCLMULQDQ-NI instructions are not detected. [ 0.695104] The force parameter has not been set to 1. The Iris poweroff handler will not be installed. [ 0.696083] spin_lock-torture:--- Start of test [debug]: nwriters_stress=2 nreaders_stress=0 stat_interval=60 verbose=1 shuffle_interval=3 stutter=5 shutdown_secs=0 onoff_interval=0 onoff_holdoff=0 [ 0.697741] spin_lock-torture: Creating torture_shuffle task [ 0.698345] spin_lock-torture: Creating torture_stutter task [ 0.698926] spin_lock-torture: torture_shuffle task started [ 0.699478] spin_lock-torture: Creating lock_torture_writer task [ 0.700139] spin_lock-torture: torture_stutter task started [ 0.700673] spin_lock-torture: Creating lock_torture_writer task [ 0.701300] spin_lock-torture: lock_torture_writer task started [ 0.701872] spin_lock-torture: Creating lock_torture_stats task [ 0.702462] spin_lock-torture: lock_torture_writer task started [ 0.703105] torture_init_begin: Refusing rcu init: spin_lock running. [ 0.703707] torture_init_begin: One torture test at a time! [ 0.706033] spin_lock-torture: lock_torture_stats task started [ 0.707319] Initialise system trusted keyrings [ 0.707773] Key type blacklist registered [ 0.709099] workingset: timestamp_bits=30 max_order=16 bucket_order=0 [ 0.709695] zbud: loaded [ 0.710588] NFS: Registering the id_resolver key type [ 0.711121] Key type id_resolver registered [ 0.711503] Key type id_legacy registered [ 0.712383] Key type cifs.spnego registered [ 0.712790] fuse init (API version 7.26) [ 0.727112] NET: Registered protocol family 38 [ 0.727684] Key type asymmetric registered [ 0.924080] String selftests succeeded [ 0.924435] test_string_helpers: Running tests... [ 0.926539] test_hexdump: all 1184 tests passed [ 0.927015] [ 0.927015] Start testing find_bit() with random-filled bitmap [ 0.930633] find_next_bit: 2262809 ns, 164019 iterations [ 0.933711] find_next_zero_bit: 2241580 ns, 163662 iterations [ 0.936311] find_last_bit: 1165957 ns, 164018 iterations [ 1.697020] tsc: Refined TSC clocksource calibration: 2925.994 MHz [ 1.697602] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2a2d2ead42f, max_idle_ns: 440795314183 ns [ 1.841528] find_first_bit: 904460102 ns, 164019 iterations [ 1.842306] find_next_and_bit: 51811 cycles, 1 iterations [ 1.842909] [ 1.842909] Start testing find_bit() with sparse bitmap [ 1.843625] find_next_bit: 37586 ns, 656 iterations [ 1.848492] find_next_zero_bit: 4160674 ns, 327025 iterations [ 1.849202] find_last_bit: 20041 ns, 656 iterations [ 1.854170] find_first_bit: 4317191 ns, 656 iterations [ 1.854859] find_next_and_bit: 45414 cycles, 1 iterations [ 1.855543] test_firmware: interface ready [ 1.856279] Running rhashtable test nelem=8, max_size=0, shrinking=0 [ 1.856897] Test 00: [ 1.857200] Adding 50000 keys [ 1.939538] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 1.962566] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 1.963410] Deleting 50000 keys [ 1.998911] Duration of test: 141414658 ns [ 1.999365] Test 01: [ 1.999676] Adding 50000 keys [ 2.083822] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 2.107640] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 2.108439] Deleting 50000 keys [ 2.141674] Duration of test: 141644055 ns [ 2.142129] Test 02: [ 2.142377] Adding 50000 keys [ 2.224938] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 2.246349] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 2.247202] Deleting 50000 keys [ 2.281737] Duration of test: 139033256 ns [ 2.282205] Test 03: [ 2.282459] Adding 50000 keys [ 2.364279] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 2.387683] Traversal complete: counted=50000, nelems=50000, entries=50000, table-jumps=0 [ 2.388478] Deleting 50000 keys [ 2.420742] Duration of test: 137951130 ns [ 2.433933] test if its possible to exceed max_size 8192: no, ok [ 2.434601] Average test time: 140010774 [ 2.435073] test inserting duplicates [ 2.435431] [ 2.435431] ---- ht: ---- [ 2.435431] bucket[1] -> [[ val 1 (tid=0) ]] -> [[ val 21 (tid=1) ]] [ 2.435431] ------------- [ 2.436701] [ 2.436701] ---- ht: ---- [ 2.436701] bucket[1] -> [[ val 1 (tid=2), val 1 (tid=0) ]] -> [[ val 21 (tid=1) ]] [ 2.436701] ------------- [ 2.438979] [ 2.438979] ---- ht: ---- [ 2.438979] bucket[1] -> [[ val 21 (tid=1) ]] -> [[ val 1 (tid=0) ]] [ 2.438979] ------------- [ 2.440225] [ 2.440225] ---- ht: ---- [ 2.440225] bucket[1] -> [[ val 21 (tid=1) ]] -> [[ val 1 (tid=2), val 1 (tid=0) ]] [ 2.440225] ------------- [ 2.441626] Testing concurrent rhashtable access from 10 threads [ 5.434093] rhashtable_thra (121) used greatest stack depth: 7236 bytes left [ 5.439994] rhashtable_thra (126) used greatest stack depth: 7116 bytes left [ 5.440910] rhashtable_thra (122) used greatest stack depth: 7100 bytes left [ 5.443974] test 3125 add/delete pairs into rhlist [ 5.522623] test 3125 random rhlist add/delete operations [ 5.543581] Started 10 threads, 0 failed, rhltable test returns 0 [ 5.544402] test_printf: all 240 tests passed [ 5.545014] xz_dec_test: module loaded [ 5.545387] xz_dec_test: Create a device node with 'mknod xz_dec_test c 250 0' and write .xz files to it. [ 5.547243] glob: 64 self-tests passed, 0 failed [ 5.548680] hgafb: HGA card not detected. [ 5.549126] hgafb: probe of hgafb.0 failed with error -22 [ 5.550128] uvesafb: failed to execute /sbin/v86d [ 5.550590] uvesafb: make sure that the v86d helper is installed and executable [ 5.551375] uvesafb: Getting VBE info block failed (eax=0x4f00, err=-2) [ 5.552101] uvesafb: vbe_init() failed with -22 [ 5.552551] uvesafb: probe of uvesafb.0 failed with error -22 [ 5.553218] intel_idle: does not run on family 6 model 6 [ 5.553748] ipmi message handler version 39.2 [ 5.554245] ipmi device interface [ 5.554591] IPMI System Interface driver. [ 5.555189] ipmi_si: Unable to find any System Interface(s) [ 5.555754] IPMI SSIF Interface driver [ 5.557134] IPMI Watchdog: driver initialized [ 5.557566] Copyright (C) 2004 MontaVista Software - IPMI Powerdown via sys_reboot. [ 5.559200] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 [ 5.560078] ACPI: Power Button [PWRF] [ 5.560532] Warning: Processor Platform Limit event detected, but not handled. [ 5.561295] Consider compiling CPUfreq support into your kernel. [ 5.621163] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 5.647016] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 5.671016] 00:06: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 5.673459] lp: driver loaded but no devices found [ 5.674036] DoubleTalk PC - not found [ 5.674474] toshiba: not a supported Toshiba laptop [ 5.675276] ppdev: user-space parallel port driver [ 5.675844] platform pc8736x_gpio.0: NatSemi pc8736x GPIO Driver Initializing [ 5.676544] platform pc8736x_gpio.0: no device found [ 5.677123] nsc_gpio initializing [ 5.677453] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds). [ 5.679297] parport_pc 00:04: reported by Plug and Play ACPI [ 5.680085] parport0: PC-style at 0x378, irq 7 [PCSPP(,...)] [ 5.680873] lp0: using parport0 (interrupt-driven). [ 5.683282] dummy-irq: no IRQ given. Use irq=N [ 5.683760] Silicon Labs C2 port support v. 0.51.0 - (C) 2007 Rodolfo Giometti [ 5.684634] c2port c2port0: C2 port uc added [ 5.685084] c2port c2port0: uc flash has 30 blocks x 512 bytes (15360 bytes total) [ 5.686764] mtdoops: mtd device (mtddev=name/number) must be supplied [ 5.687450] platform physmap-flash.0: failed to claim resource 0: [mem 0x08000000-0x07ffffff] [ 5.688386] slram: not enough parameters. [ 5.721007] No valid DiskOnChip devices found [ 5.721511] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 5.722419] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 5.723346] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 5.724267] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 5.725171] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 5.726079] [nandsim] warning: read_byte: unexpected data output cycle, state is STATE_READY return 0x0 [ 5.726965] nand: device found, Manufacturer ID: 0x98, Chip ID: 0x39 [ 5.727572] nand: Toshiba NAND 128MiB 1,8V 8-bit [ 5.728054] nand: 128 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16 [ 5.728771] flash size: 128 MiB [ 5.729103] page size: 512 bytes [ 5.729419] OOB area size: 16 bytes [ 5.729747] sector size: 16 KiB [ 5.730080] pages number: 262144 [ 5.730398] pages per sector: 32 [ 5.730712] bus width: 8 [ 5.730954] bits in sector size: 14 [ 5.731313] bits in page size: 9 [ 5.731616] bits in OOB size: 4 [ 5.731930] flash size with OOB: 135168 KiB [ 5.732359] page address bytes: 4 [ 5.732686] sector address bytes: 3 [ 5.733050] options: 0x42 [ 5.734098] Scanning device for bad blocks [ 5.755639] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit": [ 5.756418] 0x000000000000-0x000008000000 : "NAND simulator partition 0" [ 5.762567] [nandsim] warning: CONFIG_MTD_PARTITIONED_MASTER must be enabled to expose debugfs stuff [ 5.763836] LocalTalk card not found; 220 = ff, 240 = ff. [ 5.765340] mdio_bus fixed-0: GPIO lookup for consumer reset [ 5.765878] mdio_bus fixed-0: using lookup tables for GPIO lookup [ 5.766491] mdio_bus fixed-0: No GPIO consumer reset found [ 5.767186] libphy: Fixed MDIO Bus: probed [ 5.768454] ipddp.c:v0.01 8/28/97 Bradford W. Johnson [ 5.769639] ipddp0: Appletalk-IP Encap. mode by Bradford W. Johnson [ 5.770477] vcan: Virtual CAN interface driver [ 5.770917] vxcan: Virtual CAN Tunnel driver [ 5.771994] CAN device driver interface [ 5.772396] cc770: CAN netdevice driver [ 5.772762] cc770_isa: insufficient parameters supplied [ 5.773326] sja1000 CAN netdevice driver [ 5.774653] dsa-loop fixed-0:1f: DSA mockup driver: 0x1f [ 5.814164] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 5.814828] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 6.035494] PCI Interrupt Link [LNKC] enabled at IRQ 11 [ 6.036053] PCI: setting IRQ 11 as level-triggered [ 6.364253] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56 [ 6.364943] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection [ 6.365643] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 6.366222] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 6.366815] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k [ 6.367469] igb: Copyright (c) 2007-2014 Intel Corporation. [ 6.368062] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 5.1.0-k [ 6.368789] ixgbe: Copyright (c) 1999-2016 Intel Corporation. [ 6.370138] atp.c:v1.09=ac 2002/10/01 Donald Becker [ 6.370944] AX.25: Z8530 SCC driver version 3.0.dl1bke [ 6.371841] AX.25: bpqether driver version 004 [ 6.372286] baycom_ser_fdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA [ 6.372286] baycom_ser_fdx: version 0.10 [ 6.374663] hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA [ 6.375237] hdlcdrv: version 0.8 [ 6.375550] baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA [ 6.375550] baycom_par: version 0.9 [ 6.378454] NET3 PLIP version 2.4-parport gniibe at mri.co.jp [ 6.379033] plip0: Parallel port at 0x378, using IRQ 7. [ 6.379530] PPP generic driver version 2.4.2 [ 6.380124] PPP BSD Compression module registered [ 6.380583] PPP MPPE Compression module registered [ 6.381079] NET: Registered protocol family 24 [ 6.381515] DLCI driver v0.35, 4 Jan 1997, mike.mclagan at linux.org. [ 6.383969] SDLA driver v0.30, 12 Sep 1996, mike.mclagan at linux.org. [ 6.385162] Broadcom 43xx driver loaded [ Features: PNLS ] [ 6.385756] Broadcom 43xx-legacy driver loaded [ Features: PLI ] [ 6.491798] panel: panel driver registered on parport0 (io=0x378). [ 6.492528] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 [ 6.494149] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 6.494996] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 6.496407] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1 [ 6.499144] i2c-parport: adapter type unspecified [ 6.499596] i2c-parport-light: adapter type unspecified [ 6.500844] isa i2c-pca-isa.0: Please specify I/O base [ 6.501486] Driver for 1-wire Dallas network protocol. [ 6.502082] DS1WM w1 busmaster driver - (c) 2004 Szabolcs Gyurko [ 6.502715] w1_f0d_init() [ 6.503451] intel_powerclamp: CPU does not support MWAIT [ 6.504519] mixcomwd: No card detected, or port not available [ 6.505169] acquirewdt: WDT driver for Acquire single board computer initialising [ 6.506109] acquirewdt: I/O address 0x0043 already in use [ 6.506634] acquirewdt: probe of acquirewdt failed with error -5 [ 6.507330] ib700wdt: WDT driver for IB700 single board computer initialising [ 6.508402] wafer5823wdt: WDT driver for Wafer 5823 single board computer initialising [ 6.509204] wafer5823wdt: I/O address 0x0443 already in use [ 6.509798] it87_wdt: no device [ 6.510156] sc1200wdt: build 20020303 [ 6.510529] sc1200wdt: io parameter must be specified [ 6.511065] sbc8360: failed to register misc device [ 6.511532] sbc7240_wdt: I/O address 0x0443 already in use [ 6.512995] cpu5wdt: misc_register failed [ 6.513384] w83877f_wdt: I/O address 0x0443 already in use [ 6.513902] w83977f_wdt: driver v1.00 [ 6.514288] w83977f_wdt: cannot register miscdev on minor=130 (err=-16) [ 6.514932] machzwd: MachZ ZF-Logic Watchdog driver initializing [ 6.515512] machzwd: no ZF-Logic found [ 6.516003] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 6.516772] CAPI 2.0 started up with major 68 (no middleware) [ 6.517342] Modular ISDN core version 1.1.29 [ 6.517921] NET: Registered protocol family 34 [ 6.518373] DSP module 2.0 [ 6.518651] mISDN_dsp: DSP clocks every 64 samples. This equals 8 jiffies. [ 6.520241] mISDN: Layer-1-over-IP driver Rev. 2.00 [ 6.520886] 0 virtual devices registered [ 6.521298] sdhci: Secure Digital Host Controller Interface driver [ 6.521893] sdhci: Copyright(c) Pierre Ossman [ 6.523004] sdhci-pltfm: SDHCI platform and OF driver helper [ 6.524361] ledtrig-cpu: registered to indicate activity on CPUs [ 6.527658] NET: Registered protocol family 4 [ 6.528191] comedi: version 0.7.76 - http://www.comedi.org [ 6.528851] LNetError: 1:0:(module.c:546:libcfs_init()) misc_register: error -16 [ 7.220272] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3 [ 7.586283] BUG: unable to handle kernel NULL pointer dereference at 00000050 [ 7.586962] *pdpt = 0000000000000000 *pde = f000ff53f000ff53 [ 7.587002] Oops: 0000 [#1] PREEMPT [ 7.587002] CPU: 0 PID: 1 Comm: swapper Not tainted 4.17.0-rc1 #1 [ 7.587002] EIP: cfs_trace_lock_tcd+0xb/0xa0 [ 7.587002] EFLAGS: 00210246 CPU: 0 [ 7.587002] EAX: 00000000 EBX: 00000000 ECX: 81fcb588 EDX: 00000000 [ 7.587002] ESI: 00001800 EDI: 8f5d1e08 EBP: 8f5d1d7c ESP: 8f5d1d70 [ 7.587002] DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068 [ 7.587002] CR0: 80050033 CR2: 00000050 CR3: 022f0000 CR4: 000006b0 [ 7.587002] Call Trace: [ 7.587002] libcfs_debug_vmsg2+0x8f/0x82f [ 7.587002] ? trace_irq_enable_rcuidle+0x25/0x62 [ 7.587002] ? slob_free+0x249/0x251 [ 7.587002] libcfs_debug_msg+0x19/0x1b [ 7.587002] ksocknal_startup+0xe77/0x12b2 [ 7.587002] ? lock_release+0x135/0x1ec [ 7.587002] ? _raw_spin_unlock+0x3c/0x4b [ 7.587002] lnet_startup_lndni+0x4cd/0x9ec [ 7.587002] LNetNIInit+0x880/0xa00 [ 7.587002] ? read_seqcount_retry+0x1b/0x22 [ 7.587002] srpc_startup+0x84/0x381 [ 7.587002] lnet_selftest_init+0x2c4/0x5d9 [ 7.587002] ? lnet_selftest_exit+0x8d/0x8d [ 7.587002] do_one_initcall+0x76/0x1d7 [ 7.587002] ? do_early_param+0x78/0x78 [ 7.587002] ? rcu_read_unlock_sched_notrace+0x1e/0x2d [ 7.587002] ? trace_initcall_level+0x3e/0x64 [ 7.587002] kernel_init_freeable+0xfc/0x177 [ 7.587002] ? rest_init+0xbe/0xbe [ 7.587002] kernel_init+0xd/0xd0 [ 7.587002] ret_from_fork+0x2e/0x38 [ 7.587002] Code: 16 94 ff 8b 15 68 ab 03 82 f7 c2 00 00 0f 00 b8 02 00 00 00 75 08 31 c0 80 e6 ff 0f 95 c0 5d c3 55 89 e5 57 56 53 e8 99 16 94 ff <8b> 78 50 89 d6 6a 00 31 d2 89 c3 b8 50 f0 1b 82 66 83 ff 02 0f [ 7.587002] EIP: cfs_trace_lock_tcd+0xb/0xa0 SS:ESP: 0068:8f5d1d70 [ 7.587002] CR2: 0000000000000050 [ 7.587002] ---[ end trace 4fbdcb515c61525e ]--- [ 7.587002] Kernel panic - not syncing: Fatal exception [ 7.587002] Kernel Offset: disabled Elapsed time: 10 #!/bin/bash # To reproduce, # 1) save job-script and this script (both are attached in 0day report email) # 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH kernel=$1 initrds=( /osimage/yocto/yocto-tiny-i386-2016-04-22.cgz /lkp/lkp/lkp-i386.cgz /osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig.i386_2016-09-03.cgz ) HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}" { cat "${initrds[@]//*\//}" [[ $INSTALL_MOD_PATH ]] && ( cd "$INSTALL_MOD_PATH" find lib | cpio -o -H newc --quiet | gzip ) echo job-script | cpio -o -H newc --quiet | gzip } > initrd.img kvm=( qemu-system-i386 -enable-kvm -kernel $kernel -initrd initrd.img -m 256 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial stdio -display none -monitor null ) append=( ip=::::vm-lkp-nhm-dp1-yocto-i386-7::dhcp root=/dev/ram0 user=lkp job=/job-script ARCH=i386 kconfig=i386-randconfig-s1-201814 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp1-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/0 result_service=tmpfs debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.minor_count=8 rcuperf.shutdown=0 ) "${kvm[@]}" -append "${append[*]}" -------------- next part -------------- # # Automatically generated file; DO NOT EDIT. # Linux/i386 4.17.0-rc1 Kernel Configuration # CONFIG_X86_32=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf32-i386" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_MMU=y CONFIG_ARCH_MMAP_RND_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_BITS_MAX=16 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=3 CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # # General setup # CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y # CONFIG_KERNEL_GZIP is not set # CONFIG_KERNEL_BZIP2 is not set CONFIG_KERNEL_LZMA=y # CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZ4 is not set CONFIG_DEFAULT_HOSTNAME="(none)" # CONFIG_SYSVIPC is not set # CONFIG_POSIX_MQUEUE is not set CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_USELIB=y CONFIG_AUDIT=y CONFIG_HAVE_ARCH_AUDITSYSCALL=y CONFIG_AUDITSYSCALL=y CONFIG_AUDIT_WATCH=y CONFIG_AUDIT_TREE=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_GENERIC_CMOS_UPDATE=y # # Timers subsystem # CONFIG_HZ_PERIODIC=y # CONFIG_NO_HZ_IDLE is not set # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set # # CPU/Task time and stats accounting # CONFIG_TICK_CPU_ACCOUNTING=y # CONFIG_IRQ_TIME_ACCOUNTING is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set # # RCU Subsystem # CONFIG_PREEMPT_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_SRCU=y CONFIG_TREE_SRCU=y CONFIG_TASKS_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=20 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y CONFIG_CGROUPS=y # CONFIG_MEMCG is not set CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y # CONFIG_CFS_BANDWIDTH is not set # CONFIG_RT_GROUP_SCHED is not set CONFIG_CGROUP_PIDS=y # CONFIG_CGROUP_RDMA is not set CONFIG_CGROUP_FREEZER=y # CONFIG_CGROUP_HUGETLB is not set # CONFIG_CGROUP_DEVICE is not set # CONFIG_CGROUP_CPUACCT is not set # CONFIG_CGROUP_PERF is not set # CONFIG_CGROUP_BPF is not set # CONFIG_CGROUP_DEBUG is not set CONFIG_SOCK_CGROUP_DATA=y # CONFIG_NAMESPACES is not set CONFIG_SCHED_AUTOGROUP=y # CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y # CONFIG_RD_LZMA is not set # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set CONFIG_RD_LZ4=y # CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y CONFIG_BPF=y CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_MULTIUSER=y CONFIG_SGETMASK_SYSCALL=y # CONFIG_SYSFS_SYSCALL is not set # CONFIG_SYSCTL_SYSCALL is not set CONFIG_FHANDLE=y # CONFIG_POSIX_TIMERS is not set CONFIG_PRINTK=y CONFIG_PRINTK_NMI=y CONFIG_BUG=y CONFIG_ELF_CORE=y # CONFIG_PCSPKR_PLATFORM is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_FUTEX_PI=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y # CONFIG_EVENTFD is not set CONFIG_SHMEM=y CONFIG_AIO=y # CONFIG_ADVISE_SYSCALLS is not set # CONFIG_MEMBARRIER is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y CONFIG_USERFAULTFD=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_PERF_USE_VMALLOC=y # CONFIG_PC104 is not set # # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y CONFIG_DEBUG_PERF_USE_VMALLOC=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_COMPAT_BRK=y # CONFIG_SLAB is not set # CONFIG_SLUB is not set CONFIG_SLOB=y CONFIG_SLAB_MERGE_DEFAULT=y # CONFIG_PROFILING is not set CONFIG_TRACEPOINTS=y CONFIG_CRASH_CORE=y CONFIG_KEXEC_CORE=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y # CONFIG_JUMP_LABEL is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_RCU_TABLE_FREE=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_GCC_PLUGINS=y # CONFIG_GCC_PLUGINS is not set CONFIG_HAVE_CC_STACKPROTECTOR=y # CONFIG_CC_STACKPROTECTOR_NONE is not set # CONFIG_CC_STACKPROTECTOR_REGULAR is not set CONFIG_CC_STACKPROTECTOR_STRONG=y # CONFIG_CC_STACKPROTECTOR_AUTO is not set CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARCH_HUGE_VMAP=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_HAVE_ARCH_MMAP_RND_BITS=y CONFIG_HAVE_EXIT_THREAD=y CONFIG_ARCH_MMAP_RND_BITS=8 CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_ISA_BUS_API=y CONFIG_CLONE_BACKWARDS=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_OLD_SIGACTION=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_ARCH_HAS_REFCOUNT=y # CONFIG_REFCOUNT_FULL is not set # # GCOV-based kernel profiling # # CONFIG_GCOV_KERNEL is not set CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 # CONFIG_MODULES is not set CONFIG_MODULES_TREE_LOOKUP=y # CONFIG_BLOCK is not set CONFIG_ASN1=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y CONFIG_FREEZER=y # # Processor type and features # CONFIG_ZONE_DMA=y # CONFIG_SMP is not set CONFIG_X86_FEATURE_NAMES=y CONFIG_GOLDFISH=y CONFIG_RETPOLINE=y CONFIG_INTEL_RDT=y CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_GOLDFISH is not set # CONFIG_X86_INTEL_LPSS is not set # CONFIG_X86_AMD_PLATFORM_DEVICE is not set # CONFIG_IOSF_MBI is not set CONFIG_X86_RDC321X=y CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_X86_32_IRIS=y # CONFIG_SCHED_OMIT_FRAME_POINTER is not set CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_DEBUG is not set CONFIG_KVM_GUEST=y # CONFIG_KVM_DEBUG_FS is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set CONFIG_PARAVIRT_CLOCK=y CONFIG_NO_BOOTMEM=y # CONFIG_M486 is not set # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set CONFIG_MPENTIUMII=y # CONFIG_MPENTIUMIII is not set # CONFIG_MPENTIUMM is not set # CONFIG_MPENTIUM4 is not set # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MELAN is not set # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set # CONFIG_MCORE2 is not set # CONFIG_MATOM is not set CONFIG_X86_GENERIC=y CONFIG_X86_INTERNODE_CACHE_SHIFT=6 CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_TSC=y CONFIG_X86_CMPXCHG64=y CONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=6 CONFIG_X86_DEBUGCTLMSR=y CONFIG_PROCESSOR_SELECT=y CONFIG_CPU_SUP_INTEL=y # CONFIG_CPU_SUP_CYRIX_32 is not set CONFIG_CPU_SUP_AMD=y # CONFIG_CPU_SUP_CENTAUR is not set CONFIG_CPU_SUP_TRANSMETA_32=y CONFIG_CPU_SUP_UMC_32=y CONFIG_HPET_TIMER=y # CONFIG_DMI is not set CONFIG_SWIOTLB=y CONFIG_IOMMU_HELPER=y CONFIG_NR_CPUS_RANGE_BEGIN=1 CONFIG_NR_CPUS_RANGE_END=1 CONFIG_NR_CPUS_DEFAULT=1 CONFIG_NR_CPUS=1 # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y # CONFIG_X86_UP_APIC is not set CONFIG_X86_MCE=y # CONFIG_X86_MCELOG_LEGACY is not set # CONFIG_X86_ANCIENT_MCE is not set # # Performance monitoring # CONFIG_PERF_EVENTS_INTEL_UNCORE=y CONFIG_PERF_EVENTS_INTEL_RAPL=y CONFIG_PERF_EVENTS_INTEL_CSTATE=y CONFIG_PERF_EVENTS_AMD_POWER=y CONFIG_X86_LEGACY_VM86=y CONFIG_VM86=y # CONFIG_X86_16BIT is not set CONFIG_TOSHIBA=y # CONFIG_I8K is not set CONFIG_X86_REBOOTFIXUPS=y # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set CONFIG_NOHIGHMEM=y # CONFIG_HIGHMEM4G is not set # CONFIG_HIGHMEM64G is not set # CONFIG_VMSPLIT_3G is not set CONFIG_VMSPLIT_2G=y # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0x80000000 CONFIG_X86_PAE=y CONFIG_ARCH_PHYS_ADDR_T_64BIT=y CONFIG_ARCH_HAS_MEM_ENCRYPT=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ILLEGAL_POINTER_VALUE=0 CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y # CONFIG_SPARSEMEM_MANUAL is not set CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_GENERIC_GUP=y CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_MEMORY_ISOLATION=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y CONFIG_COMPACTION=y CONFIG_MIGRATION=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_VIRT_TO_BUS=y CONFIG_MMU_NOTIFIER=y CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y CONFIG_MEMORY_FAILURE=y # CONFIG_HWPOISON_INJECT is not set CONFIG_TRANSPARENT_HUGEPAGE=y # CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y CONFIG_TRANSPARENT_HUGE_PAGECACHE=y CONFIG_NEED_PER_CPU_KM=y # CONFIG_CLEANCACHE is not set CONFIG_CMA=y CONFIG_CMA_DEBUG=y CONFIG_CMA_DEBUGFS=y CONFIG_CMA_AREAS=7 # CONFIG_ZPOOL is not set CONFIG_ZBUD=y CONFIG_ZSMALLOC=y CONFIG_PGTABLE_MAPPING=y CONFIG_ZSMALLOC_STAT=y CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_IDLE_PAGE_TRACKING is not set # CONFIG_PERCPU_STATS is not set CONFIG_GUP_BENCHMARK=y # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_X86_RESERVE_LOW=64 CONFIG_MATH_EMULATION=y # CONFIG_MTRR is not set # CONFIG_ARCH_RANDOM is not set CONFIG_X86_SMAP=y CONFIG_X86_INTEL_UMIP=y # CONFIG_EFI is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 CONFIG_KEXEC=y CONFIG_PHYSICAL_START=0x1000000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 # CONFIG_COMPAT_VDSO is not set # CONFIG_CMDLINE_BOOL is not set CONFIG_MODIFY_LDT_SYSCALL=y # # Power management and ACPI options # CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y # CONFIG_SUSPEND_SKIP_SYNC is not set CONFIG_PM_SLEEP=y CONFIG_PM_AUTOSLEEP=y # CONFIG_PM_WAKELOCKS is not set CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y CONFIG_PM_SLEEP_DEBUG=y CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y CONFIG_PM_CLK=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set CONFIG_ACPI=y CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y # CONFIG_ACPI_DEBUGGER is not set CONFIG_ACPI_SPCR_TABLE=y CONFIG_ACPI_SLEEP=y # CONFIG_ACPI_PROCFS_POWER is not set CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y # CONFIG_ACPI_EC_DEBUGFS is not set CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_FAN=y # CONFIG_ACPI_TAD is not set # CONFIG_ACPI_DOCK is not set CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y CONFIG_ACPI_PROCESSOR_IDLE=y CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_IPMI=y # CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set CONFIG_ACPI_THERMAL=y CONFIG_ACPI_CUSTOM_DSDT_FILE="" CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_TABLE_UPGRADE=y # CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_PCI_SLOT is not set # CONFIG_ACPI_CONTAINER is not set # CONFIG_ACPI_SBS is not set # CONFIG_ACPI_HED is not set # CONFIG_ACPI_CUSTOM_METHOD is not set # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y # CONFIG_ACPI_APEI is not set # CONFIG_DPTF_POWER is not set # CONFIG_PMIC_OPREGION is not set # CONFIG_ACPI_CONFIGFS is not set CONFIG_X86_PM_TIMER=y CONFIG_SFI=y CONFIG_X86_APM_BOOT=y CONFIG_APM=y CONFIG_APM_IGNORE_USER_SUSPEND=y # CONFIG_APM_DO_ENABLE is not set # CONFIG_APM_CPU_IDLE is not set CONFIG_APM_DISPLAY_BLANK=y CONFIG_APM_ALLOW_INTS=y # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set # # CPU Idle # CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y # CONFIG_CPU_IDLE_GOV_MENU is not set CONFIG_INTEL_IDLE=y # # Bus options (PCI etc.) # CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_DOMAINS=y # CONFIG_PCI_CNB20LE_QUIRK is not set # CONFIG_PCIEPORTBUS is not set # CONFIG_PCI_MSI is not set CONFIG_PCI_QUIRKS=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_STUB is not set CONFIG_PCI_LOCKLESS_CONFIG=y # CONFIG_PCI_IOV is not set # CONFIG_PCI_PRI is not set # CONFIG_PCI_PASID is not set CONFIG_PCI_LABEL=y # CONFIG_HOTPLUG_PCI is not set # # Cadence PCIe controllers support # # # DesignWare PCI Core Support # # # PCI host controller drivers # # # PCI Endpoint # CONFIG_PCI_ENDPOINT=y # CONFIG_PCI_ENDPOINT_CONFIGFS is not set CONFIG_PCI_EPF_TEST=y # # PCI switch controller drivers # # CONFIG_PCI_SW_SWITCHTEC is not set # CONFIG_ISA_BUS is not set CONFIG_ISA_DMA_API=y CONFIG_ISA=y CONFIG_EISA=y # CONFIG_EISA_VLB_PRIMING is not set CONFIG_EISA_PCI_EISA=y # CONFIG_EISA_VIRTUAL_ROOT is not set CONFIG_EISA_NAMES=y # CONFIG_SCx200 is not set CONFIG_ALIX=y CONFIG_NET5501=y CONFIG_AMD_NB=y CONFIG_PCCARD=y # CONFIG_PCMCIA is not set CONFIG_CARDBUS=y # # PC-card bridges # # CONFIG_YENTA is not set CONFIG_PCMCIA_PROBE=y # CONFIG_RAPIDIO is not set CONFIG_X86_SYSFB=y # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y CONFIG_ELFCORE=y CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y CONFIG_BINFMT_SCRIPT=y CONFIG_HAVE_AOUT=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set CONFIG_COREDUMP=y CONFIG_COMPAT_32=y CONFIG_HAVE_ATOMIC_IOMAP=y CONFIG_NET=y CONFIG_NET_INGRESS=y # # Networking options # # CONFIG_PACKET is not set CONFIG_UNIX=y # CONFIG_UNIX_DIAG is not set CONFIG_TLS=y CONFIG_XFRM=y CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=y CONFIG_XFRM_USER=y CONFIG_XFRM_SUB_POLICY=y CONFIG_XFRM_MIGRATE=y # CONFIG_XFRM_STATISTICS is not set CONFIG_XFRM_IPCOMP=y # CONFIG_NET_KEY is not set # CONFIG_SMC is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_ROUTE_CLASSID=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set CONFIG_NET_IPIP=y # CONFIG_NET_IPGRE_DEMUX is not set CONFIG_NET_IP_TUNNEL=y CONFIG_IP_MROUTE_COMMON=y CONFIG_SYN_COOKIES=y CONFIG_NET_IPVTI=y CONFIG_NET_UDP_TUNNEL=y CONFIG_NET_FOU=y # CONFIG_NET_FOU_IP_TUNNELS is not set # CONFIG_INET_AH is not set CONFIG_INET_ESP=y CONFIG_INET_ESP_OFFLOAD=y # CONFIG_INET_IPCOMP is not set CONFIG_INET_TUNNEL=y # CONFIG_INET_XFRM_MODE_TRANSPORT is not set CONFIG_INET_XFRM_MODE_TUNNEL=y # CONFIG_INET_XFRM_MODE_BEET is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_INET_UDP_DIAG is not set # CONFIG_INET_RAW_DIAG is not set # CONFIG_INET_DIAG_DESTROY is not set CONFIG_TCP_CONG_ADVANCED=y CONFIG_TCP_CONG_BIC=y # CONFIG_TCP_CONG_CUBIC is not set # CONFIG_TCP_CONG_WESTWOOD is not set # CONFIG_TCP_CONG_HTCP is not set CONFIG_TCP_CONG_HSTCP=y # CONFIG_TCP_CONG_HYBLA is not set CONFIG_TCP_CONG_VEGAS=y CONFIG_TCP_CONG_NV=y CONFIG_TCP_CONG_SCALABLE=y CONFIG_TCP_CONG_LP=y CONFIG_TCP_CONG_VENO=y CONFIG_TCP_CONG_YEAH=y CONFIG_TCP_CONG_ILLINOIS=y CONFIG_TCP_CONG_DCTCP=y # CONFIG_TCP_CONG_CDG is not set CONFIG_TCP_CONG_BBR=y # CONFIG_DEFAULT_BIC is not set # CONFIG_DEFAULT_VEGAS is not set CONFIG_DEFAULT_VENO=y # CONFIG_DEFAULT_DCTCP is not set # CONFIG_DEFAULT_BBR is not set # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_TCP_CONG="veno" # CONFIG_TCP_MD5SIG is not set CONFIG_IPV6=y CONFIG_IPV6_ROUTER_PREF=y # CONFIG_IPV6_ROUTE_INFO is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set CONFIG_INET6_AH=y # CONFIG_INET6_ESP is not set CONFIG_INET6_IPCOMP=y CONFIG_IPV6_MIP6=y # CONFIG_IPV6_ILA is not set CONFIG_INET6_XFRM_TUNNEL=y CONFIG_INET6_TUNNEL=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set CONFIG_INET6_XFRM_MODE_TUNNEL=y # CONFIG_INET6_XFRM_MODE_BEET is not set CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y CONFIG_IPV6_VTI=y # CONFIG_IPV6_SIT is not set CONFIG_IPV6_TUNNEL=y CONFIG_IPV6_FOU=y CONFIG_IPV6_MULTIPLE_TABLES=y # CONFIG_IPV6_SUBTREES is not set CONFIG_IPV6_MROUTE=y CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y # CONFIG_IPV6_PIMSM_V2 is not set CONFIG_IPV6_SEG6_LWTUNNEL=y # CONFIG_IPV6_SEG6_HMAC is not set CONFIG_NETWORK_SECMARK=y # CONFIG_NETWORK_PHY_TIMESTAMPING is not set CONFIG_NETFILTER=y CONFIG_NETFILTER_ADVANCED=y # # Core Netfilter Configuration # CONFIG_NETFILTER_INGRESS=y CONFIG_NETFILTER_NETLINK=y CONFIG_NETFILTER_FAMILY_ARP=y CONFIG_NETFILTER_NETLINK_ACCT=y CONFIG_NETFILTER_NETLINK_QUEUE=y CONFIG_NETFILTER_NETLINK_LOG=y CONFIG_NF_CONNTRACK=y CONFIG_NF_LOG_COMMON=y # CONFIG_NF_LOG_NETDEV is not set CONFIG_NETFILTER_CONNCOUNT=y CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_CONNTRACK_EVENTS is not set CONFIG_NF_CONNTRACK_TIMEOUT=y CONFIG_NF_CONNTRACK_TIMESTAMP=y CONFIG_NF_CONNTRACK_LABELS=y CONFIG_NF_CT_PROTO_DCCP=y CONFIG_NF_CT_PROTO_GRE=y # CONFIG_NF_CT_PROTO_SCTP is not set # CONFIG_NF_CT_PROTO_UDPLITE is not set # CONFIG_NF_CONNTRACK_AMANDA is not set CONFIG_NF_CONNTRACK_FTP=y CONFIG_NF_CONNTRACK_H323=y CONFIG_NF_CONNTRACK_IRC=y CONFIG_NF_CONNTRACK_BROADCAST=y CONFIG_NF_CONNTRACK_NETBIOS_NS=y # CONFIG_NF_CONNTRACK_SNMP is not set CONFIG_NF_CONNTRACK_PPTP=y CONFIG_NF_CONNTRACK_SANE=y CONFIG_NF_CONNTRACK_SIP=y # CONFIG_NF_CONNTRACK_TFTP is not set # CONFIG_NF_CT_NETLINK is not set # CONFIG_NF_CT_NETLINK_TIMEOUT is not set CONFIG_NF_NAT=y CONFIG_NF_NAT_NEEDED=y CONFIG_NF_NAT_PROTO_DCCP=y CONFIG_NF_NAT_FTP=y CONFIG_NF_NAT_IRC=y CONFIG_NF_NAT_SIP=y CONFIG_NF_NAT_REDIRECT=y CONFIG_NETFILTER_SYNPROXY=y CONFIG_NF_TABLES=y CONFIG_NF_TABLES_INET=y CONFIG_NF_TABLES_NETDEV=y # CONFIG_NFT_EXTHDR is not set CONFIG_NFT_META=y CONFIG_NFT_RT=y CONFIG_NFT_NUMGEN=y CONFIG_NFT_CT=y CONFIG_NFT_SET_RBTREE=y CONFIG_NFT_SET_HASH=y CONFIG_NFT_SET_BITMAP=y # CONFIG_NFT_COUNTER is not set CONFIG_NFT_LOG=y CONFIG_NFT_LIMIT=y CONFIG_NFT_MASQ=y CONFIG_NFT_REDIR=y CONFIG_NFT_NAT=y # CONFIG_NFT_OBJREF is not set CONFIG_NFT_QUEUE=y # CONFIG_NFT_QUOTA is not set CONFIG_NFT_REJECT=y CONFIG_NFT_REJECT_INET=y CONFIG_NFT_COMPAT=y CONFIG_NFT_HASH=y CONFIG_NF_DUP_NETDEV=y CONFIG_NFT_DUP_NETDEV=y CONFIG_NFT_FWD_NETDEV=y # CONFIG_NF_FLOW_TABLE is not set CONFIG_NETFILTER_XTABLES=y # # Xtables combined modules # CONFIG_NETFILTER_XT_MARK=y CONFIG_NETFILTER_XT_CONNMARK=y # CONFIG_NETFILTER_XT_SET is not set # # Xtables targets # CONFIG_NETFILTER_XT_TARGET_AUDIT=y # CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y # CONFIG_NETFILTER_XT_TARGET_DSCP is not set CONFIG_NETFILTER_XT_TARGET_HL=y CONFIG_NETFILTER_XT_TARGET_HMARK=y # CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set CONFIG_NETFILTER_XT_TARGET_LED=y CONFIG_NETFILTER_XT_TARGET_LOG=y # CONFIG_NETFILTER_XT_TARGET_MARK is not set CONFIG_NETFILTER_XT_NAT=y CONFIG_NETFILTER_XT_TARGET_NETMAP=y CONFIG_NETFILTER_XT_TARGET_NFLOG=y # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set CONFIG_NETFILTER_XT_TARGET_RATEEST=y # CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set # CONFIG_NETFILTER_XT_TARGET_TEE is not set CONFIG_NETFILTER_XT_TARGET_TPROXY=y CONFIG_NETFILTER_XT_TARGET_SECMARK=y CONFIG_NETFILTER_XT_TARGET_TCPMSS=y # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set # # Xtables matches # CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y CONFIG_NETFILTER_XT_MATCH_BPF=y # CONFIG_NETFILTER_XT_MATCH_CGROUP is not set CONFIG_NETFILTER_XT_MATCH_CLUSTER=y CONFIG_NETFILTER_XT_MATCH_COMMENT=y # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set CONFIG_NETFILTER_XT_MATCH_CONNLABEL=y CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y CONFIG_NETFILTER_XT_MATCH_CONNMARK=y CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y CONFIG_NETFILTER_XT_MATCH_CPU=y # CONFIG_NETFILTER_XT_MATCH_DCCP is not set CONFIG_NETFILTER_XT_MATCH_DEVGROUP=y CONFIG_NETFILTER_XT_MATCH_DSCP=y CONFIG_NETFILTER_XT_MATCH_ECN=y CONFIG_NETFILTER_XT_MATCH_ESP=y # CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set CONFIG_NETFILTER_XT_MATCH_HELPER=y CONFIG_NETFILTER_XT_MATCH_HL=y CONFIG_NETFILTER_XT_MATCH_IPCOMP=y # CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set # CONFIG_NETFILTER_XT_MATCH_IPVS is not set CONFIG_NETFILTER_XT_MATCH_L2TP=y CONFIG_NETFILTER_XT_MATCH_LENGTH=y CONFIG_NETFILTER_XT_MATCH_LIMIT=y CONFIG_NETFILTER_XT_MATCH_MAC=y CONFIG_NETFILTER_XT_MATCH_MARK=y CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y CONFIG_NETFILTER_XT_MATCH_NFACCT=y CONFIG_NETFILTER_XT_MATCH_OSF=y CONFIG_NETFILTER_XT_MATCH_OWNER=y # CONFIG_NETFILTER_XT_MATCH_POLICY is not set # CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set # CONFIG_NETFILTER_XT_MATCH_RATEEST is not set CONFIG_NETFILTER_XT_MATCH_REALM=y CONFIG_NETFILTER_XT_MATCH_RECENT=y CONFIG_NETFILTER_XT_MATCH_SCTP=y # CONFIG_NETFILTER_XT_MATCH_STATE is not set # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set # CONFIG_NETFILTER_XT_MATCH_STRING is not set CONFIG_NETFILTER_XT_MATCH_TCPMSS=y CONFIG_NETFILTER_XT_MATCH_TIME=y CONFIG_NETFILTER_XT_MATCH_U32=y CONFIG_IP_SET=y CONFIG_IP_SET_MAX=256 CONFIG_IP_SET_BITMAP_IP=y CONFIG_IP_SET_BITMAP_IPMAC=y CONFIG_IP_SET_BITMAP_PORT=y CONFIG_IP_SET_HASH_IP=y CONFIG_IP_SET_HASH_IPMARK=y # CONFIG_IP_SET_HASH_IPPORT is not set CONFIG_IP_SET_HASH_IPPORTIP=y CONFIG_IP_SET_HASH_IPPORTNET=y # CONFIG_IP_SET_HASH_IPMAC is not set CONFIG_IP_SET_HASH_MAC=y CONFIG_IP_SET_HASH_NETPORTNET=y # CONFIG_IP_SET_HASH_NET is not set CONFIG_IP_SET_HASH_NETNET=y CONFIG_IP_SET_HASH_NETPORT=y CONFIG_IP_SET_HASH_NETIFACE=y # CONFIG_IP_SET_LIST_SET is not set CONFIG_IP_VS=y # CONFIG_IP_VS_IPV6 is not set # CONFIG_IP_VS_DEBUG is not set CONFIG_IP_VS_TAB_BITS=12 # # IPVS transport protocol load balancing support # CONFIG_IP_VS_PROTO_TCP=y CONFIG_IP_VS_PROTO_UDP=y CONFIG_IP_VS_PROTO_AH_ESP=y CONFIG_IP_VS_PROTO_ESP=y # CONFIG_IP_VS_PROTO_AH is not set CONFIG_IP_VS_PROTO_SCTP=y # # IPVS scheduler # # CONFIG_IP_VS_RR is not set CONFIG_IP_VS_WRR=y CONFIG_IP_VS_LC=y CONFIG_IP_VS_WLC=y CONFIG_IP_VS_FO=y CONFIG_IP_VS_OVF=y CONFIG_IP_VS_LBLC=y CONFIG_IP_VS_LBLCR=y CONFIG_IP_VS_DH=y CONFIG_IP_VS_SH=y CONFIG_IP_VS_SED=y CONFIG_IP_VS_NQ=y # # IPVS SH scheduler # CONFIG_IP_VS_SH_TAB_BITS=8 # # IPVS application helper # CONFIG_IP_VS_FTP=y CONFIG_IP_VS_NFCT=y CONFIG_IP_VS_PE_SIP=y # # IP: Netfilter Configuration # CONFIG_NF_DEFRAG_IPV4=y CONFIG_NF_CONNTRACK_IPV4=y # CONFIG_NF_SOCKET_IPV4 is not set CONFIG_NF_TABLES_IPV4=y # CONFIG_NFT_CHAIN_ROUTE_IPV4 is not set CONFIG_NFT_REJECT_IPV4=y CONFIG_NFT_DUP_IPV4=y # CONFIG_NFT_FIB_IPV4 is not set # CONFIG_NF_TABLES_ARP is not set CONFIG_NF_DUP_IPV4=y # CONFIG_NF_LOG_ARP is not set CONFIG_NF_LOG_IPV4=y CONFIG_NF_REJECT_IPV4=y CONFIG_NF_NAT_IPV4=y CONFIG_NFT_CHAIN_NAT_IPV4=y CONFIG_NF_NAT_MASQUERADE_IPV4=y CONFIG_NFT_MASQ_IPV4=y CONFIG_NFT_REDIR_IPV4=y CONFIG_NF_NAT_PROTO_GRE=y CONFIG_NF_NAT_PPTP=y CONFIG_NF_NAT_H323=y CONFIG_IP_NF_IPTABLES=y # CONFIG_IP_NF_MATCH_AH is not set # CONFIG_IP_NF_MATCH_ECN is not set # CONFIG_IP_NF_MATCH_RPFILTER is not set # CONFIG_IP_NF_MATCH_TTL is not set # CONFIG_IP_NF_FILTER is not set # CONFIG_IP_NF_TARGET_SYNPROXY is not set # CONFIG_IP_NF_NAT is not set CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_CLUSTERIP=y CONFIG_IP_NF_TARGET_ECN=y CONFIG_IP_NF_TARGET_TTL=y # CONFIG_IP_NF_RAW is not set CONFIG_IP_NF_ARPTABLES=y # CONFIG_IP_NF_ARPFILTER is not set # CONFIG_IP_NF_ARP_MANGLE is not set # # IPv6: Netfilter Configuration # CONFIG_NF_DEFRAG_IPV6=y CONFIG_NF_CONNTRACK_IPV6=y # CONFIG_NF_SOCKET_IPV6 is not set CONFIG_NF_TABLES_IPV6=y # CONFIG_NFT_CHAIN_ROUTE_IPV6 is not set CONFIG_NFT_REJECT_IPV6=y CONFIG_NFT_DUP_IPV6=y # CONFIG_NFT_FIB_IPV6 is not set CONFIG_NF_DUP_IPV6=y CONFIG_NF_REJECT_IPV6=y CONFIG_NF_LOG_IPV6=y CONFIG_NF_NAT_IPV6=y CONFIG_NFT_CHAIN_NAT_IPV6=y CONFIG_NF_NAT_MASQUERADE_IPV6=y CONFIG_NFT_MASQ_IPV6=y # CONFIG_NFT_REDIR_IPV6 is not set CONFIG_IP6_NF_IPTABLES=y CONFIG_IP6_NF_MATCH_AH=y CONFIG_IP6_NF_MATCH_EUI64=y # CONFIG_IP6_NF_MATCH_FRAG is not set CONFIG_IP6_NF_MATCH_OPTS=y CONFIG_IP6_NF_MATCH_HL=y CONFIG_IP6_NF_MATCH_IPV6HEADER=y CONFIG_IP6_NF_MATCH_MH=y # CONFIG_IP6_NF_MATCH_RPFILTER is not set CONFIG_IP6_NF_MATCH_RT=y CONFIG_IP6_NF_MATCH_SRH=y CONFIG_IP6_NF_TARGET_HL=y CONFIG_IP6_NF_FILTER=y CONFIG_IP6_NF_TARGET_REJECT=y CONFIG_IP6_NF_TARGET_SYNPROXY=y CONFIG_IP6_NF_MANGLE=y # CONFIG_IP6_NF_RAW is not set CONFIG_IP6_NF_NAT=y CONFIG_IP6_NF_TARGET_MASQUERADE=y # CONFIG_IP6_NF_TARGET_NPT is not set # # DECnet: Netfilter Configuration # # CONFIG_DECNET_NF_GRABULATOR is not set # CONFIG_IP_DCCP is not set # CONFIG_IP_SCTP is not set # CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set CONFIG_L2TP=y # CONFIG_L2TP_DEBUGFS is not set # CONFIG_L2TP_V3 is not set CONFIG_STP=y CONFIG_GARP=y # CONFIG_BRIDGE is not set CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=y # CONFIG_NET_DSA_LEGACY is not set CONFIG_NET_DSA_TAG_DSA=y CONFIG_NET_DSA_TAG_EDSA=y CONFIG_NET_DSA_TAG_KSZ=y CONFIG_NET_DSA_TAG_LAN9303=y CONFIG_NET_DSA_TAG_MTK=y CONFIG_NET_DSA_TAG_QCA=y CONFIG_VLAN_8021Q=y CONFIG_VLAN_8021Q_GVRP=y # CONFIG_VLAN_8021Q_MVRP is not set CONFIG_DECNET=y CONFIG_DECNET_ROUTER=y CONFIG_LLC=y CONFIG_LLC2=y CONFIG_ATALK=y CONFIG_DEV_APPLETALK=y CONFIG_LTPC=y # CONFIG_COPS is not set CONFIG_IPDDP=y CONFIG_IPDDP_ENCAP=y CONFIG_X25=y CONFIG_LAPB=y # CONFIG_PHONET is not set CONFIG_6LOWPAN=y # CONFIG_6LOWPAN_DEBUGFS is not set CONFIG_6LOWPAN_NHC=y CONFIG_6LOWPAN_NHC_DEST=y CONFIG_6LOWPAN_NHC_FRAGMENT=y CONFIG_6LOWPAN_NHC_HOP=y CONFIG_6LOWPAN_NHC_IPV6=y # CONFIG_6LOWPAN_NHC_MOBILITY is not set CONFIG_6LOWPAN_NHC_ROUTING=y CONFIG_6LOWPAN_NHC_UDP=y # CONFIG_6LOWPAN_GHC_EXT_HDR_HOP is not set # CONFIG_6LOWPAN_GHC_UDP is not set CONFIG_6LOWPAN_GHC_ICMPV6=y CONFIG_6LOWPAN_GHC_EXT_HDR_DEST=y CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=y CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=y CONFIG_IEEE802154=y # CONFIG_IEEE802154_NL802154_EXPERIMENTAL is not set # CONFIG_IEEE802154_SOCKET is not set CONFIG_IEEE802154_6LOWPAN=y CONFIG_MAC802154=y # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=y CONFIG_BATMAN_ADV_BATMAN_V=y CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y # CONFIG_BATMAN_ADV_NC is not set # CONFIG_BATMAN_ADV_MCAST is not set # CONFIG_BATMAN_ADV_DEBUGFS is not set # CONFIG_OPENVSWITCH is not set CONFIG_VSOCKETS=y CONFIG_VSOCKETS_DIAG=y CONFIG_VIRTIO_VSOCKETS=y CONFIG_VIRTIO_VSOCKETS_COMMON=y CONFIG_NETLINK_DIAG=y # CONFIG_MPLS is not set CONFIG_NET_NSH=y CONFIG_HSR=y CONFIG_NET_SWITCHDEV=y CONFIG_NET_L3_MASTER_DEV=y # CONFIG_NET_NCSI is not set # CONFIG_CGROUP_NET_PRIO is not set CONFIG_CGROUP_NET_CLASSID=y CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y # CONFIG_BPF_STREAM_PARSER is not set # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_NET_DROP_MONITOR is not set CONFIG_HAMRADIO=y # # Packet Radio protocols # CONFIG_AX25=y # CONFIG_AX25_DAMA_SLAVE is not set CONFIG_NETROM=y # CONFIG_ROSE is not set # # AX.25 network device drivers # # CONFIG_MKISS is not set # CONFIG_6PACK is not set CONFIG_BPQETHER=y # CONFIG_DMASCC is not set CONFIG_SCC=y CONFIG_SCC_DELAY=y # CONFIG_SCC_TRXECHO is not set CONFIG_BAYCOM_SER_FDX=y # CONFIG_BAYCOM_SER_HDX is not set CONFIG_BAYCOM_PAR=y # CONFIG_BAYCOM_EPP is not set # CONFIG_YAM is not set CONFIG_CAN=y CONFIG_CAN_RAW=y CONFIG_CAN_BCM=y # CONFIG_CAN_GW is not set # # CAN Device Drivers # CONFIG_CAN_VCAN=y CONFIG_CAN_VXCAN=y # CONFIG_CAN_SLCAN is not set CONFIG_CAN_DEV=y # CONFIG_CAN_CALC_BITTIMING is not set CONFIG_CAN_LEDS=y # CONFIG_PCH_CAN is not set CONFIG_CAN_C_CAN=y # CONFIG_CAN_C_CAN_PLATFORM is not set # CONFIG_CAN_C_CAN_PCI is not set CONFIG_CAN_CC770=y CONFIG_CAN_CC770_ISA=y CONFIG_CAN_CC770_PLATFORM=y CONFIG_CAN_IFI_CANFD=y # CONFIG_CAN_M_CAN is not set # CONFIG_CAN_PEAK_PCIEFD is not set CONFIG_CAN_SJA1000=y # CONFIG_CAN_SJA1000_ISA is not set CONFIG_CAN_SJA1000_PLATFORM=y # CONFIG_CAN_EMS_PCI is not set # CONFIG_CAN_PEAK_PCI is not set # CONFIG_CAN_KVASER_PCI is not set # CONFIG_CAN_PLX_PCI is not set CONFIG_CAN_TSCAN1=y CONFIG_CAN_SOFTING=y # CONFIG_CAN_DEBUG_DEVICES is not set CONFIG_BT=y # CONFIG_BT_BREDR is not set # CONFIG_BT_LE is not set # CONFIG_BT_LEDS is not set # CONFIG_BT_SELFTEST is not set CONFIG_BT_DEBUGFS=y # # Bluetooth device drivers # CONFIG_BT_HCIBTSDIO=y # CONFIG_BT_HCIUART is not set # CONFIG_BT_HCIVHCI is not set # CONFIG_BT_MRVL is not set CONFIG_AF_RXRPC=y CONFIG_AF_RXRPC_IPV6=y # CONFIG_AF_RXRPC_INJECT_LOSS is not set CONFIG_AF_RXRPC_DEBUG=y CONFIG_RXKAD=y # CONFIG_AF_KCM is not set CONFIG_STREAM_PARSER=y CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_WIRELESS_EXT=y CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y CONFIG_WEXT_SPY=y CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set CONFIG_CFG80211_DEVELOPER_WARNINGS=y CONFIG_CFG80211_CERTIFICATION_ONUS=y # CONFIG_CFG80211_REQUIRE_SIGNED_REGDB is not set # CONFIG_CFG80211_REG_CELLULAR_HINTS is not set CONFIG_CFG80211_REG_RELAX_NO_IR=y # CONFIG_CFG80211_DEFAULT_PS is not set CONFIG_CFG80211_DEBUGFS=y # CONFIG_CFG80211_CRDA_SUPPORT is not set CONFIG_CFG80211_WEXT=y CONFIG_LIB80211=y CONFIG_LIB80211_DEBUG=y CONFIG_MAC80211=y CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y # CONFIG_MAC80211_RC_MINSTREL_HT is not set CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel" # CONFIG_MAC80211_MESH is not set CONFIG_MAC80211_LEDS=y CONFIG_MAC80211_DEBUGFS=y CONFIG_MAC80211_MESSAGE_TRACING=y CONFIG_MAC80211_DEBUG_MENU=y CONFIG_MAC80211_NOINLINE=y CONFIG_MAC80211_VERBOSE_DEBUG=y # CONFIG_MAC80211_MLME_DEBUG is not set # CONFIG_MAC80211_STA_DEBUG is not set CONFIG_MAC80211_HT_DEBUG=y CONFIG_MAC80211_OCB_DEBUG=y # CONFIG_MAC80211_IBSS_DEBUG is not set CONFIG_MAC80211_PS_DEBUG=y # CONFIG_MAC80211_TDLS_DEBUG is not set CONFIG_MAC80211_DEBUG_COUNTERS=y CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 # CONFIG_WIMAX is not set # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set # CONFIG_CAIF is not set CONFIG_CEPH_LIB=y # CONFIG_CEPH_LIB_PRETTYDEBUG is not set CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y CONFIG_NFC=y # CONFIG_NFC_DIGITAL is not set CONFIG_NFC_NCI=y # CONFIG_NFC_NCI_UART is not set # CONFIG_NFC_HCI is not set # # Near Field Communication (NFC) devices # CONFIG_NFC_FDP=y CONFIG_NFC_FDP_I2C=y CONFIG_NFC_PN533=y CONFIG_NFC_PN533_I2C=y # CONFIG_NFC_ST_NCI_I2C is not set CONFIG_NFC_NXP_NCI=y CONFIG_NFC_NXP_NCI_I2C=y CONFIG_NFC_S3FWRN5=y CONFIG_NFC_S3FWRN5_I2C=y # CONFIG_PSAMPLE is not set CONFIG_NET_IFE=y CONFIG_LWTUNNEL=y CONFIG_LWTUNNEL_BPF=y CONFIG_DST_CACHE=y CONFIG_GRO_CELLS=y # CONFIG_NET_DEVLINK is not set CONFIG_MAY_USE_DEVLINK=y # # Device Drivers # # # Generic Driver Options # CONFIG_UEVENT_HELPER=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_DEVTMPFS=y # CONFIG_DEVTMPFS_MOUNT is not set # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_W1=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y CONFIG_DMA_FENCE_TRACE=y CONFIG_DMA_CMA=y # # Default contiguous memory area size: # CONFIG_CMA_SIZE_PERCENTAGE=0 # CONFIG_CMA_SIZE_SEL_MBYTES is not set CONFIG_CMA_SIZE_SEL_PERCENTAGE=y # CONFIG_CMA_SIZE_SEL_MIN is not set # CONFIG_CMA_SIZE_SEL_MAX is not set CONFIG_CMA_ALIGNMENT=8 # # Bus devices # CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y CONFIG_MTD=y CONFIG_MTD_REDBOOT_PARTS=y CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set CONFIG_MTD_REDBOOT_PARTS_READONLY=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_AR7_PARTS=y # # Partition parsers # # # User Modules And Translation Layers # CONFIG_MTD_OOPS=y # CONFIG_MTD_PARTITIONED_MASTER is not set # # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_CFI_STAA=y CONFIG_MTD_CFI_UTIL=y CONFIG_MTD_RAM=y CONFIG_MTD_ROM=y # CONFIG_MTD_ABSENT is not set # # Mapping drivers for chip access # CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP_COMPAT=y CONFIG_MTD_PHYSMAP_START=0x8000000 CONFIG_MTD_PHYSMAP_LEN=0 CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # CONFIG_MTD_SBC_GXX is not set # CONFIG_MTD_PCI is not set CONFIG_MTD_GPIO_ADDR=y # CONFIG_MTD_INTEL_VR_NOR is not set CONFIG_MTD_PLATRAM=y CONFIG_MTD_LATCH_ADDR=y # # Self-contained MTD device drivers # # CONFIG_MTD_PMC551 is not set CONFIG_MTD_SLRAM=y CONFIG_MTD_PHRAM=y # CONFIG_MTD_MTDRAM is not set # # Disk-On-Chip Device Drivers # CONFIG_MTD_DOCG3=y CONFIG_BCH_CONST_M=14 CONFIG_BCH_CONST_T=4 # CONFIG_MTD_ONENAND is not set CONFIG_MTD_NAND_ECC=y # CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND=y CONFIG_MTD_NAND_BCH=y CONFIG_MTD_NAND_ECC_BCH=y # CONFIG_MTD_NAND_DENALI_PCI is not set CONFIG_MTD_NAND_GPIO=y # CONFIG_MTD_NAND_RICOH is not set CONFIG_MTD_NAND_DISKONCHIP=y # CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 # CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set CONFIG_MTD_NAND_DOCG4=y # CONFIG_MTD_NAND_CAFE is not set CONFIG_MTD_NAND_CS553X=y CONFIG_MTD_NAND_NANDSIM=y CONFIG_MTD_NAND_PLATFORM=y # # LPDDR & LPDDR2 PCM memory drivers # CONFIG_MTD_LPDDR=y CONFIG_MTD_QINFO_PROBE=y # CONFIG_MTD_SPI_NOR is not set CONFIG_MTD_UBI=y CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_LIMIT=20 # CONFIG_MTD_UBI_FASTMAP is not set # CONFIG_MTD_UBI_GLUEBI is not set # CONFIG_OF is not set CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_PARPORT=y CONFIG_PARPORT_PC=y # CONFIG_PARPORT_SERIAL is not set CONFIG_PARPORT_PC_FIFO=y CONFIG_PARPORT_PC_SUPERIO=y CONFIG_PARPORT_AX88796=y # CONFIG_PARPORT_1284 is not set CONFIG_PARPORT_NOT_PC=y CONFIG_PNP=y CONFIG_PNP_DEBUG_MESSAGES=y # # Protocols # # CONFIG_ISAPNP is not set # CONFIG_PNPBIOS is not set CONFIG_PNPACPI=y # # NVME Support # # # Misc devices # # CONFIG_AD525X_DPOT is not set CONFIG_DUMMY_IRQ=y # CONFIG_IBM_ASM is not set # CONFIG_PHANTOM is not set # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set # CONFIG_ICS932S401 is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_HP_ILO is not set # CONFIG_APDS9802ALS is not set # CONFIG_ISL29003 is not set CONFIG_ISL29020=y # CONFIG_SENSORS_TSL2550 is not set # CONFIG_SENSORS_BH1770 is not set # CONFIG_SENSORS_APDS990X is not set # CONFIG_HMC6352 is not set CONFIG_DS1682=y # CONFIG_PCH_PHUB is not set CONFIG_USB_SWITCH_FSA9480=y CONFIG_SRAM=y # CONFIG_PCI_ENDPOINT_TEST is not set CONFIG_C2PORT=y CONFIG_C2PORT_DURAMAR_2150=y # # EEPROM support # # CONFIG_EEPROM_AT24 is not set # CONFIG_EEPROM_LEGACY is not set # CONFIG_EEPROM_MAX6875 is not set # CONFIG_EEPROM_93CX6 is not set # CONFIG_EEPROM_IDT_89HPESX is not set # CONFIG_CB710_CORE is not set # # Texas Instruments shared transport line discipline # # CONFIG_TI_ST is not set # CONFIG_SENSORS_LIS3_I2C is not set CONFIG_ALTERA_STAPL=y # CONFIG_INTEL_MEI is not set # CONFIG_INTEL_MEI_ME is not set # CONFIG_INTEL_MEI_TXE is not set # CONFIG_VMWARE_VMCI is not set # # Intel MIC & related support # # # Intel MIC Bus Driver # # # SCIF Bus Driver # # # VOP Bus Driver # # # Intel MIC Host Driver # # # Intel MIC Card Driver # # # SCIF Driver # # # Intel MIC Coprocessor State Management (COSM) Drivers # # # VOP Driver # # CONFIG_ECHO is not set # CONFIG_MISC_RTSX_PCI is not set CONFIG_HAVE_IDE=y # # SCSI device support # CONFIG_SCSI_MOD=y # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y CONFIG_MII=y # CONFIG_NET_CORE is not set # CONFIG_ARCNET is not set # # CAIF transport drivers # # # Distributed Switch Architecture drivers # # CONFIG_B53 is not set CONFIG_NET_DSA_LOOP=y CONFIG_NET_DSA_MT7530=y CONFIG_MICROCHIP_KSZ=y CONFIG_NET_DSA_MV88E6XXX=y CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y CONFIG_NET_DSA_MV88E6XXX_PTP=y CONFIG_NET_DSA_QCA8K=y CONFIG_NET_DSA_SMSC_LAN9303=y # CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set CONFIG_NET_DSA_SMSC_LAN9303_MDIO=y CONFIG_ETHERNET=y CONFIG_MDIO=y CONFIG_NET_VENDOR_3COM=y CONFIG_EL3=y CONFIG_3C515=y CONFIG_VORTEX=y # CONFIG_TYPHOON is not set CONFIG_NET_VENDOR_ADAPTEC=y # CONFIG_ADAPTEC_STARFIRE is not set CONFIG_NET_VENDOR_AGERE=y # CONFIG_ET131X is not set # CONFIG_NET_VENDOR_ALACRITECH is not set CONFIG_NET_VENDOR_ALTEON=y # CONFIG_ACENIC is not set # CONFIG_ALTERA_TSE is not set # CONFIG_NET_VENDOR_AMAZON is not set # CONFIG_NET_VENDOR_AMD is not set # CONFIG_NET_VENDOR_AQUANTIA is not set CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y # CONFIG_ATL2 is not set # CONFIG_ATL1 is not set # CONFIG_ATL1E is not set # CONFIG_ATL1C is not set # CONFIG_ALX is not set # CONFIG_NET_VENDOR_AURORA is not set # CONFIG_NET_CADENCE is not set CONFIG_NET_VENDOR_BROADCOM=y # CONFIG_B44 is not set # CONFIG_BNX2 is not set # CONFIG_CNIC is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2X is not set # CONFIG_BNXT is not set CONFIG_NET_VENDOR_BROCADE=y # CONFIG_BNA is not set CONFIG_NET_VENDOR_CAVIUM=y CONFIG_NET_VENDOR_CHELSIO=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set # CONFIG_CHELSIO_T4 is not set # CONFIG_CHELSIO_T4VF is not set CONFIG_NET_VENDOR_CIRRUS=y CONFIG_CS89x0=y CONFIG_CS89x0_PLATFORM=y CONFIG_NET_VENDOR_CISCO=y # CONFIG_ENIC is not set CONFIG_NET_VENDOR_CORTINA=y # CONFIG_CX_ECAT is not set CONFIG_DNET=y # CONFIG_NET_VENDOR_DEC is not set CONFIG_NET_VENDOR_DLINK=y # CONFIG_DL2K is not set # CONFIG_SUNDANCE is not set CONFIG_NET_VENDOR_EMULEX=y # CONFIG_BE2NET is not set CONFIG_NET_VENDOR_EZCHIP=y CONFIG_NET_VENDOR_EXAR=y # CONFIG_S2IO is not set # CONFIG_VXGE is not set # CONFIG_NET_VENDOR_HP is not set CONFIG_NET_VENDOR_HUAWEI=y CONFIG_NET_VENDOR_INTEL=y # CONFIG_E100 is not set CONFIG_E1000=y CONFIG_E1000E=y CONFIG_E1000E_HWTS=y CONFIG_IGB=y # CONFIG_IGBVF is not set # CONFIG_IXGB is not set CONFIG_IXGBE=y # CONFIG_I40E is not set CONFIG_NET_VENDOR_I825XX=y # CONFIG_JME is not set CONFIG_NET_VENDOR_MARVELL=y CONFIG_MVMDIO=y # CONFIG_SKGE is not set # CONFIG_SKY2 is not set CONFIG_NET_VENDOR_MELLANOX=y # CONFIG_MLX4_EN is not set # CONFIG_MLX5_CORE is not set CONFIG_MLXSW_CORE=y # CONFIG_MLXSW_CORE_THERMAL is not set CONFIG_MLXSW_PCI=y CONFIG_MLXSW_I2C=y CONFIG_MLXSW_SWITCHIB=y CONFIG_MLXSW_SWITCHX2=y CONFIG_MLXSW_SPECTRUM=y CONFIG_MLXSW_MINIMAL=y CONFIG_MLXFW=y CONFIG_NET_VENDOR_MICREL=y CONFIG_KS8842=y CONFIG_KS8851_MLL=y # CONFIG_KSZ884X_PCI is not set CONFIG_NET_VENDOR_MYRI=y # CONFIG_MYRI10GE is not set # CONFIG_FEALNX is not set # CONFIG_NET_VENDOR_NATSEMI is not set # CONFIG_NET_VENDOR_NETRONOME is not set CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_NVIDIA=y # CONFIG_FORCEDETH is not set CONFIG_NET_VENDOR_OKI=y # CONFIG_PCH_GBE is not set CONFIG_ETHOC=y CONFIG_NET_PACKET_ENGINE=y # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set CONFIG_NET_VENDOR_QLOGIC=y # CONFIG_QLA3XXX is not set # CONFIG_QLCNIC is not set # CONFIG_QLGE is not set # CONFIG_NETXEN_NIC is not set # CONFIG_QED is not set # CONFIG_NET_VENDOR_QUALCOMM is not set CONFIG_NET_VENDOR_REALTEK=y CONFIG_ATP=y # CONFIG_8139CP is not set # CONFIG_8139TOO is not set # CONFIG_R8169 is not set CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set # CONFIG_NET_VENDOR_ROCKER is not set CONFIG_NET_VENDOR_SAMSUNG=y CONFIG_SXGBE_ETH=y CONFIG_NET_VENDOR_SEEQ=y CONFIG_NET_VENDOR_SILAN=y # CONFIG_SC92031 is not set CONFIG_NET_VENDOR_SIS=y # CONFIG_SIS900 is not set # CONFIG_SIS190 is not set # CONFIG_NET_VENDOR_SOLARFLARE is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_SOCIONEXT is not set CONFIG_NET_VENDOR_STMICRO=y CONFIG_STMMAC_ETH=y # CONFIG_STMMAC_PLATFORM is not set # CONFIG_STMMAC_PCI is not set CONFIG_NET_VENDOR_SUN=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_CASSINI is not set # CONFIG_NIU is not set CONFIG_NET_VENDOR_TEHUTI=y # CONFIG_TEHUTI is not set # CONFIG_NET_VENDOR_TI is not set CONFIG_NET_VENDOR_VIA=y # CONFIG_VIA_RHINE is not set # CONFIG_VIA_VELOCITY is not set CONFIG_NET_VENDOR_WIZNET=y # CONFIG_WIZNET_W5100 is not set CONFIG_WIZNET_W5300=y # CONFIG_WIZNET_BUS_DIRECT is not set # CONFIG_WIZNET_BUS_INDIRECT is not set CONFIG_WIZNET_BUS_ANY=y CONFIG_NET_VENDOR_SYNOPSYS=y # CONFIG_DWC_XLGMAC is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_NET_SB1000 is not set CONFIG_MDIO_DEVICE=y CONFIG_MDIO_BUS=y CONFIG_MDIO_BITBANG=y # CONFIG_MDIO_GPIO is not set CONFIG_PHYLIB=y CONFIG_SWPHY=y CONFIG_LED_TRIGGER_PHY=y # # MII PHY device drivers # CONFIG_AMD_PHY=y CONFIG_AQUANTIA_PHY=y CONFIG_AT803X_PHY=y CONFIG_BCM7XXX_PHY=y # CONFIG_BCM87XX_PHY is not set CONFIG_BCM_NET_PHYLIB=y # CONFIG_BROADCOM_PHY is not set CONFIG_CICADA_PHY=y # CONFIG_CORTINA_PHY is not set CONFIG_DAVICOM_PHY=y # CONFIG_DP83822_PHY is not set CONFIG_DP83848_PHY=y # CONFIG_DP83867_PHY is not set CONFIG_FIXED_PHY=y CONFIG_ICPLUS_PHY=y CONFIG_INTEL_XWAY_PHY=y # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_MARVELL_PHY is not set CONFIG_MARVELL_10G_PHY=y # CONFIG_MICREL_PHY is not set CONFIG_MICROCHIP_PHY=y CONFIG_MICROSEMI_PHY=y CONFIG_NATIONAL_PHY=y CONFIG_QSEMI_PHY=y CONFIG_REALTEK_PHY=y CONFIG_RENESAS_PHY=y CONFIG_ROCKCHIP_PHY=y CONFIG_SMSC_PHY=y # CONFIG_STE10XP is not set # CONFIG_TERANETICS_PHY is not set CONFIG_VITESSE_PHY=y # CONFIG_XILINX_GMII2RGMII is not set CONFIG_PLIP=y CONFIG_PPP=y CONFIG_PPP_BSDCOMP=y # CONFIG_PPP_DEFLATE is not set CONFIG_PPP_FILTER=y CONFIG_PPP_MPPE=y # CONFIG_PPP_MULTILINK is not set CONFIG_PPPOE=y CONFIG_PPPOL2TP=y # CONFIG_PPP_ASYNC is not set # CONFIG_PPP_SYNC_TTY is not set # CONFIG_SLIP is not set CONFIG_SLHC=y # # Host-side USB support is needed for USB Network Adapter support # CONFIG_WLAN=y CONFIG_WIRELESS_WDS=y # CONFIG_WLAN_VENDOR_ADMTEK is not set CONFIG_ATH_COMMON=y CONFIG_WLAN_VENDOR_ATH=y # CONFIG_ATH_DEBUG is not set # CONFIG_ATH_REG_DYNAMIC_USER_REG_HINTS is not set # CONFIG_ATH5K is not set # CONFIG_ATH5K_PCI is not set CONFIG_ATH9K_HW=y CONFIG_ATH9K_COMMON=y CONFIG_ATH9K_BTCOEX_SUPPORT=y CONFIG_ATH9K=y CONFIG_ATH9K_PCI=y CONFIG_ATH9K_AHB=y # CONFIG_ATH9K_DEBUGFS is not set CONFIG_ATH9K_DFS_CERTIFIED=y CONFIG_ATH9K_DYNACK=y CONFIG_ATH9K_WOW=y # CONFIG_ATH9K_CHANNEL_CONTEXT is not set # CONFIG_ATH9K_PCOEM is not set # CONFIG_ATH9K_HWRNG is not set CONFIG_ATH6KL=y CONFIG_ATH6KL_SDIO=y CONFIG_ATH6KL_DEBUG=y CONFIG_ATH6KL_TRACING=y # CONFIG_ATH6KL_REGDOMAIN is not set # CONFIG_WIL6210 is not set CONFIG_ATH10K=y # CONFIG_ATH10K_PCI is not set CONFIG_ATH10K_SDIO=y CONFIG_ATH10K_DEBUG=y # CONFIG_ATH10K_DEBUGFS is not set CONFIG_ATH10K_TRACING=y # CONFIG_ATH10K_DFS_CERTIFIED is not set CONFIG_WCN36XX=y # CONFIG_WCN36XX_DEBUGFS is not set CONFIG_WLAN_VENDOR_ATMEL=y # CONFIG_ATMEL is not set CONFIG_WLAN_VENDOR_BROADCOM=y CONFIG_B43=y CONFIG_B43_BCMA=y CONFIG_B43_SSB=y CONFIG_B43_BUSES_BCMA_AND_SSB=y # CONFIG_B43_BUSES_BCMA is not set # CONFIG_B43_BUSES_SSB is not set CONFIG_B43_PCI_AUTOSELECT=y CONFIG_B43_PCICORE_AUTOSELECT=y CONFIG_B43_SDIO=y CONFIG_B43_BCMA_PIO=y CONFIG_B43_PIO=y CONFIG_B43_PHY_G=y CONFIG_B43_PHY_N=y # CONFIG_B43_PHY_LP is not set CONFIG_B43_PHY_HT=y CONFIG_B43_LEDS=y CONFIG_B43_HWRNG=y CONFIG_B43_DEBUG=y CONFIG_B43LEGACY=y CONFIG_B43LEGACY_PCI_AUTOSELECT=y CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y CONFIG_B43LEGACY_LEDS=y CONFIG_B43LEGACY_HWRNG=y CONFIG_B43LEGACY_DEBUG=y CONFIG_B43LEGACY_PIO=y # CONFIG_B43LEGACY_DMA_AND_PIO_MODE is not set # CONFIG_B43LEGACY_DMA_MODE is not set CONFIG_B43LEGACY_PIO_MODE=y CONFIG_BRCMUTIL=y CONFIG_BRCMSMAC=y CONFIG_BRCMFMAC=y # CONFIG_BRCMFMAC_SDIO is not set # CONFIG_BRCMFMAC_PCIE is not set # CONFIG_BRCM_TRACING is not set # CONFIG_BRCMDBG is not set # CONFIG_WLAN_VENDOR_CISCO is not set CONFIG_WLAN_VENDOR_INTEL=y # CONFIG_IPW2100 is not set # CONFIG_IPW2200 is not set # CONFIG_IWL4965 is not set # CONFIG_IWL3945 is not set # CONFIG_IWLWIFI is not set # CONFIG_WLAN_VENDOR_INTERSIL is not set CONFIG_WLAN_VENDOR_MARVELL=y CONFIG_LIBERTAS=y # CONFIG_LIBERTAS_SDIO is not set # CONFIG_LIBERTAS_DEBUG is not set # CONFIG_LIBERTAS_MESH is not set CONFIG_LIBERTAS_THINFIRM=y CONFIG_LIBERTAS_THINFIRM_DEBUG=y CONFIG_MWIFIEX=y CONFIG_MWIFIEX_SDIO=y # CONFIG_MWIFIEX_PCIE is not set # CONFIG_MWL8K is not set CONFIG_WLAN_VENDOR_MEDIATEK=y # CONFIG_MT76x2E is not set # CONFIG_WLAN_VENDOR_RALINK is not set # CONFIG_WLAN_VENDOR_REALTEK is not set CONFIG_WLAN_VENDOR_RSI=y CONFIG_RSI_91X=y # CONFIG_RSI_DEBUGFS is not set CONFIG_RSI_SDIO=y # CONFIG_RSI_COEX is not set CONFIG_WLAN_VENDOR_ST=y # CONFIG_CW1200 is not set # CONFIG_WLAN_VENDOR_TI is not set # CONFIG_WLAN_VENDOR_ZYDAS is not set # CONFIG_WLAN_VENDOR_QUANTENNA is not set # CONFIG_MAC80211_HWSIM is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers # CONFIG_WAN=y # CONFIG_HDLC is not set CONFIG_DLCI=y CONFIG_DLCI_MAX=8 CONFIG_SDLA=y # CONFIG_LAPBETHER is not set # CONFIG_X25_ASY is not set CONFIG_SBNI=y # CONFIG_SBNI_MULTILINE is not set CONFIG_IEEE802154_DRIVERS=y # CONFIG_IEEE802154_FAKELB is not set # CONFIG_VMXNET3 is not set # CONFIG_FUJITSU_ES is not set CONFIG_NETDEVSIM=y CONFIG_ISDN=y # CONFIG_ISDN_I4L is not set CONFIG_ISDN_CAPI=y CONFIG_CAPI_TRACE=y CONFIG_ISDN_CAPI_CAPI20=y # CONFIG_ISDN_CAPI_MIDDLEWARE is not set # # CAPI hardware drivers # # CONFIG_CAPI_AVM is not set # CONFIG_CAPI_EICON is not set # CONFIG_ISDN_DRV_GIGASET is not set CONFIG_MISDN=y CONFIG_MISDN_DSP=y CONFIG_MISDN_L1OIP=y # # mISDN hardware drivers # # CONFIG_MISDN_HFCPCI is not set # CONFIG_MISDN_HFCMULTI is not set # CONFIG_MISDN_AVMFRITZ is not set # CONFIG_MISDN_SPEEDFAX is not set # CONFIG_MISDN_INFINEON is not set # CONFIG_MISDN_W6692 is not set # CONFIG_MISDN_NETJET is not set # # Input device support # CONFIG_INPUT=y CONFIG_INPUT_LEDS=y # CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_POLLDEV is not set # CONFIG_INPUT_SPARSEKMAP is not set # CONFIG_INPUT_MATRIXKMAP is not set # # Userland interfaces # # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ADP5520 is not set # CONFIG_KEYBOARD_ADP5588 is not set # CONFIG_KEYBOARD_ADP5589 is not set CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT1070 is not set # CONFIG_KEYBOARD_QT2160 is not set # CONFIG_KEYBOARD_DLINK_DIR685 is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_GPIO is not set # CONFIG_KEYBOARD_GPIO_POLLED is not set # CONFIG_KEYBOARD_TCA6416 is not set # CONFIG_KEYBOARD_TCA8418 is not set # CONFIG_KEYBOARD_MATRIX is not set # CONFIG_KEYBOARD_LM8323 is not set # CONFIG_KEYBOARD_LM8333 is not set # CONFIG_KEYBOARD_MAX7359 is not set # CONFIG_KEYBOARD_MCS is not set # CONFIG_KEYBOARD_MPR121 is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_OPENCORES is not set # CONFIG_KEYBOARD_SAMSUNG is not set # CONFIG_KEYBOARD_GOLDFISH_EVENTS is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_TM2_TOUCHKEY is not set # CONFIG_KEYBOARD_TWL4030 is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_CROS_EC is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_MOUSE_PS2_ALPS=y CONFIG_MOUSE_PS2_BYD=y CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y CONFIG_MOUSE_PS2_CYPRESS=y CONFIG_MOUSE_PS2_TRACKPOINT=y # CONFIG_MOUSE_PS2_ELANTECH is not set # CONFIG_MOUSE_PS2_SENTELIC is not set # CONFIG_MOUSE_PS2_TOUCHKIT is not set CONFIG_MOUSE_PS2_FOCALTECH=y # CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2_SMBUS=y # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_APPLETOUCH is not set # CONFIG_MOUSE_BCM5974 is not set # CONFIG_MOUSE_CYAPA is not set # CONFIG_MOUSE_ELAN_I2C is not set # CONFIG_MOUSE_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_MOUSE_GPIO is not set # CONFIG_MOUSE_SYNAPTICS_I2C is not set # CONFIG_MOUSE_SYNAPTICS_USB is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # CONFIG_RMI4_CORE is not set # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y CONFIG_SERIO_RAW=y CONFIG_SERIO_ALTERA_PS2=y # CONFIG_SERIO_PS2MULT is not set CONFIG_SERIO_ARC_PS2=y CONFIG_SERIO_GPIO_PS2=y CONFIG_USERIO=y CONFIG_GAMEPORT=y # CONFIG_GAMEPORT_NS558 is not set # CONFIG_GAMEPORT_L4 is not set # CONFIG_GAMEPORT_EMU10K1 is not set # CONFIG_GAMEPORT_FM801 is not set # # Character devices # CONFIG_TTY=y # CONFIG_VT is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set # CONFIG_N_GSM is not set # CONFIG_TRACE_SINK is not set # CONFIG_GOLDFISH_TTY is not set # CONFIG_DEVMEM is not set # CONFIG_DEVKMEM is not set # # Serial drivers # CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y CONFIG_SERIAL_8250_PNP=y # CONFIG_SERIAL_8250_FINTEK is not set CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_EXAR=y # CONFIG_SERIAL_8250_MEN_MCB is not set CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # CONFIG_SERIAL_8250_DW is not set # CONFIG_SERIAL_8250_RT288X is not set CONFIG_SERIAL_8250_LPSS=y CONFIG_SERIAL_8250_MID=y # CONFIG_SERIAL_8250_MOXA is not set # # Non-8250 serial port support # # CONFIG_SERIAL_UARTLITE is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set # CONFIG_SERIAL_TIMBERDALE is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_PCH_UART is not set # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_RP2 is not set # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_MEN_Z135 is not set CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y # CONFIG_TTY_PRINTK is not set CONFIG_PRINTER=y # CONFIG_LP_CONSOLE is not set CONFIG_PPDEV=y # CONFIG_VIRTIO_CONSOLE is not set CONFIG_IPMI_HANDLER=y CONFIG_IPMI_PROC_INTERFACE=y CONFIG_IPMI_PANIC_EVENT=y # CONFIG_IPMI_PANIC_STRING is not set CONFIG_IPMI_DEVICE_INTERFACE=y CONFIG_IPMI_SI=y CONFIG_IPMI_SSIF=y CONFIG_IPMI_WATCHDOG=y CONFIG_IPMI_POWEROFF=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_TIMERIOMEM=y CONFIG_HW_RANDOM_INTEL=y CONFIG_HW_RANDOM_AMD=y CONFIG_HW_RANDOM_GEODE=y # CONFIG_HW_RANDOM_VIA is not set # CONFIG_HW_RANDOM_VIRTIO is not set # CONFIG_NVRAM is not set CONFIG_DTLK=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_SONYPI is not set # CONFIG_MWAVE is not set CONFIG_PC8736x_GPIO=y CONFIG_NSC_GPIO=y # CONFIG_HPET is not set CONFIG_HANGCHECK_TIMER=y CONFIG_TCG_TPM=y CONFIG_HW_RANDOM_TPM=y # CONFIG_TCG_TIS is not set CONFIG_TCG_TIS_I2C_ATMEL=y # CONFIG_TCG_TIS_I2C_INFINEON is not set CONFIG_TCG_TIS_I2C_NUVOTON=y # CONFIG_TCG_NSC is not set CONFIG_TCG_ATMEL=y # CONFIG_TCG_INFINEON is not set # CONFIG_TCG_CRB is not set CONFIG_TCG_VTPM_PROXY=y CONFIG_TCG_TIS_ST33ZP24=y CONFIG_TCG_TIS_ST33ZP24_I2C=y # CONFIG_TELCLOCK is not set CONFIG_DEVPORT=y # CONFIG_XILLYBUS is not set # # I2C support # CONFIG_I2C=y CONFIG_ACPI_I2C_OPREGION=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y # CONFIG_I2C_CHARDEV is not set # CONFIG_I2C_MUX is not set # CONFIG_I2C_HELPER_AUTO is not set CONFIG_I2C_SMBUS=y # # I2C Algorithms # CONFIG_I2C_ALGOBIT=y CONFIG_I2C_ALGOPCF=y CONFIG_I2C_ALGOPCA=y # # I2C Hardware Bus support # # # PC SMBus host controller drivers # # CONFIG_I2C_ALI1535 is not set # CONFIG_I2C_ALI1563 is not set # CONFIG_I2C_ALI15X3 is not set # CONFIG_I2C_AMD756 is not set # CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_I801 is not set # CONFIG_I2C_ISCH is not set # CONFIG_I2C_ISMT is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # # ACPI drivers # # CONFIG_I2C_SCMI is not set # # I2C system bus drivers (mostly embedded / system-on-chip) # CONFIG_I2C_CBUS_GPIO=y CONFIG_I2C_DESIGNWARE_CORE=y CONFIG_I2C_DESIGNWARE_PLATFORM=y # CONFIG_I2C_DESIGNWARE_SLAVE is not set # CONFIG_I2C_DESIGNWARE_PCI is not set # CONFIG_I2C_EG20T is not set # CONFIG_I2C_EMEV2 is not set # CONFIG_I2C_GPIO is not set CONFIG_I2C_KEMPLD=y # CONFIG_I2C_OCORES is not set CONFIG_I2C_PCA_PLATFORM=y # CONFIG_I2C_SIMTEC is not set # CONFIG_I2C_XILINX is not set # # External I2C/SMBus adapter drivers # CONFIG_I2C_PARPORT=y CONFIG_I2C_PARPORT_LIGHT=y # CONFIG_I2C_TAOS_EVM is not set # # Other I2C/SMBus bus drivers # # CONFIG_I2C_ELEKTOR is not set CONFIG_I2C_PCA_ISA=y CONFIG_I2C_CROS_EC_TUNNEL=y # CONFIG_SCx200_ACB is not set CONFIG_I2C_SLAVE=y CONFIG_I2C_SLAVE_EEPROM=y # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_SPI is not set CONFIG_SPMI=y # CONFIG_HSI is not set # CONFIG_PPS is not set # # PTP clock support # # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # CONFIG_PTP_1588_CLOCK_PCH=y CONFIG_PINCTRL=y CONFIG_DEBUG_PINCTRL=y # CONFIG_PINCTRL_AMD is not set # CONFIG_PINCTRL_MCP23S08 is not set # CONFIG_PINCTRL_SX150X is not set # CONFIG_PINCTRL_BAYTRAIL is not set # CONFIG_PINCTRL_CHERRYVIEW is not set # CONFIG_PINCTRL_BROXTON is not set # CONFIG_PINCTRL_CANNONLAKE is not set # CONFIG_PINCTRL_CEDARFORK is not set # CONFIG_PINCTRL_DENVERTON is not set # CONFIG_PINCTRL_GEMINILAKE is not set # CONFIG_PINCTRL_LEWISBURG is not set # CONFIG_PINCTRL_SUNRISEPOINT is not set CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_DEBUG_GPIO=y # CONFIG_GPIO_SYSFS is not set CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MAX730X=y # # Memory mapped GPIO drivers # # CONFIG_GPIO_AMDPT is not set CONFIG_GPIO_DWAPB=y # CONFIG_GPIO_EXAR is not set CONFIG_GPIO_GENERIC_PLATFORM=y # CONFIG_GPIO_ICH is not set # CONFIG_GPIO_LYNXPOINT is not set CONFIG_GPIO_MB86S7X=y # CONFIG_GPIO_MENZ127 is not set # CONFIG_GPIO_MOCKUP is not set # CONFIG_GPIO_VX855 is not set # # Port-mapped I/O GPIO drivers # CONFIG_GPIO_F7188X=y # CONFIG_GPIO_IT87 is not set # CONFIG_GPIO_SCH is not set CONFIG_GPIO_SCH311X=y # CONFIG_GPIO_WINBOND is not set CONFIG_GPIO_WS16C48=y # # I2C GPIO expanders # CONFIG_GPIO_ADP5588=y CONFIG_GPIO_ADP5588_IRQ=y CONFIG_GPIO_MAX7300=y CONFIG_GPIO_MAX732X=y # CONFIG_GPIO_MAX732X_IRQ is not set CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y # CONFIG_GPIO_PCF857X is not set CONFIG_GPIO_TPIC2810=y # # MFD GPIO expanders # CONFIG_GPIO_ADP5520=y CONFIG_GPIO_ARIZONA=y # CONFIG_GPIO_BD9571MWV is not set CONFIG_GPIO_DA9052=y # CONFIG_GPIO_KEMPLD is not set CONFIG_GPIO_LP873X=y CONFIG_GPIO_PALMAS=y # CONFIG_GPIO_RC5T583 is not set CONFIG_GPIO_TPS65086=y # CONFIG_GPIO_TPS65910 is not set CONFIG_GPIO_TPS65912=y # CONFIG_GPIO_TWL4030 is not set CONFIG_GPIO_TWL6040=y CONFIG_GPIO_WM8994=y # # PCI GPIO expanders # # CONFIG_GPIO_AMD8111 is not set # CONFIG_GPIO_BT8XX is not set # CONFIG_GPIO_ML_IOH is not set # CONFIG_GPIO_PCH is not set # CONFIG_GPIO_PCI_IDIO_16 is not set # CONFIG_GPIO_PCIE_IDIO_24 is not set # CONFIG_GPIO_RDC321X is not set CONFIG_W1=y CONFIG_W1_CON=y # # 1-wire Bus Masters # # CONFIG_W1_MASTER_MATROX is not set # CONFIG_W1_MASTER_DS2482 is not set CONFIG_W1_MASTER_DS1WM=y CONFIG_W1_MASTER_GPIO=y # # 1-wire Slaves # CONFIG_W1_SLAVE_THERM=y # CONFIG_W1_SLAVE_SMEM is not set CONFIG_W1_SLAVE_DS2405=y CONFIG_W1_SLAVE_DS2408=y # CONFIG_W1_SLAVE_DS2408_READBACK is not set # CONFIG_W1_SLAVE_DS2413 is not set # CONFIG_W1_SLAVE_DS2406 is not set CONFIG_W1_SLAVE_DS2423=y CONFIG_W1_SLAVE_DS2805=y # CONFIG_W1_SLAVE_DS2431 is not set # CONFIG_W1_SLAVE_DS2433 is not set CONFIG_W1_SLAVE_DS2438=y CONFIG_W1_SLAVE_DS2760=y CONFIG_W1_SLAVE_DS2780=y CONFIG_W1_SLAVE_DS2781=y # CONFIG_W1_SLAVE_DS28E04 is not set CONFIG_W1_SLAVE_DS28E17=y CONFIG_POWER_AVS=y # CONFIG_POWER_RESET is not set CONFIG_POWER_SUPPLY=y CONFIG_POWER_SUPPLY_DEBUG=y CONFIG_PDA_POWER=y # CONFIG_TEST_POWER is not set CONFIG_BATTERY_88PM860X=y CONFIG_BATTERY_DS2760=y # CONFIG_BATTERY_DS2780 is not set CONFIG_BATTERY_DS2781=y CONFIG_BATTERY_DS2782=y # CONFIG_BATTERY_SBS is not set CONFIG_CHARGER_SBS=y # CONFIG_BATTERY_BQ27XXX is not set CONFIG_BATTERY_DA9052=y CONFIG_BATTERY_MAX17040=y CONFIG_BATTERY_MAX17042=y CONFIG_BATTERY_MAX1721X=y CONFIG_CHARGER_88PM860X=y CONFIG_CHARGER_PCF50633=y CONFIG_CHARGER_MAX8903=y CONFIG_CHARGER_LP8727=y # CONFIG_CHARGER_GPIO is not set CONFIG_CHARGER_MANAGER=y # CONFIG_CHARGER_LTC3651 is not set CONFIG_CHARGER_MAX8997=y # CONFIG_CHARGER_BQ2415X is not set # CONFIG_CHARGER_BQ24190 is not set # CONFIG_CHARGER_BQ24257 is not set CONFIG_CHARGER_BQ24735=y # CONFIG_CHARGER_BQ25890 is not set CONFIG_CHARGER_SMB347=y CONFIG_BATTERY_GAUGE_LTC2941=y CONFIG_BATTERY_GOLDFISH=y CONFIG_BATTERY_RT5033=y CONFIG_CHARGER_RT9455=y # CONFIG_HWMON is not set CONFIG_THERMAL=y # CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 # CONFIG_THERMAL_WRITABLE_TRIPS is not set # CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE=y # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set # CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_BANG_BANG=y # CONFIG_THERMAL_GOV_USER_SPACE is not set CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y # CONFIG_CLOCK_THERMAL is not set CONFIG_DEVFREQ_THERMAL=y CONFIG_THERMAL_EMULATION=y CONFIG_INTEL_POWERCLAMP=y # CONFIG_INTEL_SOC_DTS_THERMAL is not set # # ACPI INT340X thermal drivers # # CONFIG_INT340X_THERMAL is not set # CONFIG_INTEL_PCH_THERMAL is not set CONFIG_WATCHDOG=y CONFIG_WATCHDOG_CORE=y # CONFIG_WATCHDOG_NOWAYOUT is not set # CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED is not set # CONFIG_WATCHDOG_SYSFS is not set # # Watchdog Device Drivers # # CONFIG_SOFT_WATCHDOG is not set CONFIG_DA9052_WATCHDOG=y CONFIG_DA9063_WATCHDOG=y # CONFIG_DA9062_WATCHDOG is not set CONFIG_MENF21BMC_WATCHDOG=y # CONFIG_WDAT_WDT is not set CONFIG_XILINX_WATCHDOG=y # CONFIG_ZIIRAVE_WATCHDOG is not set # CONFIG_RAVE_SP_WATCHDOG is not set # CONFIG_CADENCE_WATCHDOG is not set CONFIG_DW_WATCHDOG=y CONFIG_TWL4030_WATCHDOG=y CONFIG_MAX63XX_WATCHDOG=y CONFIG_RETU_WATCHDOG=y CONFIG_ACQUIRE_WDT=y # CONFIG_ADVANTECH_WDT is not set # CONFIG_ALIM1535_WDT is not set # CONFIG_ALIM7101_WDT is not set CONFIG_EBC_C384_WDT=y # CONFIG_F71808E_WDT is not set # CONFIG_SP5100_TCO is not set CONFIG_SBC_FITPC2_WATCHDOG=y # CONFIG_EUROTECH_WDT is not set CONFIG_IB700_WDT=y # CONFIG_IBMASR is not set CONFIG_WAFER_WDT=y # CONFIG_I6300ESB_WDT is not set # CONFIG_IE6XX_WDT is not set # CONFIG_ITCO_WDT is not set CONFIG_IT8712F_WDT=y CONFIG_IT87_WDT=y # CONFIG_HP_WATCHDOG is not set # CONFIG_KEMPLD_WDT is not set CONFIG_SC1200_WDT=y # CONFIG_PC87413_WDT is not set # CONFIG_NV_TCO is not set # CONFIG_RDC321X_WDT is not set # CONFIG_60XX_WDT is not set CONFIG_SBC8360_WDT=y CONFIG_SBC7240_WDT=y CONFIG_CPU5_WDT=y # CONFIG_SMSC_SCH311X_WDT is not set # CONFIG_SMSC37B787_WDT is not set # CONFIG_VIA_WDT is not set # CONFIG_W83627HF_WDT is not set CONFIG_W83877F_WDT=y CONFIG_W83977F_WDT=y CONFIG_MACHZ_WDT=y # CONFIG_SBC_EPX_C3_WATCHDOG is not set # CONFIG_NI903X_WDT is not set # CONFIG_NIC7018_WDT is not set CONFIG_MEN_A21_WDT=y # # ISA-based Watchdog Cards # CONFIG_PCWATCHDOG=y CONFIG_MIXCOMWD=y # CONFIG_WDT is not set # # PCI-based Watchdog Cards # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set # # Watchdog Pretimeout Governors # CONFIG_WATCHDOG_PRETIMEOUT_GOV=y # CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP is not set CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC=y CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP=y CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC=y CONFIG_SSB_POSSIBLE=y CONFIG_SSB=y CONFIG_SSB_SPROM=y CONFIG_SSB_BLOCKIO=y CONFIG_SSB_PCIHOST_POSSIBLE=y CONFIG_SSB_PCIHOST=y CONFIG_SSB_B43_PCI_BRIDGE=y CONFIG_SSB_SDIOHOST_POSSIBLE=y CONFIG_SSB_SDIOHOST=y # CONFIG_SSB_SILENT is not set # CONFIG_SSB_DEBUG is not set CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y CONFIG_SSB_DRIVER_PCICORE=y # CONFIG_SSB_DRIVER_GPIO is not set CONFIG_BCMA_POSSIBLE=y CONFIG_BCMA=y CONFIG_BCMA_BLOCKIO=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y CONFIG_BCMA_HOST_PCI=y CONFIG_BCMA_HOST_SOC=y CONFIG_BCMA_DRIVER_PCI=y CONFIG_BCMA_SFLASH=y # CONFIG_BCMA_DRIVER_GMAC_CMN is not set # CONFIG_BCMA_DRIVER_GPIO is not set CONFIG_BCMA_DEBUG=y # # Multifunction device drivers # CONFIG_MFD_CORE=y # CONFIG_MFD_CS5535 is not set CONFIG_MFD_AS3711=y CONFIG_PMIC_ADP5520=y CONFIG_MFD_AAT2870_CORE=y # CONFIG_MFD_BCM590XX is not set CONFIG_MFD_BD9571MWV=y CONFIG_MFD_AXP20X=y CONFIG_MFD_AXP20X_I2C=y CONFIG_MFD_CROS_EC=y # CONFIG_MFD_CROS_EC_I2C is not set # CONFIG_MFD_CROS_EC_CHARDEV is not set # CONFIG_PMIC_DA903X is not set CONFIG_PMIC_DA9052=y CONFIG_MFD_DA9052_I2C=y # CONFIG_MFD_DA9055 is not set CONFIG_MFD_DA9062=y CONFIG_MFD_DA9063=y # CONFIG_MFD_DA9150 is not set CONFIG_MFD_MC13XXX=y CONFIG_MFD_MC13XXX_I2C=y CONFIG_HTC_PASIC3=y CONFIG_HTC_I2CPLD=y # CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set # CONFIG_LPC_ICH is not set # CONFIG_LPC_SCH is not set # CONFIG_INTEL_SOC_PMIC is not set # CONFIG_INTEL_SOC_PMIC_CHTWC is not set # CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set # CONFIG_MFD_INTEL_LPSS_ACPI is not set # CONFIG_MFD_INTEL_LPSS_PCI is not set # CONFIG_MFD_JANZ_CMODIO is not set CONFIG_MFD_KEMPLD=y CONFIG_MFD_88PM800=y CONFIG_MFD_88PM805=y CONFIG_MFD_88PM860X=y # CONFIG_MFD_MAX14577 is not set # CONFIG_MFD_MAX77693 is not set CONFIG_MFD_MAX77843=y CONFIG_MFD_MAX8907=y # CONFIG_MFD_MAX8925 is not set CONFIG_MFD_MAX8997=y # CONFIG_MFD_MAX8998 is not set CONFIG_MFD_MT6397=y CONFIG_MFD_MENF21BMC=y CONFIG_MFD_RETU=y CONFIG_MFD_PCF50633=y CONFIG_PCF50633_ADC=y CONFIG_PCF50633_GPIO=y # CONFIG_MFD_RDC321X is not set CONFIG_MFD_RT5033=y CONFIG_MFD_RC5T583=y # CONFIG_MFD_SEC_CORE is not set CONFIG_MFD_SI476X_CORE=y # CONFIG_MFD_SM501 is not set CONFIG_MFD_SKY81452=y CONFIG_MFD_SMSC=y # CONFIG_ABX500_CORE is not set CONFIG_MFD_SYSCON=y CONFIG_MFD_TI_AM335X_TSCADC=y # CONFIG_MFD_LP3943 is not set CONFIG_MFD_LP8788=y CONFIG_MFD_TI_LMU=y CONFIG_MFD_PALMAS=y CONFIG_TPS6105X=y # CONFIG_TPS65010 is not set CONFIG_TPS6507X=y CONFIG_MFD_TPS65086=y # CONFIG_MFD_TPS65090 is not set # CONFIG_MFD_TPS68470 is not set CONFIG_MFD_TI_LP873X=y # CONFIG_MFD_TPS6586X is not set CONFIG_MFD_TPS65910=y CONFIG_MFD_TPS65912=y CONFIG_MFD_TPS65912_I2C=y # CONFIG_MFD_TPS80031 is not set CONFIG_TWL4030_CORE=y CONFIG_MFD_TWL4030_AUDIO=y CONFIG_TWL6040_CORE=y CONFIG_MFD_WL1273_CORE=y # CONFIG_MFD_LM3533 is not set # CONFIG_MFD_TIMBERDALE is not set # CONFIG_MFD_VX855 is not set CONFIG_MFD_ARIZONA=y CONFIG_MFD_ARIZONA_I2C=y CONFIG_MFD_CS47L24=y # CONFIG_MFD_WM5102 is not set # CONFIG_MFD_WM5110 is not set # CONFIG_MFD_WM8997 is not set # CONFIG_MFD_WM8998 is not set CONFIG_MFD_WM8400=y # CONFIG_MFD_WM831X_I2C is not set # CONFIG_MFD_WM8350_I2C is not set CONFIG_MFD_WM8994=y CONFIG_RAVE_SP_CORE=y CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_VIRTUAL_CONSUMER=y CONFIG_REGULATOR_USERSPACE_CONSUMER=y CONFIG_REGULATOR_88PG86X=y CONFIG_REGULATOR_88PM800=y CONFIG_REGULATOR_88PM8607=y CONFIG_REGULATOR_ACT8865=y CONFIG_REGULATOR_AD5398=y # CONFIG_REGULATOR_ANATOP is not set # CONFIG_REGULATOR_AAT2870 is not set CONFIG_REGULATOR_AS3711=y CONFIG_REGULATOR_AXP20X=y CONFIG_REGULATOR_BD9571MWV=y CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_DA9062=y CONFIG_REGULATOR_DA9063=y # CONFIG_REGULATOR_DA9210 is not set # CONFIG_REGULATOR_DA9211 is not set # CONFIG_REGULATOR_FAN53555 is not set CONFIG_REGULATOR_GPIO=y CONFIG_REGULATOR_ISL9305=y # CONFIG_REGULATOR_ISL6271A is not set CONFIG_REGULATOR_LM363X=y CONFIG_REGULATOR_LP3971=y CONFIG_REGULATOR_LP3972=y # CONFIG_REGULATOR_LP872X is not set CONFIG_REGULATOR_LP8755=y CONFIG_REGULATOR_LP8788=y CONFIG_REGULATOR_LTC3589=y CONFIG_REGULATOR_LTC3676=y CONFIG_REGULATOR_MAX1586=y CONFIG_REGULATOR_MAX8649=y CONFIG_REGULATOR_MAX8660=y CONFIG_REGULATOR_MAX8907=y CONFIG_REGULATOR_MAX8952=y CONFIG_REGULATOR_MAX8997=y # CONFIG_REGULATOR_MAX77693 is not set CONFIG_REGULATOR_MC13XXX_CORE=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_REGULATOR_MT6311=y CONFIG_REGULATOR_MT6323=y CONFIG_REGULATOR_MT6397=y # CONFIG_REGULATOR_PALMAS is not set CONFIG_REGULATOR_PCF50633=y CONFIG_REGULATOR_PFUZE100=y # CONFIG_REGULATOR_PV88060 is not set CONFIG_REGULATOR_PV88080=y # CONFIG_REGULATOR_PV88090 is not set # CONFIG_REGULATOR_QCOM_SPMI is not set # CONFIG_REGULATOR_RC5T583 is not set # CONFIG_REGULATOR_RT5033 is not set CONFIG_REGULATOR_SKY81452=y CONFIG_REGULATOR_TPS51632=y CONFIG_REGULATOR_TPS6105X=y # CONFIG_REGULATOR_TPS62360 is not set CONFIG_REGULATOR_TPS65023=y CONFIG_REGULATOR_TPS6507X=y CONFIG_REGULATOR_TPS65086=y CONFIG_REGULATOR_TPS65132=y CONFIG_REGULATOR_TPS65910=y # CONFIG_REGULATOR_TPS65912 is not set CONFIG_REGULATOR_TWL4030=y # CONFIG_REGULATOR_WM8400 is not set CONFIG_REGULATOR_WM8994=y # CONFIG_RC_CORE is not set # CONFIG_MEDIA_SUPPORT is not set # # Graphics support # # CONFIG_AGP is not set CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=16 # CONFIG_VGA_SWITCHEROO is not set # CONFIG_DRM is not set # # ACP (Audio CoProcessor) Configuration # # # AMD Library routines # # # Frame buffer Devices # CONFIG_FB=y CONFIG_FIRMWARE_EDID=y CONFIG_FB_CMDLINE=y CONFIG_FB_NOTIFY=y CONFIG_FB_BOOT_VESA_SUPPORT=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=y CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_IMAGEBLIT=y # CONFIG_FB_FOREIGN_ENDIAN is not set CONFIG_FB_SYS_FOPS=y CONFIG_FB_DEFERRED_IO=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # # Frame buffer hardware drivers # # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_ARC=y # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set CONFIG_FB_UVESA=y CONFIG_FB_VESA=y # CONFIG_FB_N411 is not set CONFIG_FB_HGA=y # CONFIG_FB_OPENCORES is not set CONFIG_FB_S1D13XXX=y # CONFIG_FB_NVIDIA is not set # CONFIG_FB_RIVA is not set # CONFIG_FB_I740 is not set # CONFIG_FB_LE80578 is not set # CONFIG_FB_MATROX is not set # CONFIG_FB_RADEON is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set # CONFIG_FB_S3 is not set # CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_VIA is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set # CONFIG_FB_3DFX is not set # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VT8623 is not set # CONFIG_FB_TRIDENT is not set # CONFIG_FB_ARK is not set # CONFIG_FB_PM3 is not set # CONFIG_FB_CARMINE is not set # CONFIG_FB_GEODE is not set # CONFIG_FB_IBM_GXT4500 is not set # CONFIG_FB_GOLDFISH is not set CONFIG_FB_VIRTUAL=y # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set CONFIG_FB_BROADSHEET=y # CONFIG_FB_AUO_K190X is not set CONFIG_FB_SIMPLE=y # CONFIG_FB_SM712 is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set # CONFIG_BACKLIGHT_CLASS_DEVICE is not set CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_SOUND is not set # # HID support # CONFIG_HID=y # CONFIG_HID_BATTERY_STRENGTH is not set # CONFIG_HIDRAW is not set # CONFIG_UHID is not set CONFIG_HID_GENERIC=y # # Special HID drivers # # CONFIG_HID_A4TECH is not set # CONFIG_HID_ACRUX is not set # CONFIG_HID_APPLE is not set # CONFIG_HID_ASUS is not set # CONFIG_HID_AUREAL is not set # CONFIG_HID_BELKIN is not set # CONFIG_HID_CHERRY is not set # CONFIG_HID_CHICONY is not set # CONFIG_HID_CMEDIA is not set # CONFIG_HID_CYPRESS is not set # CONFIG_HID_DRAGONRISE is not set # CONFIG_HID_EMS_FF is not set # CONFIG_HID_ELECOM is not set # CONFIG_HID_EZKEY is not set # CONFIG_HID_GEMBIRD is not set # CONFIG_HID_GFRM is not set # CONFIG_HID_KEYTOUCH is not set # CONFIG_HID_KYE is not set # CONFIG_HID_WALTOP is not set # CONFIG_HID_GYRATION is not set # CONFIG_HID_ICADE is not set # CONFIG_HID_ITE is not set # CONFIG_HID_JABRA is not set # CONFIG_HID_TWINHAN is not set # CONFIG_HID_KENSINGTON is not set # CONFIG_HID_LCPOWER is not set # CONFIG_HID_LED is not set # CONFIG_HID_LENOVO is not set # CONFIG_HID_LOGITECH is not set # CONFIG_HID_MAGICMOUSE is not set # CONFIG_HID_MAYFLASH is not set # CONFIG_HID_MICROSOFT is not set # CONFIG_HID_MONTEREY is not set # CONFIG_HID_MULTITOUCH is not set # CONFIG_HID_NTI is not set # CONFIG_HID_ORTEK is not set # CONFIG_HID_PANTHERLORD is not set # CONFIG_HID_PETALYNX is not set # CONFIG_HID_PICOLCD is not set # CONFIG_HID_PLANTRONICS is not set # CONFIG_HID_PRIMAX is not set # CONFIG_HID_SAITEK is not set # CONFIG_HID_SAMSUNG is not set # CONFIG_HID_SPEEDLINK is not set # CONFIG_HID_STEELSERIES is not set # CONFIG_HID_SUNPLUS is not set # CONFIG_HID_RMI is not set # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set # CONFIG_HID_TIVO is not set # CONFIG_HID_TOPSEED is not set # CONFIG_HID_THINGM is not set # CONFIG_HID_THRUSTMASTER is not set # CONFIG_HID_UDRAW_PS3 is not set # CONFIG_HID_WIIMOTE is not set # CONFIG_HID_XINMO is not set # CONFIG_HID_ZEROPLUS is not set # CONFIG_HID_ZYDACRON is not set # CONFIG_HID_SENSOR_HUB is not set # CONFIG_HID_ALPS is not set # # I2C HID support # # CONFIG_I2C_HID is not set CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y # CONFIG_USB is not set CONFIG_USB_PCI=y # # USB port drivers # # # USB Physical Layer drivers # # CONFIG_NOP_USB_XCEIV is not set # CONFIG_USB_GPIO_VBUS is not set # CONFIG_TAHVO_USB is not set # CONFIG_USB_GADGET is not set # CONFIG_TYPEC is not set # CONFIG_USB_LED_TRIG is not set # CONFIG_USB_ULPI_BUS is not set CONFIG_UWB=y # CONFIG_UWB_WHCI is not set CONFIG_MMC=y # CONFIG_SDIO_UART is not set CONFIG_MMC_TEST=y # # MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_DEBUG is not set CONFIG_MMC_SDHCI=y # CONFIG_MMC_SDHCI_PCI is not set # CONFIG_MMC_SDHCI_ACPI is not set CONFIG_MMC_SDHCI_PLTFM=y # CONFIG_MMC_SDHCI_F_SDH30 is not set # CONFIG_MMC_WBSD is not set # CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_GOLDFISH is not set # CONFIG_MMC_CB710 is not set # CONFIG_MMC_VIA_SDMMC is not set # CONFIG_MMC_USDHI6ROL0 is not set # CONFIG_MMC_CQHCI is not set # CONFIG_MMC_TOSHIBA_PCI is not set CONFIG_MMC_MTK=y CONFIG_MMC_SDHCI_XENON=y CONFIG_MEMSTICK=y CONFIG_MEMSTICK_DEBUG=y # # MemoryStick drivers # CONFIG_MEMSTICK_UNSAFE_RESUME=y # # MemoryStick Host Controller Drivers # # CONFIG_MEMSTICK_TIFM_MS is not set # CONFIG_MEMSTICK_JMICRON_38X is not set # CONFIG_MEMSTICK_R592 is not set CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS_FLASH=y CONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y # # LED drivers # CONFIG_LEDS_88PM860X=y # CONFIG_LEDS_AS3645A is not set CONFIG_LEDS_LM3530=y CONFIG_LEDS_LM3642=y CONFIG_LEDS_MT6323=y # CONFIG_LEDS_PCA9532 is not set CONFIG_LEDS_GPIO=y CONFIG_LEDS_LP3944=y # CONFIG_LEDS_LP3952 is not set CONFIG_LEDS_LP55XX_COMMON=y CONFIG_LEDS_LP5521=y CONFIG_LEDS_LP5523=y CONFIG_LEDS_LP5562=y # CONFIG_LEDS_LP8501 is not set CONFIG_LEDS_LP8788=y CONFIG_LEDS_PCA955X=y # CONFIG_LEDS_PCA955X_GPIO is not set # CONFIG_LEDS_PCA963X is not set CONFIG_LEDS_DA9052=y CONFIG_LEDS_REGULATOR=y # CONFIG_LEDS_BD2802 is not set CONFIG_LEDS_LT3593=y CONFIG_LEDS_ADP5520=y CONFIG_LEDS_MC13783=y CONFIG_LEDS_TCA6507=y CONFIG_LEDS_TLC591XX=y CONFIG_LEDS_MAX8997=y CONFIG_LEDS_LM355x=y CONFIG_LEDS_OT200=y CONFIG_LEDS_MENF21BMC=y # # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # CONFIG_LEDS_BLINKM=y CONFIG_LEDS_MLXREG=y # CONFIG_LEDS_USER is not set # CONFIG_LEDS_NIC78BX is not set # # LED Triggers # CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_MTD=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set CONFIG_LEDS_TRIGGER_CPU=y # CONFIG_LEDS_TRIGGER_ACTIVITY is not set # CONFIG_LEDS_TRIGGER_GPIO is not set CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # # iptables trigger is under Netfilter config (LED target) # CONFIG_LEDS_TRIGGER_TRANSIENT=y CONFIG_LEDS_TRIGGER_CAMERA=y CONFIG_LEDS_TRIGGER_PANIC=y CONFIG_LEDS_TRIGGER_NETDEV=y # CONFIG_ACCESSIBILITY is not set CONFIG_INFINIBAND=y CONFIG_INFINIBAND_USER_MAD=y CONFIG_INFINIBAND_USER_ACCESS=y # CONFIG_INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI is not set CONFIG_INFINIBAND_USER_MEM=y CONFIG_INFINIBAND_ON_DEMAND_PAGING=y CONFIG_INFINIBAND_ADDR_TRANS=y # CONFIG_INFINIBAND_MTHCA is not set # CONFIG_MLX4_INFINIBAND is not set # CONFIG_INFINIBAND_NES is not set # CONFIG_INFINIBAND_OCRDMA is not set CONFIG_INFINIBAND_IPOIB=y CONFIG_INFINIBAND_IPOIB_CM=y # CONFIG_INFINIBAND_IPOIB_DEBUG is not set # CONFIG_RDMA_RXE is not set CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EDAC=y CONFIG_EDAC_LEGACY_SYSFS=y CONFIG_EDAC_DEBUG=y # CONFIG_EDAC_AMD76X is not set # CONFIG_EDAC_E7XXX is not set # CONFIG_EDAC_E752X is not set # CONFIG_EDAC_I82875P is not set # CONFIG_EDAC_I82975X is not set # CONFIG_EDAC_I3000 is not set # CONFIG_EDAC_I3200 is not set # CONFIG_EDAC_IE31200 is not set # CONFIG_EDAC_X38 is not set # CONFIG_EDAC_I5400 is not set # CONFIG_EDAC_I82860 is not set # CONFIG_EDAC_R82600 is not set # CONFIG_EDAC_I5000 is not set # CONFIG_EDAC_I5100 is not set # CONFIG_EDAC_I7300 is not set CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y # CONFIG_RTC_CLASS is not set CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set # # DMA Devices # CONFIG_DMA_ENGINE=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_ACPI=y CONFIG_ALTERA_MSGDMA=y CONFIG_INTEL_IDMA64=y # CONFIG_PCH_DMA is not set CONFIG_QCOM_HIDMA_MGMT=y # CONFIG_QCOM_HIDMA is not set CONFIG_DW_DMAC_CORE=y CONFIG_DW_DMAC=y # CONFIG_DW_DMAC_PCI is not set CONFIG_HSU_DMA=y # # DMA Clients # CONFIG_ASYNC_TX_DMA=y # CONFIG_DMATEST is not set # # DMABUF options # CONFIG_SYNC_FILE=y CONFIG_SW_SYNC=y # CONFIG_AUXDISPLAY is not set CONFIG_CHARLCD=y CONFIG_PANEL=y CONFIG_PANEL_PARPORT=0 CONFIG_PANEL_PROFILE=5 CONFIG_PANEL_CHANGE_MESSAGE=y CONFIG_PANEL_BOOT_MESSAGE="" CONFIG_UIO=y # CONFIG_UIO_CIF is not set CONFIG_UIO_PDRV_GENIRQ=y CONFIG_UIO_DMEM_GENIRQ=y # CONFIG_UIO_AEC is not set # CONFIG_UIO_SERCOS3 is not set # CONFIG_UIO_PCI_GENERIC is not set # CONFIG_UIO_NETX is not set CONFIG_UIO_PRUSS=y # CONFIG_UIO_MF624 is not set # CONFIG_VIRT_DRIVERS is not set CONFIG_VIRTIO=y CONFIG_VIRTIO_MENU=y # CONFIG_VIRTIO_PCI is not set # CONFIG_VIRTIO_BALLOON is not set # CONFIG_VIRTIO_INPUT is not set # CONFIG_VIRTIO_MMIO is not set # # Microsoft Hyper-V guest support # CONFIG_STAGING=y CONFIG_IPX=y # CONFIG_IPX_INTERN is not set CONFIG_NCP_FS=y # CONFIG_NCPFS_PACKET_SIGNING is not set # CONFIG_NCPFS_IOCTL_LOCKING is not set # CONFIG_NCPFS_STRONG is not set CONFIG_NCPFS_NFS_NS=y # CONFIG_NCPFS_OS2_NS is not set # CONFIG_NCPFS_SMALLDOS is not set CONFIG_NCPFS_NLS=y # CONFIG_NCPFS_EXTRAS is not set CONFIG_COMEDI=y CONFIG_COMEDI_DEBUG=y CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048 CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480 CONFIG_COMEDI_MISC_DRIVERS=y CONFIG_COMEDI_BOND=y # CONFIG_COMEDI_TEST is not set # CONFIG_COMEDI_PARPORT is not set CONFIG_COMEDI_SERIAL2002=y CONFIG_COMEDI_SSV_DNP=y # CONFIG_COMEDI_ISA_DRIVERS is not set # CONFIG_COMEDI_PCI_DRIVERS is not set CONFIG_COMEDI_8255=y CONFIG_COMEDI_8255_SA=y CONFIG_COMEDI_KCOMEDILIB=y # CONFIG_FB_SM750 is not set # CONFIG_FB_XGI is not set # # Speakup console speech # CONFIG_STAGING_MEDIA=y # # Android # CONFIG_GOLDFISH_AUDIO=y CONFIG_MTD_GOLDFISH_NAND=y CONFIG_LNET=y CONFIG_LNET_MAX_PAYLOAD=1048576 CONFIG_LNET_SELFTEST=y CONFIG_LNET_XPRT_IB=y # CONFIG_LUSTRE_FS is not set # CONFIG_DGNC is not set # CONFIG_GS_FPGABOOT is not set # CONFIG_UNISYSSPAR is not set CONFIG_WILC1000=y CONFIG_WILC1000_SDIO=y # CONFIG_WILC1000_HW_OOB_INTR is not set CONFIG_MOST=y CONFIG_MOST_CDEV=y CONFIG_MOST_NET=y # CONFIG_MOST_DIM2 is not set CONFIG_MOST_I2C=y # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set # # USB Power Delivery and Type-C drivers # # CONFIG_MTK_MMC is not set # CONFIG_X86_PLATFORM_DEVICES is not set CONFIG_PMC_ATOM=y # CONFIG_GOLDFISH_BUS is not set # CONFIG_GOLDFISH_PIPE is not set CONFIG_CHROME_PLATFORMS=y # CONFIG_CHROMEOS_PSTORE is not set # CONFIG_CROS_EC_LPC is not set CONFIG_CROS_EC_PROTO=y # CONFIG_CROS_KBD_LED_BACKLIGHT is not set # CONFIG_MELLANOX_PLATFORM is not set CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y # # Common Clock Framework # # CONFIG_COMMON_CLK_SI5351 is not set # CONFIG_COMMON_CLK_SI544 is not set # CONFIG_COMMON_CLK_CDCE706 is not set # CONFIG_COMMON_CLK_CS2000_CP is not set # CONFIG_CLK_TWL6040 is not set # CONFIG_COMMON_CLK_PALMAS is not set # CONFIG_HWSPINLOCK is not set # # Clock Source drivers # CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y # CONFIG_MAILBOX is not set # CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers # # CONFIG_REMOTEPROC is not set # # Rpmsg drivers # CONFIG_RPMSG=y # CONFIG_RPMSG_CHAR is not set CONFIG_RPMSG_VIRTIO=y CONFIG_SOUNDWIRE=y # # SoundWire Devices # # CONFIG_SOUNDWIRE_INTEL is not set # # SOC (System On Chip) specific Drivers # # # Amlogic SoC drivers # # # Broadcom SoC drivers # # # i.MX SoC drivers # # # Qualcomm SoC drivers # CONFIG_SOC_TI=y # # Xilinx SoC drivers # CONFIG_XILINX_VCU=y CONFIG_PM_DEVFREQ=y # # DEVFREQ Governors # CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y CONFIG_DEVFREQ_GOV_PERFORMANCE=y CONFIG_DEVFREQ_GOV_POWERSAVE=y CONFIG_DEVFREQ_GOV_USERSPACE=y CONFIG_DEVFREQ_GOV_PASSIVE=y # # DEVFREQ Drivers # CONFIG_PM_DEVFREQ_EVENT=y CONFIG_EXTCON=y # # Extcon Device Drivers # # CONFIG_EXTCON_AXP288 is not set # CONFIG_EXTCON_GPIO is not set # CONFIG_EXTCON_INTEL_INT3496 is not set # CONFIG_EXTCON_MAX3355 is not set CONFIG_EXTCON_MAX77843=y # CONFIG_EXTCON_MAX8997 is not set CONFIG_EXTCON_PALMAS=y CONFIG_EXTCON_RT8973A=y CONFIG_EXTCON_SM5502=y # CONFIG_EXTCON_USB_GPIO is not set # CONFIG_EXTCON_USBC_CROS_EC is not set # CONFIG_MEMORY is not set # CONFIG_IIO is not set # CONFIG_NTB is not set # CONFIG_VME_BUS is not set # CONFIG_PWM is not set # # IRQ chip support # CONFIG_ARM_GIC_MAX_NR=1 CONFIG_IPACK_BUS=y # CONFIG_BOARD_TPCI200 is not set # CONFIG_SERIAL_IPOCTAL is not set CONFIG_RESET_CONTROLLER=y CONFIG_RESET_TI_SYSCON=y CONFIG_FMC=y CONFIG_FMC_FAKEDEV=y CONFIG_FMC_TRIVIAL=y CONFIG_FMC_WRITE_EEPROM=y CONFIG_FMC_CHARDEV=y # # PHY Subsystem # CONFIG_GENERIC_PHY=y # CONFIG_BCM_KONA_USB2_PHY is not set # CONFIG_PHY_PXA_28NM_HSIC is not set CONFIG_PHY_PXA_28NM_USB2=y # CONFIG_POWERCAP is not set CONFIG_MCB=y # CONFIG_MCB_PCI is not set CONFIG_MCB_LPC=y # # Performance monitor support # CONFIG_RAS=y # CONFIG_RAS_CEC is not set # CONFIG_THUNDERBOLT is not set # # Android # # CONFIG_ANDROID is not set CONFIG_DAX=y # CONFIG_DEV_DAX is not set CONFIG_NVMEM=y # # HW tracing support # # CONFIG_STM is not set # CONFIG_INTEL_TH is not set CONFIG_FPGA=y # CONFIG_ALTERA_PR_IP_CORE is not set # CONFIG_FPGA_MGR_ALTERA_CVP is not set CONFIG_FPGA_BRIDGE=y CONFIG_XILINX_PR_DECOUPLER=y CONFIG_FPGA_REGION=y CONFIG_PM_OPP=y # CONFIG_SIOX is not set CONFIG_SLIMBUS=y # CONFIG_SLIM_QCOM_CTRL is not set # # Firmware Drivers # CONFIG_EDD=y CONFIG_EDD_OFF=y CONFIG_FIRMWARE_MEMMAP=y CONFIG_DELL_RBU=y # CONFIG_DCDBAS is not set # CONFIG_ISCSI_IBFT_FIND is not set # CONFIG_FW_CFG_SYSFS is not set # CONFIG_GOOGLE_FIRMWARE is not set # # Tegra firmware driver # # # File systems # CONFIG_DCACHE_WORD_ACCESS=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y CONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_FILE_LOCKING=y # CONFIG_MANDATORY_FILE_LOCKING is not set CONFIG_FS_ENCRYPTION=y CONFIG_FSNOTIFY=y # CONFIG_DNOTIFY is not set CONFIG_INOTIFY_USER=y # CONFIG_FANOTIFY is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS4_FS is not set CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_OVERLAY_FS=y # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set # CONFIG_OVERLAY_FS_XINO_AUTO is not set # # Caches # # CONFIG_FSCACHE is not set # # Pseudo filesystems # CONFIG_PROC_FS=y # CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y # CONFIG_PROC_CHILDREN is not set CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set # CONFIG_TMPFS_XATTR is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y # CONFIG_CONFIGFS_FS is not set # CONFIG_MISC_FILESYSTEMS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V2=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4=y # CONFIG_NFS_SWAP is not set # CONFIG_NFS_V4_1 is not set # CONFIG_ROOT_NFS is not set # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y # CONFIG_NFSD is not set CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_SUNRPC_DEBUG is not set CONFIG_SUNRPC_XPRT_RDMA=y # CONFIG_CEPH_FS is not set CONFIG_CIFS=y # CONFIG_CIFS_STATS is not set # CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_UPCALL=y # CONFIG_CIFS_XATTR is not set CONFIG_CIFS_DEBUG=y # CONFIG_CIFS_DEBUG2 is not set CONFIG_CIFS_DEBUG_DUMP_KEYS=y CONFIG_CIFS_DFS_UPCALL=y CONFIG_CIFS_SMB311=y CONFIG_CIFS_SMB_DIRECT=y # CONFIG_CODA_FS is not set CONFIG_AFS_FS=y CONFIG_AFS_DEBUG=y CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set CONFIG_NLS_CODEPAGE_775=y CONFIG_NLS_CODEPAGE_850=y # CONFIG_NLS_CODEPAGE_852 is not set # CONFIG_NLS_CODEPAGE_855 is not set CONFIG_NLS_CODEPAGE_857=y CONFIG_NLS_CODEPAGE_860=y CONFIG_NLS_CODEPAGE_861=y # CONFIG_NLS_CODEPAGE_862 is not set CONFIG_NLS_CODEPAGE_863=y CONFIG_NLS_CODEPAGE_864=y CONFIG_NLS_CODEPAGE_865=y CONFIG_NLS_CODEPAGE_866=y CONFIG_NLS_CODEPAGE_869=y CONFIG_NLS_CODEPAGE_936=y CONFIG_NLS_CODEPAGE_950=y CONFIG_NLS_CODEPAGE_932=y # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set CONFIG_NLS_ISO8859_8=y # CONFIG_NLS_CODEPAGE_1250 is not set CONFIG_NLS_CODEPAGE_1251=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set CONFIG_NLS_ISO8859_4=y CONFIG_NLS_ISO8859_5=y CONFIG_NLS_ISO8859_6=y # CONFIG_NLS_ISO8859_7 is not set CONFIG_NLS_ISO8859_9=y # CONFIG_NLS_ISO8859_13 is not set CONFIG_NLS_ISO8859_14=y CONFIG_NLS_ISO8859_15=y CONFIG_NLS_KOI8_R=y CONFIG_NLS_KOI8_U=y CONFIG_NLS_MAC_ROMAN=y CONFIG_NLS_MAC_CELTIC=y CONFIG_NLS_MAC_CENTEURO=y CONFIG_NLS_MAC_CROATIAN=y CONFIG_NLS_MAC_CYRILLIC=y # CONFIG_NLS_MAC_GAELIC is not set CONFIG_NLS_MAC_GREEK=y # CONFIG_NLS_MAC_ICELAND is not set CONFIG_NLS_MAC_INUIT=y CONFIG_NLS_MAC_ROMANIAN=y CONFIG_NLS_MAC_TURKISH=y CONFIG_NLS_UTF8=y # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # # printk and dmesg options # CONFIG_PRINTK_TIME=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set # # Compile-time checks and compiler options # CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=y # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_GDB_SCRIPTS is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 CONFIG_STRIP_ASM_SYMS=y # CONFIG_READABLE_ASM is not set # CONFIG_UNUSED_SYMBOLS is not set CONFIG_PAGE_OWNER=y CONFIG_DEBUG_FS=y CONFIG_HEADERS_CHECK=y # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 CONFIG_MAGIC_SYSRQ_SERIAL=y CONFIG_DEBUG_KERNEL=y # # Memory Debugging # CONFIG_PAGE_EXTENSION=y # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_PAGE_POISONING is not set CONFIG_DEBUG_PAGE_REF=y # CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_OBJECTS is not set CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUG_VM=y # CONFIG_DEBUG_VM_VMACACHE is not set CONFIG_DEBUG_VM_RB=y # CONFIG_DEBUG_VM_PGFLAGS is not set CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set CONFIG_DEBUG_MEMORY_INIT=y CONFIG_HAVE_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_STACKOVERFLOW is not set CONFIG_DEBUG_SHIRQ=y # # Debug Lockups and Hangs # CONFIG_LOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HARDLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0 # CONFIG_DETECT_HUNG_TASK is not set CONFIG_WQ_WATCHDOG=y # CONFIG_PANIC_ON_OOPS is not set CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 CONFIG_SCHED_DEBUG=y # CONFIG_SCHEDSTATS is not set CONFIG_SCHED_STACK_END_CHECK=y # CONFIG_DEBUG_TIMEKEEPING is not set # CONFIG_DEBUG_PREEMPT is not set # # Lock Debugging (spinlocks, mutexes, etc...) # CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT is not set CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_LOCKDEP=y CONFIG_DEBUG_LOCKDEP=y CONFIG_DEBUG_ATOMIC_SLEEP=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set CONFIG_LOCK_TORTURE_TEST=y # CONFIG_WW_MUTEX_SELFTEST is not set CONFIG_TRACE_IRQFLAGS=y CONFIG_STACKTRACE=y CONFIG_WARN_ALL_UNSEEDED_RANDOM=y # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_LIST=y # CONFIG_DEBUG_PI_LIST is not set CONFIG_DEBUG_SG=y # CONFIG_DEBUG_NOTIFIERS is not set CONFIG_DEBUG_CREDENTIALS=y # # RCU Debugging # CONFIG_TORTURE_TEST=y # CONFIG_RCU_PERF_TEST is not set CONFIG_RCU_TORTURE_TEST=y CONFIG_RCU_CPU_STALL_TIMEOUT=21 CONFIG_RCU_TRACE=y CONFIG_RCU_EQS_DEBUG=y CONFIG_DEBUG_WQ_FORCE_RR_CPU=y CONFIG_NOTIFIER_ERROR_INJECTION=y CONFIG_PM_NOTIFIER_ERROR_INJECT=y CONFIG_NETDEV_NOTIFIER_ERROR_INJECT=y CONFIG_FAULT_INJECTION=y CONFIG_FAIL_PAGE_ALLOC=y # CONFIG_FAIL_FUTEX is not set # CONFIG_FAULT_INJECTION_DEBUG_FS is not set # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACER_MAX_TRACE=y CONFIG_TRACE_CLOCK=y CONFIG_RING_BUFFER=y CONFIG_EVENT_TRACING=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_RING_BUFFER_ALLOW_SWAP=y CONFIG_TRACING=y CONFIG_GENERIC_TRACER=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y CONFIG_FUNCTION_TRACER=y CONFIG_PREEMPTIRQ_EVENTS=y CONFIG_IRQSOFF_TRACER=y # CONFIG_PREEMPT_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_HWLAT_TRACER is not set # CONFIG_FTRACE_SYSCALLS is not set CONFIG_TRACER_SNAPSHOT=y CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y CONFIG_TRACE_BRANCH_PROFILING=y # CONFIG_BRANCH_PROFILE_NONE is not set CONFIG_PROFILE_ANNOTATED_BRANCHES=y # CONFIG_BRANCH_TRACER is not set CONFIG_STACK_TRACER=y # CONFIG_UPROBE_EVENTS is not set # CONFIG_DYNAMIC_FTRACE is not set CONFIG_FUNCTION_PROFILER=y # CONFIG_FTRACE_STARTUP_TEST is not set # CONFIG_MMIOTRACE is not set # CONFIG_HIST_TRIGGERS is not set # CONFIG_TRACEPOINT_BENCHMARK is not set CONFIG_RING_BUFFER_BENCHMARK=y # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_TRACE_EVAL_MAP_FILE is not set CONFIG_TRACING_EVENTS_GPIO=y # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_DMA_API_DEBUG is not set CONFIG_RUNTIME_TESTING_MENU=y # CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_SORT is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_RBTREE_TEST is not set # CONFIG_INTERVAL_TREE_TEST is not set # CONFIG_ATOMIC64_SELFTEST is not set CONFIG_TEST_HEXDUMP=y CONFIG_TEST_STRING_HELPERS=y CONFIG_TEST_KSTRTOX=y CONFIG_TEST_PRINTF=y # CONFIG_TEST_BITMAP is not set # CONFIG_TEST_UUID is not set CONFIG_TEST_RHASHTABLE=y # CONFIG_TEST_HASH is not set # CONFIG_TEST_PARMAN is not set CONFIG_FIND_BIT_BENCHMARK=y CONFIG_TEST_FIRMWARE=y # CONFIG_TEST_SYSCTL is not set CONFIG_TEST_UDELAY=y # CONFIG_MEMTEST is not set CONFIG_BUG_ON_DATA_CORRUPTION=y # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y CONFIG_UBSAN=y # CONFIG_UBSAN_SANITIZE_ALL is not set # CONFIG_UBSAN_ALIGNMENT is not set # CONFIG_UBSAN_NULL is not set CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set # CONFIG_EARLY_PRINTK_USB_XDBC is not set CONFIG_X86_PTDUMP_CORE=y CONFIG_X86_PTDUMP=y CONFIG_DEBUG_WX=y # CONFIG_DOUBLEFAULT is not set # CONFIG_DEBUG_TLBFLUSH is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2 CONFIG_IO_DELAY_TYPE_NONE=3 CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=0 CONFIG_DEBUG_BOOT_PARAMS=y # CONFIG_CPA_DEBUG is not set CONFIG_OPTIMIZE_INLINING=y CONFIG_DEBUG_ENTRY=y CONFIG_X86_DEBUG_FPU=y # CONFIG_PUNIT_ATOM_DEBUG is not set CONFIG_UNWINDER_FRAME_POINTER=y # # Security options # CONFIG_KEYS=y CONFIG_PERSISTENT_KEYRINGS=y # CONFIG_BIG_KEYS is not set # CONFIG_TRUSTED_KEYS is not set CONFIG_ENCRYPTED_KEYS=y # CONFIG_KEY_DH_OPERATIONS is not set CONFIG_SECURITY_DMESG_RESTRICT=y # CONFIG_SECURITY is not set CONFIG_SECURITYFS=y CONFIG_FORTIFY_SOURCE=y # CONFIG_STATIC_USERMODEHELPER is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY="" CONFIG_CRYPTO=y # # Crypto core or helper # CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_BLKCIPHER=y CONFIG_CRYPTO_BLKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_RSA=y # CONFIG_CRYPTO_DH is not set CONFIG_CRYPTO_ECDH=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_USER=y CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_CRYPTD=y CONFIG_CRYPTO_MCRYPTD=y CONFIG_CRYPTO_AUTHENC=y CONFIG_CRYPTO_SIMD=y # # Authenticated Encryption with Associated Data # CONFIG_CRYPTO_CCM=y CONFIG_CRYPTO_GCM=y CONFIG_CRYPTO_CHACHA20POLY1305=y CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_ECHAINIV=y # # Block modes # CONFIG_CRYPTO_CBC=y # CONFIG_CRYPTO_CFB is not set CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_ECB=y CONFIG_CRYPTO_LRW=y CONFIG_CRYPTO_PCBC=y CONFIG_CRYPTO_XTS=y CONFIG_CRYPTO_KEYWRAP=y # # Hash modes # CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_XCBC=y CONFIG_CRYPTO_VMAC=y # # Digest # CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRC32C_INTEL=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32_PCLMUL=y # CONFIG_CRYPTO_CRCT10DIF is not set CONFIG_CRYPTO_GHASH=y CONFIG_CRYPTO_POLY1305=y CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_MICHAEL_MIC=y # CONFIG_CRYPTO_RMD128 is not set # CONFIG_CRYPTO_RMD160 is not set CONFIG_CRYPTO_RMD256=y CONFIG_CRYPTO_RMD320=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA3=y # CONFIG_CRYPTO_SM3 is not set CONFIG_CRYPTO_TGR192=y CONFIG_CRYPTO_WP512=y # # Ciphers # CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES_TI=y CONFIG_CRYPTO_AES_586=y CONFIG_CRYPTO_AES_NI_INTEL=y CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_ARC4=y # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_CAMELLIA is not set CONFIG_CRYPTO_CAST_COMMON=y CONFIG_CRYPTO_CAST5=y # CONFIG_CRYPTO_CAST6 is not set CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_FCRYPT=y # CONFIG_CRYPTO_KHAZAD is not set CONFIG_CRYPTO_SALSA20=y # CONFIG_CRYPTO_SALSA20_586 is not set CONFIG_CRYPTO_CHACHA20=y # CONFIG_CRYPTO_SEED is not set CONFIG_CRYPTO_SERPENT=y # CONFIG_CRYPTO_SERPENT_SSE2_586 is not set CONFIG_CRYPTO_SM4=y CONFIG_CRYPTO_SPECK=y CONFIG_CRYPTO_TEA=y # CONFIG_CRYPTO_TWOFISH is not set CONFIG_CRYPTO_TWOFISH_COMMON=y CONFIG_CRYPTO_TWOFISH_586=y # # Compression # CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_842=y CONFIG_CRYPTO_LZ4=y CONFIG_CRYPTO_LZ4HC=y # # Random Number Generation # # CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_DRBG_HMAC=y # CONFIG_CRYPTO_DRBG_HASH is not set CONFIG_CRYPTO_DRBG_CTR=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_USER_API=y CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_SKCIPHER=y CONFIG_CRYPTO_USER_API_RNG=y CONFIG_CRYPTO_USER_API_AEAD=y CONFIG_CRYPTO_HASH_INFO=y # CONFIG_CRYPTO_HW is not set CONFIG_ASYMMETRIC_KEY_TYPE=y # CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not set # # Certificates for signature checking # CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set # CONFIG_SECONDARY_TRUSTED_KEYRING is not set CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" CONFIG_HAVE_KVM=y CONFIG_VIRTUALIZATION=y CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y CONFIG_BINARY_PRINTF=y # # Library routines # CONFIG_BITREVERSE=y CONFIG_RATIONAL=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_HAS_FAST_MULTIPLIER=y CONFIG_CRC_CCITT=y CONFIG_CRC16=y # CONFIG_CRC_T10DIF is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y # CONFIG_CRC32_SELFTEST is not set # CONFIG_CRC32_SLICEBY8 is not set CONFIG_CRC32_SLICEBY4=y # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set CONFIG_CRC4=y # CONFIG_CRC7 is not set CONFIG_LIBCRC32C=y # CONFIG_CRC8 is not set CONFIG_AUDIT_GENERIC=y CONFIG_RANDOM32_SELFTEST=y CONFIG_842_COMPRESS=y CONFIG_842_DECOMPRESS=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_LZ4_COMPRESS=y CONFIG_LZ4HC_COMPRESS=y CONFIG_LZ4_DECOMPRESS=y CONFIG_XZ_DEC=y # CONFIG_XZ_DEC_X86 is not set # CONFIG_XZ_DEC_POWERPC is not set CONFIG_XZ_DEC_IA64=y # CONFIG_XZ_DEC_ARM is not set CONFIG_XZ_DEC_ARMTHUMB=y # CONFIG_XZ_DEC_SPARC is not set CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_TEST=y CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_BZIP2=y CONFIG_DECOMPRESS_LZ4=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_DEC16=y CONFIG_BCH=y CONFIG_BCH_CONST_PARAMS=y CONFIG_RADIX_TREE_MULTIORDER=y CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y CONFIG_SGL_ALLOC=y CONFIG_DMA_DIRECT_OPS=y CONFIG_DQL=y CONFIG_GLOB=y CONFIG_GLOB_SELFTEST=y CONFIG_NLATTR=y CONFIG_CLZ_TAB=y CONFIG_CORDIC=y CONFIG_DDR=y CONFIG_IRQ_POLL=y CONFIG_MPILIB=y CONFIG_OID_REGISTRY=y CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_STACKDEPOT=y CONFIG_PARMAN=y CONFIG_STRING_SELFTEST=y -------------- next part -------------- #!/bin/sh export_top_env() { export suite='boot' export testcase='boot' export timeout='10m' export job_origin='/lkp/lkp/src/jobs/boot.yaml' export queue='validate' export testbox='vm-lkp-nhm-dp1-yocto-i386-7' export tbox_group='vm-lkp-nhm-dp1-yocto-i386' export branch='linus/master' export commit='60cc43fc888428bb2f18f08997432d426a243338' export kconfig='i386-randconfig-s1-201814' export repeat_to=4 export submit_id='5ad498cb0b9a9321a9e97fce' export job_file='/lkp/scheduled/vm-lkp-nhm-dp1-yocto-i386-7/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180416-74153-1703sy7-0.yaml' export id='afbb8d8c455a334c1b9435edf4a7c1b5586623d7' export model='qemu-system-i386 -enable-kvm' export nr_vm=20 export nr_cpu=1 export memory='256M' export rootfs='yocto-tiny-i386-2016-04-22.cgz' export need_kconfig='CONFIG_KVM_GUEST=y' export compiler='gcc-6' export enqueue_time='2018-04-16 20:36:27 +0800' export _id='5ad498cb0b9a9321a9e97fce' export _rt='/result/boot/1/vm-lkp-nhm-dp1-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338' export user='lkp' export result_root='/result/boot/1/vm-lkp-nhm-dp1-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/0' export LKP_SERVER='inn' export max_uptime=600 export initrd='/osimage/yocto/yocto-tiny-i386-2016-04-22.cgz' export bootloader_append='root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-nhm-dp1-yocto-i386-7/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180416-74153-1703sy7-0.yaml ARCH=i386 kconfig=i386-randconfig-s1-201814 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp1-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw' export bm_initrd='/osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig.i386_2016-09-03.cgz' export lkp_initrd='/lkp/lkp/lkp-i386.cgz' export site='inn' export LKP_CGI_PORT=80 export LKP_CIFS_PORT=139 export kernel='/pkg/linux/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1' export dequeue_time='2018-04-16 20:44:37 +0800' export job_initrd='/lkp/scheduled/vm-lkp-nhm-dp1-yocto-i386-7/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180416-74153-1703sy7-0.cgz' [ -n "$LKP_SRC" ] || export LKP_SRC=/lkp/${user:-lkp}/src } run_job() { echo $$ > $TMP/run-job.pid . $LKP_SRC/lib/http.sh . $LKP_SRC/lib/job.sh . $LKP_SRC/lib/env.sh export_top_env run_monitor $LKP_SRC/monitors/one-shot/wrapper boot-slabinfo run_monitor $LKP_SRC/monitors/one-shot/wrapper boot-meminfo run_monitor $LKP_SRC/monitors/one-shot/wrapper memmap run_monitor $LKP_SRC/monitors/no-stdout/wrapper boot-time run_monitor $LKP_SRC/monitors/wrapper kmsg run_monitor $LKP_SRC/monitors/wrapper oom-killer run_monitor $LKP_SRC/monitors/plain/watchdog run_test $LKP_SRC/tests/wrapper sleep 1 } extract_stats() { $LKP_SRC/stats/wrapper boot-slabinfo $LKP_SRC/stats/wrapper boot-meminfo $LKP_SRC/stats/wrapper memmap $LKP_SRC/stats/wrapper boot-memory $LKP_SRC/stats/wrapper boot-time $LKP_SRC/stats/wrapper kernel-size $LKP_SRC/stats/wrapper kmsg $LKP_SRC/stats/wrapper time sleep.time $LKP_SRC/stats/wrapper time $LKP_SRC/stats/wrapper dmesg $LKP_SRC/stats/wrapper kmsg $LKP_SRC/stats/wrapper stderr $LKP_SRC/stats/wrapper last_state } "$@" -------------- next part -------------- #!/bin/bash # To reproduce, # 1) save job-script and this script (both are attached in 0day report email) # 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH kernel=$1 initrds=( /osimage/yocto/yocto-tiny-i386-2016-04-22.cgz /lkp/lkp/lkp-i386.cgz /osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig.i386_2016-09-03.cgz ) HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}" { cat "${initrds[@]//*\//}" [[ $INSTALL_MOD_PATH ]] && ( cd "$INSTALL_MOD_PATH" find lib | cpio -o -H newc --quiet | gzip ) echo job-script | cpio -o -H newc --quiet | gzip } > initrd.img kvm=( qemu-system-i386 -enable-kvm -kernel $kernel -initrd initrd.img -m 256 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial stdio -display none -monitor null ) append=( ip=::::vm-lkp-nhm-dp1-yocto-i386-7::dhcp root=/dev/ram0 user=lkp job=/job-script ARCH=i386 kconfig=i386-randconfig-s1-201814 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp1-yocto-i386/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-s1-201814/gcc-6/60cc43fc888428bb2f18f08997432d426a243338/0 result_service=tmpfs debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.minor_count=8 rcuperf.shutdown=0 ) "${kvm[@]}" -append "${append[*]}" From fengguang.wu at intel.com Wed Apr 18 14:13:17 2018 From: fengguang.wu at intel.com (Fengguang Wu) Date: Wed, 18 Apr 2018 22:13:17 +0800 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: unable to handle kernel NULL pointer dereference at 00000050 In-Reply-To: References: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> Message-ID: <20180418141317.76o6yzrhjjeavmd7@wfg-t540p.sh.intel.com> Hi James, On Wed, Apr 18, 2018 at 02:59:15PM +0100, James Simmons wrote: > >> Hello, >> >> FYI this happens in mainline kernel 4.17.0-rc1. >> It looks like a new regression. >> >> [ 7.587002] lnet_selftest_init+0x2c4/0x5d9: >> lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:134 >> [ 7.587002] ? lnet_selftest_exit+0x8d/0x8d: >> lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 > >Are you running lnet selftest ? Perhaps yes -- it's randconfig boot test and the .config does include CONFIG_LNET_SELFTEST: CONFIG_LNET=y CONFIG_LNET_MAX_PAYLOAD=1048576 ==> CONFIG_LNET_SELFTEST=y CONFIG_LNET_XPRT_IB=y >Is this a UMP setup? Yes, .config has: # CONFIG_SMP is not set >The reason I ask is that their is a SMP handling bug in lnet >selftest. If you look at the mailing list I pushed a SMP patch >series. Can you try that series and tell me if it works for you. So it looks your fixup patch is not for this case? Anyway the reproduce-* script attached in the previous email should be fairly straightforward to try out for reproducing the bug. Thanks, Fengguang From fengguang.wu at intel.com Wed Apr 18 14:15:50 2018 From: fengguang.wu at intel.com (Fengguang Wu) Date: Wed, 18 Apr 2018 22:15:50 +0800 Subject: [lustre-devel] [lnet_res_container_setup] BUG: unable to handle kernel paging request at 08000664 In-Reply-To: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> Message-ID: <20180418141550.qen7voyknh4ot4o7@wfg-t540p.sh.intel.com> Hi James, Here the .config has SMP set. FYI this happens in mainline kernel 4.17.0-rc1. It looks like a new regression. It occurs in 4 out of 5 boots. [ 6.872036] usbhid: USB HID core driver [ 6.872383] NET: Registered protocol family 4 [ 6.872889] no options. [ 6.874165] LNet: HW nodes: 1, HW CPU cores: 1, npartitions: 1 [ 6.874688] LNetError: 1:0:(module.c:546:libcfs_init()) misc_register: error -16 [ 7.893425] BUG: unable to handle kernel paging request at 08000664 [ 7.893989] *pde = 00000000 [ 7.894251] Oops: 0000 [#1] SMP [ 7.894528] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G S 4.17.0-rc1 #198 [ 7.895196] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 7.895924] EIP: cfs_cpt_spread_node+0x5c/0x115: bitmap_weight at include/linux/bitmap.h:360 (inlined by) __nodes_weight at include/linux/nodemask.h:240 (inlined by) cfs_cpt_spread_node at drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c:498 [ 7.896320] EFLAGS: 00210202 CPU: 0 [ 7.896625] EAX: d6c31320 EBX: 00000001 ECX: 00000001 EDX: 00000000 [ 7.896678] ESI: 08000664 EDI: 00000000 EBP: c7ea3e88 ESP: c7ea3e78 [ 7.896678] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 7.896678] CR0: 80050033 CR2: 08000664 CR3: 05380000 CR4: 00000690 [ 7.896678] Call Trace: [ 7.896678] lnet_res_container_setup+0x9a/0x210: lnet_res_container_setup at drivers/staging/lustre/lnet/lnet/api-ni.c:426 [ 7.896678] LNetNIInit+0x701/0xdef: lnet_prepare at drivers/staging/lustre/lnet/lnet/api-ni.c:577 (inlined by) LNetNIInit at drivers/staging/lustre/lnet/lnet/api-ni.c:1517 [ 7.896678] ? ktime_get_real_seconds+0xe3/0xf9: ktime_get_real_seconds at kernel/time/timekeeping.c:938 [ 7.896678] srpc_startup+0x8b/0x413: srpc_startup at drivers/staging/lustre/lnet/selftest/rpc.c:1613 [ 7.896678] lnet_selftest_init+0x3de/0x78c: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:134 [ 7.896678] do_one_initcall+0x1a2/0x410: do_one_initcall at init/main.c:883 [ 7.896678] ? lnet_selftest_exit+0xa8/0xa8: lnet_selftest_init at drivers/staging/lustre/lnet/selftest/module.c:90 [ 7.896678] ? parse_args+0x94/0x3b6: parse_args at kernel/params.c:180 (discriminator 8) [ 7.896678] kernel_init_freeable+0x3b3/0x488: do_initcall_level at init/main.c:951 (inlined by) do_initcalls at init/main.c:959 (inlined by) do_basic_setup at init/main.c:977 (inlined by) kernel_init_freeable at init/main.c:1127 [ 7.896678] ? rest_init+0x11b/0x11b: kernel_init at init/main.c:1050 [ 7.896678] kernel_init+0xd/0x15f: kernel_init at init/main.c:1055 [ 7.896678] ret_from_fork+0x2e/0x40: ret_from_fork at arch/x86/entry/entry_32.S:311 [ 7.896678] Code: c4 74 11 8b 50 04 8b 70 18 89 55 f0 8d 4a 01 89 48 04 eb 17 6b d2 0c 03 50 0c 89 d1 8b 42 08 8b 72 04 89 45 f0 8d 50 01 89 51 08 <8b> 06 6a 00 83 e0 01 e8 5c 82 d7 fe 89 c3 31 c0 85 db 0f 9e c0 [ 7.896678] EIP: cfs_cpt_spread_node+0x5c/0x115: bitmap_weight at include/linux/bitmap.h:360 (inlined by) __nodes_weight at include/linux/nodemask.h:240 (inlined by) cfs_cpt_spread_node at drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c:498 SS:ESP: 0068:c7ea3e78 [ 7.896678] CR2: 0000000008000664 [ 7.896678] ---[ end trace 5246465f75f74727 ]--- [ 7.896678] Kernel panic - not syncing: Fatal exception Attached the full dmesg, kconfig and reproduce scripts. Thanks, Fengguang -------------- next part -------------- early console in setup code [ 0.000000] Linux version 4.17.0-rc1 (kbuild at cairo) (gcc version 7.3.0 (Debian 7.3.0-1)) #198 SMP Wed Apr 18 04:25:31 CST 2018 [ 0.000000] x86/fpu: x87 FPU will use FXSAVE [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001a3dffff] usable [ 0.000000] BIOS-e820: [mem 0x000000001a3e0000-0x000000001a3fffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel! [ 0.000000] random: fast init done [ 0.000000] SMBIOS 2.8 present. [ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 0.000000] Hypervisor detected: KVM [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0x1a3e0 max_arch_pfn = 0x100000 [ 0.000000] MTRR default type: write-back [ 0.000000] MTRR fixed ranges enabled: [ 0.000000] 00000-9FFFF write-back [ 0.000000] A0000-BFFFF uncachable [ 0.000000] C0000-FFFFF write-protect [ 0.000000] MTRR variable ranges enabled: [ 0.000000] 0 base 0080000000 mask FF80000000 uncachable [ 0.000000] 1 disabled [ 0.000000] 2 disabled [ 0.000000] 3 disabled [ 0.000000] 4 disabled [ 0.000000] 5 disabled [ 0.000000] 6 disabled [ 0.000000] 7 disabled [ 0.000000] x86/PAT: PAT not supported by CPU. [ 0.000000] x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC [ 0.000000] Scan for SMP in [mem 0x00000000-0x000003ff] [ 0.000000] Scan for SMP in [mem 0x0009fc00-0x0009ffff] [ 0.000000] Scan for SMP in [mem 0x000f0000-0x000fffff] [ 0.000000] found SMP MP-table at [mem 0x000f6aa0-0x000f6aaf] mapped at [(ptrval)] [ 0.000000] mpc: f6ab0-f6b80 [ 0.000000] initial memory mapped: [mem 0x00000000-0x05ffffff] [ 0.000000] Base memory trampoline at [(ptrval)] 9b000 size 16384 [ 0.000000] BRK [0x05a8c000, 0x05a8cfff] PGTABLE [ 0.000000] RAMDISK: [mem 0x1a121000-0x1a3dffff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000F68D0 000014 (v00 BOCHS ) [ 0.000000] ACPI: RSDT 0x000000001A3E15CE 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACP 0x000000001A3E142A 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001) [ 0.000000] ACPI: DSDT 0x000000001A3E0040 0013EA (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001) [ 0.000000] ACPI: FACS 0x000000001A3E0000 000040 [ 0.000000] ACPI: APIC 0x000000001A3E151E 000078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001) [ 0.000000] ACPI: HPET 0x000000001A3E1596 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001) [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] mapped APIC to ffffc000 ( fee00000) [ 0.000000] 419MB LOWMEM available. [ 0.000000] mapped low ram: 0 - 1a3e0000 [ 0.000000] low ram: 0 - 1a3e0000 [ 0.000000] kvm-clock: cpu 0, msr 0:1a11f001, primary cpu clock [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: using sched offset of 2783567941 cycles [ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] Normal [mem 0x0000000001000000-0x000000001a3dffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff] [ 0.000000] node 0: [mem 0x0000000000100000-0x000000001a3dffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000001a3dffff] [ 0.000000] On node 0 totalpages: 107390 [ 0.000000] DMA zone: 32 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 3998 pages, LIFO batch:0 [ 0.000000] Normal zone: 808 pages used for memmap [ 0.000000] Normal zone: 103392 pages, LIFO batch:31 [ 0.000000] Reserved but unavailable: 98 pages [ 0.000000] Using APIC driver default [ 0.000000] ACPI: PM-Timer IO Port: 0x608 [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1]) [ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 00, APIC ID 0, APIC INT 02 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 05, APIC ID 0, APIC INT 05 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 09, APIC ID 0, APIC INT 09 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 0a, APIC ID 0, APIC INT 0a [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level) [ 0.000000] Int: type 0, pol 1, trig 3, bus 00, IRQ 0b, APIC ID 0, APIC INT 0b [ 0.000000] ACPI: IRQ0 used by override. [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 01, APIC ID 0, APIC INT 01 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 03, APIC ID 0, APIC INT 03 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 04, APIC ID 0, APIC INT 04 [ 0.000000] ACPI: IRQ5 used by override. [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 06, APIC ID 0, APIC INT 06 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 07, APIC ID 0, APIC INT 07 [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 08, APIC ID 0, APIC INT 08 [ 0.000000] ACPI: IRQ9 used by override. [ 0.000000] ACPI: IRQ10 used by override. [ 0.000000] ACPI: IRQ11 used by override. [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0c, APIC ID 0, APIC INT 0c [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0d, APIC ID 0, APIC INT 0d [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0e, APIC ID 0, APIC INT 0e [ 0.000000] Int: type 0, pol 0, trig 0, bus 00, IRQ 0f, APIC ID 0, APIC INT 0f [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000 [ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] mapped IOAPIC to ffffb000 (fec00000) [ 0.000000] e820: [mem 0x1a400000-0xfeffbfff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on KVM [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns [ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1 [ 0.000000] percpu: Embedded 347 pages/cpu @(ptrval) s1400528 r0 d20784 u1421312 [ 0.000000] pcpu-alloc: s1400528 r0 d20784 u1421312 alloc=347*4096 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] KVM setup async PF for cpu 0 [ 0.000000] kvm-stealtime: cpu 0, msr 19c4c880 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 106550 [ 0.000000] Kernel command line: ip=::::vm-lkp-nhm-dp2-yocto-ia32-6::dhcp root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-nhm-dp2-yocto-ia32-6/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180418-10482-1lry5np-0.yaml ARCH=i386 kconfig=i386-randconfig-c0-04180358 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp2-yocto-ia32/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw d [ 0.000000] sysrq: sysrq always enabled. [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] BRK [0x05a8d000, 0x05a8dfff] PGTABLE [ 0.000000] Initializing CPU#0 [ 0.000000] Memory: 54244K/429560K available (36141K kernel code, 12277K rwdata, 17240K rodata, 3000K init, 7128K bss, 84624K reserved, 0K cma-reserved) [ 0.000000] virtual kernel memory layout: [ 0.000000] fixmap : 0xfff17000 - 0xfffff000 ( 928 kB) [ 0.000000] cpu_entry : 0xff800000 - 0xff939000 (1252 kB) [ 0.000000] vmalloc : 0xdabe0000 - 0xff7fe000 ( 588 MB) [ 0.000000] lowmem : 0xc0000000 - 0xda3e0000 ( 419 MB) [ 0.000000] .init : 0xc507e000 - 0xc536c000 (3000 kB) [ 0.000000] .data : 0xc334b7c0 - 0xc50286a0 (29555 kB) [ 0.000000] .text : 0xc1000000 - 0xc334b7c0 (36141 kB) [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok. [ 0.000000] ftrace: allocating 92948 entries in 182 pages [ 0.000000] [ 0.000000] ********************************************************** [ 0.000000] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** [ 0.000000] ** ** [ 0.000000] ** trace_printk() being used. Allocating extra memory. ** [ 0.000000] ** ** [ 0.000000] ** This means that this is a DEBUG kernel and it is ** [ 0.000000] ** unsafe for production use. ** [ 0.000000] ** ** [ 0.000000] ** If you see this message and you are not debugging ** [ 0.000000] ** the kernel, report this immediately to your vendor! ** [ 0.000000] ** ** [ 0.000000] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** [ 0.000000] ********************************************************** [ 0.003333] Hierarchical RCU implementation. [ 0.003333] RCU event tracing is enabled. [ 0.003333] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1. [ 0.003333] RCU CPU stall warnings timeout set to 100 (rcu_cpu_stall_timeout). [ 0.003333] Tasks RCU enabled. [ 0.003333] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.003333] NR_IRQS: 2304, nr_irqs: 48, preallocated irqs: 16 [ 0.003333] CPU 0 irqstacks, hard=(ptrval) soft=(ptrval) [ 0.003333] Offload RCU callbacks from CPUs: (none). [ 0.003333] console [ttyS0] enabled [ 0.003333] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.003333] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.003333] ... MAX_LOCK_DEPTH: 48 [ 0.003333] ... MAX_LOCKDEP_KEYS: 8191 [ 0.003333] ... CLASSHASH_SIZE: 4096 [ 0.003333] ... MAX_LOCKDEP_ENTRIES: 32768 [ 0.003333] ... MAX_LOCKDEP_CHAINS: 65536 [ 0.003333] ... CHAINHASH_SIZE: 32768 [ 0.003333] memory used by lock dependency info: 4639 kB [ 0.003333] per task-struct memory footprint: 2112 bytes [ 0.003333] ------------------------ [ 0.003333] | Locking API testsuite: [ 0.003333] ---------------------------------------------------------------------------- [ 0.003333] | spin |wlock |rlock |mutex | wsem | rsem | [ 0.003333] -------------------------------------------------------------------------- [ 0.003333] A-A deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] A-B-B-A deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] A-B-B-C-C-A deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] A-B-C-A-B-C deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] A-B-B-C-C-D-D-A deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] A-B-C-D-B-D-D-A deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] A-B-C-D-B-C-D-A deadlock:failed|failed| ok |failed|failed|failed|failed| [ 0.003333] double unlock: ok | ok | ok | ok | ok | ok | ok | [ 0.003333] initialize held: ok | ok | ok | ok | ok | ok | ok | [ 0.003333] -------------------------------------------------------------------------- [ 0.003333] recursive read-lock: | ok | |failed| [ 0.003333] recursive read-lock #2: | ok | |failed| [ 0.003333] mixed read-write-lock: |failed| |failed| [ 0.003333] mixed write-read-lock: |failed| |failed| [ 0.003333] mixed read-lock/lock-write ABBA: |failed| |failed| [ 0.003333] mixed read-lock/lock-read ABBA: | ok | |failed| [ 0.003333] mixed write-lock/lock-write ABBA: |failed| |failed| [ 0.003333] -------------------------------------------------------------------------- [ 0.003333] hard-irqs-on + irq-safe-A/12:failed|failed| ok | [ 0.003333] soft-irqs-on + irq-safe-A/12:failed|failed| ok | [ 0.003333] hard-irqs-on + irq-safe-A/21:failed|failed| ok | [ 0.003333] soft-irqs-on + irq-safe-A/21:failed|failed| ok | [ 0.003333] sirq-safe-A => hirqs-on/12:failed|failed| ok | [ 0.003333] sirq-safe-A => hirqs-on/21:failed|failed| ok | [ 0.003333] hard-safe-A + irqs-on/12:failed|failed| ok | [ 0.003333] soft-safe-A + irqs-on/12:failed|failed| ok | [ 0.003333] hard-safe-A + irqs-on/21:failed|failed| ok | [ 0.003333] soft-safe-A + irqs-on/21:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #1/123:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #1/123:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #1/132:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #1/132:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #1/213:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #1/213:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #1/231:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #1/231:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #1/312:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #1/312:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #1/321:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #1/321:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #2/123:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #2/123:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #2/132:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #2/132:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #2/213:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #2/213:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #2/231:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #2/231:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #2/312:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #2/312:failed|failed| ok | [ 0.003333] hard-safe-A + unsafe-B #2/321:failed|failed| ok | [ 0.003333] soft-safe-A + unsafe-B #2/321:failed|failed| ok | [ 0.003333] hard-irq lock-inversion/123:failed|failed| ok | [ 0.003333] soft-irq lock-inversion/123:failed|failed| ok | [ 0.003333] hard-irq lock-inversion/132:failed|failed| ok | [ 0.003333] soft-irq lock-inversion/132:failed|failed| ok | [ 0.003333] hard-irq lock-inversion/213:failed|failed| ok | [ 0.003333] soft-irq lock-inversion/213:failed|failed| ok | [ 0.003333] hard-irq lock-inversion/231:failed|failed| ok | [ 0.003333] soft-irq lock-inversion/231:failed|failed| ok | [ 0.003333] hard-irq lock-inversion/312:failed|failed| ok | [ 0.003333] soft-irq lock-inversion/312:failed|failed| ok | [ 0.003333] hard-irq lock-inversion/321:failed|failed| ok | [ 0.003333] soft-irq lock-inversion/321:failed|failed| ok | [ 0.003333] hard-irq read-recursion/123: ok | [ 0.003333] soft-irq read-recursion/123: ok | [ 0.003333] hard-irq read-recursion/132: ok | [ 0.003333] soft-irq read-recursion/132: ok | [ 0.003333] hard-irq read-recursion/213: ok | [ 0.003333] soft-irq read-recursion/213: ok | [ 0.003333] hard-irq read-recursion/231: ok | [ 0.003333] soft-irq read-recursion/231: ok | [ 0.003333] hard-irq read-recursion/312: ok | [ 0.003333] soft-irq read-recursion/312: ok | [ 0.003333] hard-irq read-recursion/321: ok | [ 0.003333] soft-irq read-recursion/321: ok | [ 0.003333] -------------------------------------------------------------------------- [ 0.003333] | Wound/wait tests | [ 0.003333] --------------------- [ 0.003333] ww api failures: ok | ok | ok | [ 0.003333] ww contexts mixing:failed| ok | [ 0.003333] finishing ww context: ok | ok | ok | ok | [ 0.003333] locking mismatches: ok | ok | ok | [ 0.003333] EDEADLK handling: ok | ok | ok | ok | ok | ok | ok | ok | ok | ok | [ 0.003333] spinlock nest unlocked: ok | [ 0.003333] ----------------------------------------------------- [ 0.003333] |block | try |context| [ 0.003333] ----------------------------------------------------- [ 0.003333] context:failed| ok | ok | [ 0.003333] try:failed| ok |failed| [ 0.003333] block:failed| ok |failed| [ 0.003333] spinlock:failed| ok |failed| [ 0.003333] -------------------------------------------------------- [ 0.003333] 153 out of 262 testcases failed, as expected. | [ 0.003333] ---------------------------------------------------- [ 0.003333] ACPI: Core revision 20180313 [ 0.003333] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns [ 0.003333] hpet clockevent registered [ 0.003356] APIC: Switch to symmetric I/O mode setup [ 0.003836] Enabling APIC mode: Flat. Using 1 I/O APICs [ 0.004369] enabled ExtINT on CPU#0 [ 0.005332] ENABLING IO-APIC IRQs [ 0.005650] init IO_APIC IRQs [ 0.005933] apic 0 pin 0 not connected [ 0.006698] IOAPIC[0]: Set routing entry (0-1 -> 0xef -> IRQ 1 Mode:0 Active:0 Dest:1) [ 0.007442] IOAPIC[0]: Set routing entry (0-2 -> 0x30 -> IRQ 0 Mode:0 Active:0 Dest:1) [ 0.008168] IOAPIC[0]: Set routing entry (0-3 -> 0xef -> IRQ 3 Mode:0 Active:0 Dest:1) [ 0.008890] IOAPIC[0]: Set routing entry (0-4 -> 0xef -> IRQ 4 Mode:0 Active:0 Dest:1) [ 0.009615] IOAPIC[0]: Set routing entry (0-5 -> 0xef -> IRQ 5 Mode:1 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-6 -> 0xef -> IRQ 6 Mode:0 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-7 -> 0xef -> IRQ 7 Mode:0 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-8 -> 0xef -> IRQ 8 Mode:0 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-9 -> 0xef -> IRQ 9 Mode:1 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-10 -> 0xef -> IRQ 10 Mode:1 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-11 -> 0xef -> IRQ 11 Mode:1 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-12 -> 0xef -> IRQ 12 Mode:0 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-13 -> 0xef -> IRQ 13 Mode:0 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-14 -> 0xef -> IRQ 14 Mode:0 Active:0 Dest:1) [ 0.009999] IOAPIC[0]: Set routing entry (0-15 -> 0xef -> IRQ 15 Mode:0 Active:0 Dest:1) [ 0.009999] apic 0 pin 16 not connected [ 0.009999] apic 0 pin 17 not connected [ 0.009999] apic 0 pin 18 not connected [ 0.009999] apic 0 pin 19 not connected [ 0.009999] apic 0 pin 20 not connected [ 0.009999] apic 0 pin 21 not connected [ 0.009999] apic 0 pin 22 not connected [ 0.009999] apic 0 pin 23 not connected [ 0.009999] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 [ 0.009999] tsc: Detected 2925.998 MHz processor [ 0.009999] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2a2d3295deb, max_idle_ns: 440795332860 ns [ 0.009999] Calibrating delay loop (skipped) preset value.. 5854.82 BogoMIPS (lpj=9753326) [ 0.010009] pid_max: default: 32768 minimum: 301 [ 0.010475] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.011046] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.012098] CPU: Physical Processor ID: 0 [ 0.012482] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0 [ 0.013342] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0 [ 0.013877] Spectre V2 : Mitigation: Full generic retpoline [ 0.014355] Spectre V2 : Spectre v2 mitigation: Filling RSB on context switch [ 0.034546] Freeing SMP alternatives memory: 68K [ 0.037333] Using local APIC timer interrupts. [ 0.037333] calibrating APIC timer ... [ 0.039999] ... lapic delta = 6250100 [ 0.039999] ... PM-Timer delta = 357963 [ 0.039999] ... PM-Timer result ok [ 0.039999] ..... delta 6250100 [ 0.039999] ..... mult: 268439777 [ 0.039999] ..... calibration result: 3333386 [ 0.039999] ..... CPU clock speed is 2926.1622 MHz. [ 0.039999] ..... host bus clock speed is 1000.0386 MHz. [ 0.040081] smpboot: CPU0: Intel QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3) [ 0.041544] Performance Events: PMU not available due to virtualization, using software events only. [ 0.044394] Hierarchical SRCU implementation. [ 0.051851] NMI watchdog: Perf event create on CPU 0 failed with -2 [ 0.052432] NMI watchdog: Perf NMI watchdog permanently disabled [ 0.053179] smp: Bringing up secondary CPUs ... [ 0.053343] smp: Brought up 1 node, 1 CPU [ 0.053705] smpboot: Max logical packages: 1 [ 0.054091] smpboot: Total of 1 processors activated (5854.82 BogoMIPS) [ 0.056679] node 0 initialised, 72673 pages in 3ms [ 0.057537] devtmpfs: initialized [ 0.063431] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns [ 0.064310] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.064943] xor: measuring software checksum speed [ 0.096674] pIII_sse : 13773.600 MB/sec [ 0.130006] prefetch64-sse: 16150.800 MB/sec [ 0.130407] xor: using function: prefetch64-sse (16150.800 MB/sec) [ 0.130945] prandom: seed boundary self test passed [ 0.131994] prandom: 100 self tests passed [ 0.132363] pinctrl core: initialized pinctrl subsystem [ 0.133400] NET: Registered protocol family 16 [ 0.136105] audit: initializing netlink subsys (disabled) [ 0.137221] EISA bus registered [ 0.137516] cpuidle: using governor menu [ 0.139841] ACPI: bus type PCI registered [ 0.140022] audit: type=2000 audit(1523999178.409:1): state=initialized audit_enabled=0 res=1 [ 0.141079] PCI: Using configuration type 1 for base access [ 0.202633] HugeTLB registered 4.00 MiB page size, pre-allocated 0 pages [ 0.203733] cryptd: max_cpu_qlen set to 1000 [ 0.260009] raid6: mmxx1 gen() 4461 MB/s [ 0.316681] raid6: mmxx2 gen() 5264 MB/s [ 0.373355] raid6: sse1x1 gen() 3853 MB/s [ 0.430014] raid6: sse1x2 gen() 4662 MB/s [ 0.486682] raid6: sse2x1 gen() 7666 MB/s [ 0.543340] raid6: sse2x1 xor() 5399 MB/s [ 0.600015] raid6: sse2x2 gen() 9094 MB/s [ 0.656676] raid6: sse2x2 xor() 7123 MB/s [ 0.657093] raid6: using algorithm sse2x2 gen() 9094 MB/s [ 0.657555] raid6: .... xor() 7123 MB/s, rmw enabled [ 0.658003] raid6: using intx1 recovery algorithm [ 0.658724] gpio-f7188x: Not a Fintek device at 0x0000002e [ 0.659235] gpio-f7188x: Not a Fintek device at 0x0000004e [ 0.660020] ACPI: Added _OSI(Module Device) [ 0.660401] ACPI: Added _OSI(Processor Device) [ 0.660796] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.661221] ACPI: Added _OSI(Processor Aggregator Device) [ 0.661700] ACPI: Added _OSI(Linux-Dell-Video) [ 0.668817] ACPI: 1 ACPI AML tables successfully acquired and loaded [ 0.674731] ACPI: Interpreter enabled [ 0.675091] ACPI: (supports S0 S5) [ 0.675404] ACPI: Using IOAPIC for interrupt routing [ 0.676139] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug [ 0.677295] ACPI: Enabled 2 GPEs in block 00 to 0F [ 0.697178] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.697738] acpi PNP0A03:00: _OSC: OS supports [Segments] [ 0.698247] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM [ 0.698845] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. [ 0.700085] PCI host bridge to bus 0000:00 [ 0.700458] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] [ 0.701068] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] [ 0.701659] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] [ 0.702313] pci_bus 0000:00: root bus resource [mem 0x1a400000-0xfebfffff window] [ 0.702969] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.703387] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 [ 0.704792] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 [ 0.706289] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 [ 0.709282] pci 0000:00:01.1: reg 0x20: [io 0xc040-0xc04f] [ 0.711323] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.711980] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.712539] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.713154] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.714024] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 [ 0.714890] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI [ 0.715523] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB [ 0.717497] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 [ 0.719498] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref] [ 0.722320] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff] [ 0.728588] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref] [ 0.730605] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000 [ 0.732044] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff] [ 0.733343] pci 0000:00:03.0: reg 0x14: [io 0xc000-0xc03f] [ 0.738932] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref] [ 0.740818] pci 0000:00:04.0: [8086:25ab] type 00 class 0x088000 [ 0.741828] pci 0000:00:04.0: reg 0x10: [mem 0xfebf1000-0xfebf100f] [ 0.746479] pci_bus 0000:00: on NUMA node 0 [ 0.748331] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) [ 0.749213] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) [ 0.750358] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) [ 0.751255] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) [ 0.751929] ACPI: PCI Interrupt Link [LNKS] (IRQs *9) [ 0.753698] pci 0000:00:02.0: vgaarb: setting as boot VGA device [ 0.754224] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none [ 0.754955] pci 0000:00:02.0: vgaarb: bridge control possible [ 0.755447] vgaarb: loaded [ 0.757315] SCSI subsystem initialized [ 0.757813] ACPI: bus type USB registered [ 0.758241] usbcore: registered new interface driver usbfs [ 0.758756] usbcore: registered new interface driver hub [ 0.759297] usbcore: registered new device driver usb [ 0.760206] EDAC MC: Ver: 3.0.0 [ 0.761814] FPGA manager framework [ 0.762243] Advanced Linux Sound Architecture Driver Initialized. [ 0.762852] PCI: Using ACPI for IRQ routing [ 0.763223] PCI: pci_cache_line_size set to 64 bytes [ 0.763440] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] [ 0.763968] e820: reserve RAM buffer [mem 0x1a3e0000-0x1bffffff] [ 0.765316] nfc: nfc_init: NFC Core ver 0.1 [ 0.765749] NET: Registered protocol family 39 [ 0.766750] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2) [ 0.769375] clocksource: Switched to clocksource kvm-clock [ 0.769999] workqueue: round-robin CPU selection forced, expect performance impact [ 0.789380] Warning: could not register all branches stats [ 0.789877] Warning: could not register annotated branches stats [ 1.002193] VFS: Disk quotas dquot_6.6.0 [ 1.003052] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 1.003970] FS-Cache: Loaded [ 1.004434] pnp: PnP ACPI init [ 1.004941] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) [ 1.005711] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active) [ 1.006593] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active) [ 1.007268] pnp 00:03: [dma 2] [ 1.007652] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active) [ 1.008516] pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active) [ 1.009376] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active) [ 1.010246] pnp 00:06: Plug and Play ACPI device, IDs PNP0501 (active) [ 1.012059] pnp: PnP ACPI: found 7 devices [ 1.048690] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 1.050042] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window] [ 1.050586] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window] [ 1.051115] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window] [ 1.051707] pci_bus 0000:00: resource 7 [mem 0x1a400000-0xfebfffff window] [ 1.052595] NET: Registered protocol family 2 [ 1.053752] tcp_listen_portaddr_hash hash table entries: 256 (order: 1, 12288 bytes) [ 1.054453] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 1.055084] TCP bind hash table entries: 4096 (order: 5, 180224 bytes) [ 1.055826] TCP: Hash tables configured (established 4096 bind 4096) [ 1.056445] UDP hash table entries: 256 (order: 2, 24576 bytes) [ 1.057158] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes) [ 1.057883] NET: Registered protocol family 1 [ 1.058612] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 1.059149] pci 0000:00:01.0: PIIX3: Enabling Passive Release [ 1.059661] pci 0000:00:01.0: Activating ISA DMA hang workarounds [ 1.060265] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff] [ 1.061003] PCI: CLS 0 bytes, default 64 [ 1.061610] Unpacking initramfs... [ 1.700708] Freeing initrd memory: 2812K [ 1.704721] PCLMULQDQ-NI instructions are not detected. [ 1.705210] The force parameter has not been set to 1. The Iris poweroff handler will not be installed. [ 1.706087] NatSemi SCx200 Driver [ 1.706480] spin_lock-torture:--- Start of test [debug]: nwriters_stress=2 nreaders_stress=0 stat_interval=60 verbose=1 shuffle_interval=3 stutter=5 shutdown_secs=0 onoff_interval=0 onoff_holdoff=0 [ 1.708028] spin_lock-torture: Creating torture_shuffle task [ 1.708754] spin_lock-torture: Creating torture_stutter task [ 1.709297] spin_lock-torture: torture_shuffle task started [ 1.709806] spin_lock-torture: Creating lock_torture_writer task [ 1.710413] spin_lock-torture: torture_stutter task started [ 1.710922] spin_lock-torture: Creating lock_torture_writer task [ 1.711489] spin_lock-torture: lock_torture_writer task started [ 1.712036] spin_lock-torture: Creating lock_torture_stats task [ 1.712732] spin_lock-torture: lock_torture_writer task started [ 1.713300] torture_init_begin: Refusing rcu init: spin_lock running. [ 1.713921] torture_init_begin: One torture test at a time! [ 1.716062] spin_lock-torture: lock_torture_stats task started [ 1.717067] Initialise system trusted keyrings [ 1.722025] workingset: timestamp_bits=30 max_order=17 bucket_order=0 [ 1.722986] ntfs: driver 2.1.32 [Flags: R/W]. [ 1.723445] fuse init (API version 7.26) [ 1.725172] JFS: nTxBlock = 2717, nTxLock = 21738 [ 1.727377] NILFS version 2 loaded [ 1.727763] ocfs2: Registered cluster interface o2cb [ 1.728298] OCFS2 User DLM kernel interface loaded [ 1.754428] NET: Registered protocol family 38 [ 1.754969] async_tx: api initialized (async) [ 1.755372] Key type asymmetric registered [ 1.755742] Asymmetric key parser 'x509' registered [ 1.756213] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) [ 1.756926] io scheduler noop registered [ 1.757334] io scheduler deadline registered (default) [ 1.758327] io scheduler cfq registered [ 1.759193] crc32: CRC_LE_BITS = 64, CRC_BE BITS = 64 [ 1.759744] crc32: self tests passed, processed 225944 bytes in 238188 nsec [ 1.760582] crc32c: CRC_LE_BITS = 64 [ 1.760899] crc32c: self tests passed, processed 225944 bytes in 77513 nsec [ 1.786526] crc32_combine: 8373 self tests passed [ 1.812247] crc32c_combine: 8373 self tests passed [ 1.813003] xz_dec_test: module loaded [ 1.813372] xz_dec_test: Create a device node with 'mknod xz_dec_test c 249 0' and write .xz files to it. [ 1.814232] glob: 64 self-tests passed, 0 failed [ 1.821538] gpio_winbond: chip ID at 2e is ffff [ 1.821940] gpio_winbond: not an our chip [ 1.822313] gpio_winbond: chip ID at 4e is ffff [ 1.822705] gpio_winbond: not an our chip [ 1.826322] VIA Graphics Integration Chipset framebuffer 2.4 initializing [ 1.828034] usbcore: registered new interface driver udlfb [ 1.828549] usbcore: registered new interface driver smscufx [ 1.830534] uvesafb: failed to execute /sbin/v86d [ 1.830955] uvesafb: make sure that the v86d helper is installed and executable [ 1.831584] uvesafb: Getting VBE info block failed (eax=0x4f00, err=-2) [ 1.832155] uvesafb: vbe_init() failed with -22 [ 1.832559] uvesafb: probe of uvesafb.0 failed with error -22 [ 1.834168] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 [ 1.834825] ACPI: Power Button [PWRF] [ 2.045376] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 2.069561] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 2.119104] 00:06: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 2.126354] DoubleTalk PC - not found [ 2.126813] Applicom driver: $Id: ac.c,v 1.30 2000/03/22 16:03:57 dwmw2 Exp $ [ 2.127444] ac.o: No PCI boards found. [ 2.127774] ac.o: For an ISA board you must supply memory and irq parameters. [ 2.128410] toshiba: not a supported Toshiba laptop [ 2.129469] ppdev: user-space parallel port driver [ 2.129894] scx200_gpio: no SCx200 gpio present [ 2.130344] nsc_gpio initializing [ 2.130811] telclk_interrupt = 0xf non-mcpbl0010 hw. [ 2.131566] Linux agpgart interface v0.103 [ 2.137697] [drm] Initialized vgem 1.0.0 20120112 for virtual device on minor 0 [ 2.138430] usbcore: registered new interface driver udl [ 2.146366] Floppy drive(s): fd0 is 2.88M AMI BIOS [ 2.173697] FDC 0 is a S82078B [ 2.196852] loop: module loaded [ 2.198056] MM: desc_per_page = 128 [ 2.262406] rbd: loaded (major 252) [ 2.262760] mtip32xx Version 1.3.1 [ 2.267754] null: module loaded [ 2.268176] Phantom Linux Driver, version n0.9.8, init OK [ 2.270192] Guest personality initialized and is inactive [ 2.271074] VMCI host device registered (name=vmci, major=10, minor=60) [ 2.271664] Initialized host personality [ 2.275891] usbcore: registered new interface driver viperboard [ 2.277283] usbcore: registered new interface driver port100 [ 2.277817] usbcore: registered new interface driver nfcmrvl [ 2.278946] Uniform Multi-Platform E-IDE driver [ 2.280958] piix 0000:00:01.1: IDE controller (0x8086:0x7010 rev 0x00) [ 2.282060] piix 0000:00:01.1: not 100% native mode: will probe irqs later [ 2.283075] ide0: BM-DMA at 0xc040-0xc047 [ 2.283516] ide1: BM-DMA at 0xc048-0xc04f [ 2.283921] Probing IDE interface ide0... [ 2.720094] tsc: Refined TSC clocksource calibration: 2925.999 MHz [ 2.720707] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2a2d33743a4, max_idle_ns: 440795298620 ns [ 2.956257] Probing IDE interface ide1... [ 3.723442] hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive [ 4.544316] hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO0 [ 4.545293] hdc: MWDMA2 mode selected [ 4.546009] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 [ 4.553409] ide1 at 0x170-0x177,0x376 on irq 15 [ 4.557602] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports [ 4.558959] ide-gd driver 1.18 [ 4.560634] Loading iSCSI transport class v2.0-870. [ 4.563520] fnic: Cisco FCoE HBA Driver, ver 1.6.0.34 [ 4.564741] fnic: Successfully Initialized Trace Buffer [ 4.565857] fnic: Successfully Initialized FC_CTLR Trace Buffer [ 4.567120] snic:SNIC Driver is supported only for x86_64 platforms! [ 4.568017] snic:Cisco SCSI NIC Driver, ver 0.0.1.18 [ 4.569868] bnx2fc: QLogic FCoE Driver bnx2fc v2.11.8 (October 15, 2015) [ 4.571287] iscsi: registered transport (tcp) [ 4.609753] Adaptec aacraid driver 1.2.1[50877]-custom [ 4.610684] aic94xx: Adaptec aic94xx SAS/SATA driver version 1.0.3 loaded [ 4.618002] qlogicfas: no cards were found, please specify I/O address and IRQ using iobase= and irq= options [ 4.619033] iscsi: registered transport (qla4xxx) [ 4.621377] QLogic iSCSI HBA Driver [ 4.621862] csiostor: Chelsio FCoE driver 1.0.0-ko [ 4.622892] megaraid cmm: 2.20.2.7 (Release Date: Sun Jul 16 00:01:03 EST 2006) [ 4.624225] megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006) [ 4.625260] megasas: 07.704.04.00-rc1 [ 4.625866] mpt3sas version 17.100.00.00 loaded [ 4.629391] GDT-HA: Storage RAID Controller Driver. Version: 3.05 [ 4.631382] 3ware Storage Controller device driver for Linux v1.26.02.003. [ 4.632415] 3ware 9000 Storage Controller device driver for Linux v2.26.02.014. [ 4.636785] LSI 3ware SAS/SATA-RAID Controller device driver for Linux v3.26.02.000. [ 4.637916] nsp32: loading... [ 4.639548] RocketRAID 3xxx/4xxx Controller driver v1.10.0 [ 4.640442] stex: Promise SuperTrak EX Driver version: 6.02.0000.01 [ 4.641411] libcxgbi:libcxgbi_init_module: Chelsio iSCSI driver library libcxgbi v0.9.1-ko (Apr. 2015) [ 4.642646] Chelsio T3 iSCSI Driver cxgb3i v2.0.1-ko (Apr. 2015) [ 4.644777] iscsi: registered transport (cxgb3i) [ 4.645483] Chelsio T4-T6 iSCSI Driver cxgb4i v0.9.5-ko (Apr. 2015) [ 4.646427] iscsi: registered transport (cxgb4i) [ 4.648979] VMware PVSCSI driver - version 1.0.7.0-k [ 4.649816] st: Version 20160209, fixed bufsize 32768, s/g segs 256 [ 4.650820] SCSI Media Changer driver v0.25 [ 4.661432] scsi host0: scsi_debug: version 0188 [20180128] [ 4.661432] dev_size_mb=8, opts=0x0, submit_queues=1, statistics=0 [ 4.666203] scsi 0:0:0:0: Direct-Access Linux scsi_debug 0188 PQ: 0 ANSI: 7 [ 4.685265] Rounding down aligned max_sectors from 4294967295 to 4294967288 [ 4.689770] slram: not enough parameters. [ 4.693779] eql: Equalizer2002: Simon Janes (simon at ncm.com) and David S. Miller (davem at redhat.com) [ 4.698304] MACsec IEEE 802.1AE [ 4.709929] mdio_bus fixed-0: GPIO lookup for consumer reset [ 4.710746] mdio_bus fixed-0: using lookup tables for GPIO lookup [ 4.711316] mdio_bus fixed-0: No GPIO consumer reset found [ 4.711952] libphy: Fixed MDIO Bus: probed [ 4.718275] tun: Universal TUN/TAP device driver, 1.6 [ 4.719540] arcnet: arcnet loaded [ 4.719920] arcnet:rfc1051: RFC1051 "simple standard" (`s') encapsulation support loaded [ 4.720879] arcnet:arc_rawmode: raw mode (`r') encapsulation support loaded [ 4.721691] arcnet:arc_rimi: RIM I (entirely mem-mapped) support [ 4.722285] arcnet:arc_rimi: E-mail me if you actually test the RIM I driver, please! [ 4.722995] arcnet:arc_rimi: Given: node 00h, shmem 0h, irq 0 [ 4.723615] arcnet:arc_rimi: No autoprobe for RIM I; you must specify the shmem and irq! [ 4.724569] arcnet:com20020_isa: COM20020 ISA support (by David Woodhouse et al.) [ 4.725283] (unnamed net_device) (uninitialized): No autoprobe (yet) for IO mapped cards; you must specify the base address! [ 4.726287] arcnet:com20020_pci: COM20020 PCI support [ 4.727564] vcan: Virtual CAN interface driver [ 4.729823] dsa-loop fixed-0:1f: DSA mockup driver: 0x1f [ 4.733785] Atheros(R) L2 Ethernet Driver - version 2.2.3 [ 4.734564] Copyright (c) 2007 Atheros Corporation. [ 4.740214] cnic: QLogic cnicDriver v2.5.22 (July 20, 2015) [ 4.741198] bnx2x: QLogic 5771x/578xx 10/20-Gigabit Ethernet Driver bnx2x 1.712.30-0 (2014/02/10) [ 4.745202] bna: QLogic BR-series 10G Ethernet driver - version: 3.2.25.1 [ 4.749329] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 4.750365] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 5.254443] PCI Interrupt Link [LNKC] enabled at IRQ 11 [ 5.607907] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56 [ 5.609007] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection [ 5.609823] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 5.610395] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 5.610980] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k [ 5.611624] igb: Copyright (c) 2007-2014 Intel Corporation. [ 5.612167] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 5.1.0-k [ 5.612926] ixgbe: Copyright (c) 1999-2016 Intel Corporation. [ 5.614444] jme: JMicron JMC2XX ethernet driver version 1.0.8 [ 5.615420] sky2: driver version 1.30 [ 5.616895] pch_gbe: EG20T PCH Gigabit Ethernet Driver - version 1.01 [ 5.618191] QLogic 1/10 GbE Converged/Intelligent Ethernet Driver v5.3.66 [ 5.618882] QLogic/NetXen Network Driver v4.0.82 [ 5.619856] Solarflare NET driver v4.1 [ 5.620689] Solarflare Falcon driver v4.1 [ 5.621838] tehuti: Tehuti Networks(R) Network Driver, 7.29.3 [ 5.622381] tehuti: Options: hw_csum [ 5.623869] AX.25: Z8530 SCC driver version 3.0.dl1bke [ 5.626103] YAM driver version 0.8 by F1OAT/F6FBB [ 5.635275] AX.25: bpqether driver version 004 [ 5.635736] baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA [ 5.635736] baycom_par: version 0.9 [ 5.644294] hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA [ 5.644870] hdlcdrv: version 0.8 [ 5.645196] baycom_epp: (C) 1998-2000 Thomas Sailer, HB9JNX/AE4WA [ 5.645196] baycom_epp: version 0.7 [ 5.655461] PPP generic driver version 2.4.2 [ 5.657294] PPP BSD Compression module registered [ 5.657864] PPP Deflate Compression module registered [ 5.658441] hdlc: HDLC support module revision 1.22 [ 5.659096] DLCI driver v0.35, 4 Jan 1997, mike.mclagan at linux.org. [ 5.659820] SDLA driver v0.30, 12 Sep 1996, mike.mclagan at linux.org. [ 5.663801] Broadcom 43xx-legacy driver loaded [ Features: PLD ] [ 5.665461] usbcore: registered new interface driver p54usb [ 5.666161] Loaded prism54 driver, version 1.2 [ 5.667880] usbcore: registered new interface driver rt2500usb [ 5.668597] usbcore: registered new interface driver rt2800usb [ 5.669403] usbcore: registered new interface driver zd1201 [ 5.670095] qtnfmac_pearl_pcie: qtnf_pcie_register: register Quantenna QSR10g FullMAC PCIE driver [ 5.671935] usbcore: registered new interface driver rndis_wlan [ 5.673284] mac80211_hwsim: initializing netlink [ 5.676800] ieee80211 phy0: Selected rate control algorithm 'minstrel' [ 5.682707] ieee80211 phy1: Selected rate control algorithm 'minstrel' [ 5.688069] VMware vmxnet3 virtual NIC driver - version 1.4.13.0-k-NAPI [ 5.689477] usbcore: registered new interface driver catc [ 5.690133] usbcore: registered new interface driver kaweth [ 5.690775] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver [ 5.691597] usbcore: registered new interface driver pegasus [ 5.692238] usbcore: registered new interface driver rtl8150 [ 5.693568] usbcore: registered new interface driver lan78xx [ 5.694240] usbcore: registered new interface driver ax88179_178a [ 5.694923] usbcore: registered new interface driver cdc_ether [ 5.695582] usbcore: registered new interface driver dm9601 [ 5.696226] usbcore: registered new interface driver sr9700 [ 5.697580] usbcore: registered new interface driver CoreChips [ 5.698242] usbcore: registered new interface driver smsc95xx [ 5.698880] usbcore: registered new interface driver gl620a [ 5.699509] usbcore: registered new interface driver plusb [ 5.700201] usbcore: registered new interface driver rndis_host [ 5.701405] usbcore: registered new interface driver cdc_subset [ 5.701972] usbcore: registered new interface driver zaurus [ 5.702558] usbcore: registered new interface driver cdc_phonet [ 5.703152] usbcore: registered new interface driver kalmia [ 5.703721] usbcore: registered new interface driver cx82310_eth [ 5.705009] usbcore: registered new interface driver cdc_ncm [ 5.705615] usbcore: registered new interface driver huawei_cdc_ncm [ 5.706226] usbcore: registered new interface driver qmi_wwan [ 5.706805] usbcore: registered new interface driver cdc_mbim [ 5.710308] Intel ISA PCIC probe: [ 5.710385] not found. [ 5.711520] Databook TCIC-2 PCMCIA probe: [ 5.711553] not found. [ 5.751729] usbcore: registered new interface driver hwa-rc [ 5.753496] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 5.754104] ohci-pci: OHCI PCI platform driver [ 5.755352] ohci-platform: OHCI generic platform driver [ 5.756402] driver u132_hcd [ 5.756914] fotg210_hcd: FOTG210 Host Controller (EHCI) Driver [ 5.757459] Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after [ 5.759479] usbcore: registered new interface driver cdc_wdm [ 5.760222] usbcore: registered new interface driver usbtmc [ 5.761614] usbcore: registered new interface driver uas [ 5.762148] usbcore: registered new interface driver usb-storage [ 5.762960] usbcore: registered new interface driver ums-datafab [ 5.763736] usbcore: registered new interface driver ums_eneub6250 [ 5.764440] usbcore: registered new interface driver ums-freecom [ 5.765052] usbcore: registered new interface driver ums-isd200 [ 5.765682] usbcore: registered new interface driver ums-jumpshot [ 5.767041] usbcore: registered new interface driver ums-karma [ 5.767693] usbcore: registered new interface driver ums-sddr09 [ 5.768352] usbcore: registered new interface driver ums-sddr55 [ 5.768958] usbcore: registered new interface driver ums-usbat [ 5.769571] usbcore: registered new interface driver mdc800 [ 5.770160] mdc800: v0.7.5 (30/10/2000):USB Driver for Mustek MDC800 Digital Camera [ 5.771788] usbcore: registered new interface driver microtekX6 [ 5.772387] usbcore: registered new interface driver adutux [ 5.772921] usbcore: registered new interface driver appledisplay [ 5.773541] usbcore: registered new interface driver emi26 - firmware loader [ 5.774247] usbcore: registered new interface driver emi62 - firmware loader [ 5.774877] ftdi_elan: driver ftdi-elan [ 5.775914] usbcore: registered new interface driver ftdi-elan [ 5.776504] usbcore: registered new interface driver isight_firmware [ 5.777305] usbcore: registered new interface driver usblcd [ 5.777833] usbcore: registered new interface driver legousbtower [ 5.778442] usbcore: registered new interface driver trancevibrator [ 5.779590] usbcore: registered new interface driver usbsevseg [ 5.780242] usbcore: registered new interface driver yurex [ 5.780832] usbcore: registered new interface driver chaoskey [ 5.781398] usbcore: registered new interface driver sisusb [ 5.782527] usbcore: registered new interface driver lvs [ 5.784639] dummy_hcd dummy_hcd.0: USB Host+Gadget Emulator, driver 02 May 2005 [ 5.785326] dummy_hcd dummy_hcd.0: Dummy host controller [ 5.785812] dummy_hcd dummy_hcd.0: new USB bus registered, assigned bus number 1 [ 5.787059] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 5.787807] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 5.788492] usb usb1: Product: Dummy host controller [ 5.788930] usb usb1: Manufacturer: Linux 4.17.0-rc1 dummy_hcd [ 5.789463] usb usb1: SerialNumber: dummy_hcd.0 [ 5.791986] hub 1-0:1.0: USB hub found [ 5.792406] hub 1-0:1.0: 1 port detected [ 5.798212] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller [ 5.798820] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 2 [ 5.799872] vhci_hcd: created sysfs vhci_hcd.0 [ 5.800603] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.17 [ 5.801432] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 5.802156] usb usb2: Product: USB/IP Virtual Host Controller [ 5.802736] usb usb2: Manufacturer: Linux 4.17.0-rc1 vhci_hcd [ 5.803332] usb usb2: SerialNumber: vhci_hcd.0 [ 5.805035] hub 2-0:1.0: USB hub found [ 5.805493] hub 2-0:1.0: 8 ports detected [ 5.811417] vhci_hcd vhci_hcd.0: USB/IP Virtual Host Controller [ 5.812031] vhci_hcd vhci_hcd.0: new USB bus registered, assigned bus number 3 [ 5.813089] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM. [ 5.814076] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.17 [ 5.814895] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 5.815625] usb usb3: Product: USB/IP Virtual Host Controller [ 5.816202] usb usb3: Manufacturer: Linux 4.17.0-rc1 vhci_hcd [ 5.816788] usb usb3: SerialNumber: vhci_hcd.0 [ 5.819381] hub 3-0:1.0: USB hub found [ 5.820154] hub 3-0:1.0: 8 ports detected [ 5.827157] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12 [ 5.829721] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 5.830235] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 5.834523] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1 [ 5.837524] rtc_cmos 00:00: RTC can wake from S4 [ 5.838445] rtc rtc0: alarm rollover: day [ 5.840477] rtc_cmos 00:00: char device (251:0) [ 5.840896] rtc_cmos 00:00: registered as rtc0 [ 5.841288] rtc_cmos 00:00: nvmem registration failed [ 5.841736] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram, hpet irqs [ 5.848008] rtc rtc1: alarm rollover: day [ 5.848584] rtc rtc1: test: dev (251:1) [ 5.848945] rtc-test rtc-test.0: rtc core: registered test as rtc1 [ 5.850333] rtc rtc2: alarm rollover: day [ 5.853407] rtc rtc2: test: dev (251:2) [ 5.853893] rtc-test rtc-test.1: rtc core: registered test as rtc2 [ 5.856022] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0x700, revision 0 [ 5.899941] usbcore: registered new interface driver i2c-diolan-u2c [ 5.900897] i2c-parport: adapter type unspecified [ 5.903412] usbcore: registered new interface driver RobotFuzz Open Source InterFace, OSIF [ 5.904312] isa i2c-pca-isa.0: Please specify I/O base [ 5.907452] Driver for 1-wire Dallas network protocol. [ 5.908030] usbcore: registered new interface driver DS9490R [ 5.908552] w1_f0d_init() [ 6.455834] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3 [ 6.626738] pc87360: PC8736x not detected, module not inserted [ 6.822692] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel at redhat.com [ 6.825515] device-mapper: multipath round-robin: version 1.2.0 loaded [ 6.826509] device-mapper: raid: Loading target version 1.13.2 [ 6.831382] platform eisa.0: Probing EISA bus 0 [ 6.832079] platform eisa.0: EISA: Cannot allocate resource for mainboard [ 6.832718] platform eisa.0: Cannot allocate resource for EISA slot 1 [ 6.833290] platform eisa.0: Cannot allocate resource for EISA slot 2 [ 6.833892] platform eisa.0: Cannot allocate resource for EISA slot 3 [ 6.834458] platform eisa.0: Cannot allocate resource for EISA slot 4 [ 6.835017] platform eisa.0: Cannot allocate resource for EISA slot 5 [ 6.835581] platform eisa.0: Cannot allocate resource for EISA slot 6 [ 6.836146] platform eisa.0: Cannot allocate resource for EISA slot 7 [ 6.836726] platform eisa.0: Cannot allocate resource for EISA slot 8 [ 6.837298] platform eisa.0: EISA: Detected 0 cards [ 6.837838] sdhci: Secure Digital Host Controller Interface driver [ 6.838381] sdhci: Copyright(c) Pierre Ossman [ 6.839894] usbcore: registered new interface driver ushc [ 6.843819] leds_ss4200: no LED devices found [ 6.858387] iscsi: registered transport (iser) [ 6.867173] Driver for HIFN 795x crypto accelerator chip has been successfully registered. [ 6.871532] usbcore: registered new interface driver usbhid [ 6.872036] usbhid: USB HID core driver [ 6.872383] NET: Registered protocol family 4 [ 6.872889] no options. [ 6.874165] LNet: HW nodes: 1, HW CPU cores: 1, npartitions: 1 [ 6.874688] LNetError: 1:0:(module.c:546:libcfs_init()) misc_register: error -16 [ 7.893425] BUG: unable to handle kernel paging request at 08000664 [ 7.893989] *pde = 00000000 [ 7.894251] Oops: 0000 [#1] SMP [ 7.894528] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G S 4.17.0-rc1 #198 [ 7.895196] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 7.895924] EIP: cfs_cpt_spread_node+0x5c/0x115 [ 7.896320] EFLAGS: 00210202 CPU: 0 [ 7.896625] EAX: d6c31320 EBX: 00000001 ECX: 00000001 EDX: 00000000 [ 7.896678] ESI: 08000664 EDI: 00000000 EBP: c7ea3e88 ESP: c7ea3e78 [ 7.896678] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 7.896678] CR0: 80050033 CR2: 08000664 CR3: 05380000 CR4: 00000690 [ 7.896678] Call Trace: [ 7.896678] lnet_res_container_setup+0x9a/0x210 [ 7.896678] LNetNIInit+0x701/0xdef [ 7.896678] ? ktime_get_real_seconds+0xe3/0xf9 [ 7.896678] srpc_startup+0x8b/0x413 [ 7.896678] lnet_selftest_init+0x3de/0x78c [ 7.896678] do_one_initcall+0x1a2/0x410 [ 7.896678] ? lnet_selftest_exit+0xa8/0xa8 [ 7.896678] ? parse_args+0x94/0x3b6 [ 7.896678] kernel_init_freeable+0x3b3/0x488 [ 7.896678] ? rest_init+0x11b/0x11b [ 7.896678] kernel_init+0xd/0x15f [ 7.896678] ret_from_fork+0x2e/0x40 [ 7.896678] Code: c4 74 11 8b 50 04 8b 70 18 89 55 f0 8d 4a 01 89 48 04 eb 17 6b d2 0c 03 50 0c 89 d1 8b 42 08 8b 72 04 89 45 f0 8d 50 01 89 51 08 <8b> 06 6a 00 83 e0 01 e8 5c 82 d7 fe 89 c3 31 c0 85 db 0f 9e c0 [ 7.896678] EIP: cfs_cpt_spread_node+0x5c/0x115 SS:ESP: 0068:c7ea3e78 [ 7.896678] CR2: 0000000008000664 [ 7.896678] ---[ end trace 5246465f75f74727 ]--- [ 7.896678] Kernel panic - not syncing: Fatal exception [ 7.896678] Kernel Offset: disabled Elapsed time: 20 #!/bin/bash # To reproduce, # 1) save job-script and this script (both are attached in 0day report email) # 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH kernel=$1 initrds=( /osimage/yocto/yocto-tiny-i386-2016-04-22.cgz /lkp/lkp/lkp-i386.cgz /osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig.i386_2016-09-03.cgz ) HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}" { cat "${initrds[@]//*\//}" [[ $INSTALL_MOD_PATH ]] && ( cd "$INSTALL_MOD_PATH" find lib | cpio -o -H newc --quiet | gzip ) echo job-script | cpio -o -H newc --quiet | gzip } > initrd.img kvm=( qemu-system-x86_64 -enable-kvm -kernel $kernel -initrd initrd.img -m 420 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial stdio -display none -monitor null ) append=( ip=::::vm-lkp-nhm-dp2-yocto-ia32-6::dhcp root=/dev/ram0 user=lkp job=/job-script ARCH=i386 kconfig=i386-randconfig-c0-04180358 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp2-yocto-ia32/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 result_service=tmpfs debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.minor_count=8 rcuperf.shutdown=0 ) "${kvm[@]}" -append "${append[*]}" -------------- next part -------------- # # Automatically generated file; DO NOT EDIT. # Linux/i386 4.17.0-rc1 Kernel Configuration # CONFIG_X86_32=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf32-i386" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_MMU=y CONFIG_ARCH_MMAP_RND_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_BITS_MAX=16 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_X86_32_SMP=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=2 CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # # General setup # CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y # CONFIG_KERNEL_GZIP is not set # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set CONFIG_KERNEL_XZ=y # CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZ4 is not set CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_CROSS_MEMORY_ATTACH is not set CONFIG_USELIB=y CONFIG_AUDIT=y CONFIG_HAVE_ARCH_AUDITSYSCALL=y CONFIG_AUDITSYSCALL=y CONFIG_AUDIT_WATCH=y CONFIG_AUDIT_TREE=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_SIM=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_GENERIC_CMOS_UPDATE=y # # Timers subsystem # CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ_COMMON=y # CONFIG_HZ_PERIODIC is not set CONFIG_NO_HZ_IDLE=y # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set # # CPU/Task time and stats accounting # CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_IRQ_TIME_ACCOUNTING=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y # CONFIG_TASK_XACCT is not set CONFIG_CPU_ISOLATION=y # # RCU Subsystem # CONFIG_TREE_RCU=y CONFIG_RCU_EXPERT=y CONFIG_SRCU=y CONFIG_TREE_SRCU=y CONFIG_TASKS_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y CONFIG_RCU_FANOUT=32 CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FAST_NO_HZ is not set CONFIG_RCU_NOCB_CPU=y CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=20 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y CONFIG_CGROUPS=y # CONFIG_MEMCG is not set # CONFIG_BLK_CGROUP is not set # CONFIG_CGROUP_SCHED is not set # CONFIG_CGROUP_PIDS is not set # CONFIG_CGROUP_RDMA is not set # CONFIG_CGROUP_FREEZER is not set # CONFIG_CGROUP_HUGETLB is not set # CONFIG_CPUSETS is not set # CONFIG_CGROUP_DEVICE is not set # CONFIG_CGROUP_CPUACCT is not set # CONFIG_CGROUP_PERF is not set # CONFIG_CGROUP_BPF is not set # CONFIG_CGROUP_DEBUG is not set # CONFIG_NAMESPACES is not set # CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_GZIP=y # CONFIG_RD_BZIP2 is not set # CONFIG_RD_LZMA is not set CONFIG_RD_XZ=y # CONFIG_RD_LZO is not set CONFIG_RD_LZ4=y # CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y CONFIG_BPF=y CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_MULTIUSER=y # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_SYSCTL_SYSCALL is not set CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y CONFIG_PRINTK_NMI=y CONFIG_BUG=y CONFIG_PCSPKR_PLATFORM=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_FUTEX_PI=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y # CONFIG_EVENTFD is not set CONFIG_SHMEM=y # CONFIG_AIO is not set CONFIG_ADVISE_SYSCALLS=y CONFIG_MEMBARRIER=y # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y # CONFIG_USERFAULTFD is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y # CONFIG_PC104 is not set # # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set # CONFIG_SLUB is not set CONFIG_SLOB=y CONFIG_SLAB_MERGE_DEFAULT=y CONFIG_SYSTEM_DATA_VERIFICATION=y CONFIG_PROFILING=y CONFIG_TRACEPOINTS=y CONFIG_CRASH_CORE=y CONFIG_KEXEC_CORE=y CONFIG_OPROFILE=y CONFIG_OPROFILE_EVENT_MULTIPLEX=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y CONFIG_JUMP_LABEL=y CONFIG_STATIC_KEYS_SELFTEST=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_SET_MEMORY=y CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_RCU_TABLE_FREE=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_GCC_PLUGINS=y # CONFIG_GCC_PLUGINS is not set CONFIG_HAVE_CC_STACKPROTECTOR=y # CONFIG_CC_STACKPROTECTOR_NONE is not set CONFIG_CC_STACKPROTECTOR_REGULAR=y # CONFIG_CC_STACKPROTECTOR_STRONG is not set # CONFIG_CC_STACKPROTECTOR_AUTO is not set CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_HAVE_ARCH_MMAP_RND_BITS=y CONFIG_HAVE_EXIT_THREAD=y CONFIG_ARCH_MMAP_RND_BITS=8 CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_ISA_BUS_API=y CONFIG_CLONE_BACKWARDS=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_OLD_SIGACTION=y CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_ARCH_HAS_REFCOUNT=y # CONFIG_REFCOUNT_FULL is not set # # GCOV-based kernel profiling # # CONFIG_GCOV_KERNEL is not set CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 # CONFIG_MODULES is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y # CONFIG_LBDAF is not set CONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y # CONFIG_BLK_DEV_ZONED is not set CONFIG_BLK_CMDLINE_PARSER=y CONFIG_BLK_WBT=y # CONFIG_BLK_WBT_SQ is not set CONFIG_BLK_WBT_MQ=y CONFIG_BLK_DEBUG_FS=y # CONFIG_BLK_SED_OPAL is not set # # Partition Types # CONFIG_PARTITION_ADVANCED=y CONFIG_ACORN_PARTITION=y CONFIG_ACORN_PARTITION_CUMANA=y # CONFIG_ACORN_PARTITION_EESOX is not set # CONFIG_ACORN_PARTITION_ICS is not set # CONFIG_ACORN_PARTITION_ADFS is not set CONFIG_ACORN_PARTITION_POWERTEC=y CONFIG_ACORN_PARTITION_RISCIX=y CONFIG_AIX_PARTITION=y CONFIG_OSF_PARTITION=y CONFIG_AMIGA_PARTITION=y CONFIG_ATARI_PARTITION=y # CONFIG_MAC_PARTITION is not set CONFIG_MSDOS_PARTITION=y CONFIG_BSD_DISKLABEL=y # CONFIG_MINIX_SUBPARTITION is not set # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set CONFIG_LDM_PARTITION=y CONFIG_LDM_DEBUG=y # CONFIG_SGI_PARTITION is not set CONFIG_ULTRIX_PARTITION=y # CONFIG_SUN_PARTITION is not set CONFIG_KARMA_PARTITION=y # CONFIG_EFI_PARTITION is not set # CONFIG_SYSV68_PARTITION is not set CONFIG_CMDLINE_PARTITION=y CONFIG_BLK_MQ_PCI=y CONFIG_BLK_MQ_VIRTIO=y CONFIG_BLK_MQ_RDMA=y # # IO Schedulers # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="deadline" # CONFIG_MQ_IOSCHED_DEADLINE is not set # CONFIG_MQ_IOSCHED_KYBER is not set # CONFIG_IOSCHED_BFQ is not set CONFIG_ASN1=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_RWSEM_SPIN_ON_OWNER=y CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_QUEUED_RWLOCKS=y CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y # # Processor type and features # CONFIG_ZONE_DMA=y CONFIG_SMP=y CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_MPPARSE=y CONFIG_GOLDFISH=y CONFIG_RETPOLINE=y CONFIG_INTEL_RDT=y # CONFIG_X86_BIGSMP is not set CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_GOLDFISH is not set # CONFIG_X86_INTEL_LPSS is not set # CONFIG_X86_AMD_PLATFORM_DEVICE is not set CONFIG_IOSF_MBI=y CONFIG_IOSF_MBI_DEBUG=y # CONFIG_X86_RDC321X is not set CONFIG_X86_32_NON_STANDARD=y # CONFIG_STA2X11 is not set CONFIG_X86_32_IRIS=y # CONFIG_SCHED_OMIT_FRAME_POINTER is not set CONFIG_HYPERVISOR_GUEST=y CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_DEBUG is not set # CONFIG_PARAVIRT_SPINLOCKS is not set CONFIG_KVM_GUEST=y # CONFIG_KVM_DEBUG_FS is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set CONFIG_PARAVIRT_CLOCK=y CONFIG_NO_BOOTMEM=y # CONFIG_M486 is not set CONFIG_M586=y # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set # CONFIG_MPENTIUMIII is not set # CONFIG_MPENTIUMM is not set # CONFIG_MPENTIUM4 is not set # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MELAN is not set # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set # CONFIG_MCORE2 is not set # CONFIG_MATOM is not set # CONFIG_X86_GENERIC is not set CONFIG_X86_INTERNODE_CACHE_SHIFT=5 CONFIG_X86_L1_CACHE_SHIFT=5 CONFIG_X86_F00F_BUG=y CONFIG_X86_ALIGNMENT_16=y CONFIG_X86_MINIMUM_CPU_FAMILY=4 # CONFIG_PROCESSOR_SELECT is not set CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_CYRIX_32=y CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_CENTAUR=y CONFIG_CPU_SUP_TRANSMETA_32=y CONFIG_CPU_SUP_UMC_32=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y CONFIG_NR_CPUS_RANGE_BEGIN=2 CONFIG_NR_CPUS_RANGE_END=8 CONFIG_NR_CPUS_DEFAULT=8 CONFIG_NR_CPUS=8 # CONFIG_SCHED_SMT is not set CONFIG_SCHED_MC=y CONFIG_SCHED_MC_PRIO=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_COUNT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set # # Performance monitoring # CONFIG_PERF_EVENTS_INTEL_UNCORE=y # CONFIG_PERF_EVENTS_INTEL_RAPL is not set CONFIG_PERF_EVENTS_INTEL_CSTATE=y CONFIG_PERF_EVENTS_AMD_POWER=y CONFIG_X86_LEGACY_VM86=y CONFIG_VM86=y CONFIG_X86_16BIT=y CONFIG_X86_ESPFIX32=y CONFIG_TOSHIBA=y CONFIG_I8K=y # CONFIG_X86_REBOOTFIXUPS is not set # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set CONFIG_X86_CPUID=y CONFIG_NOHIGHMEM=y # CONFIG_HIGHMEM4G is not set CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_3G_OPT is not set # CONFIG_VMSPLIT_2G is not set # CONFIG_VMSPLIT_2G_OPT is not set # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000 # CONFIG_X86_PAE is not set CONFIG_ARCH_HAS_MEM_ENCRYPT=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ILLEGAL_POINTER_VALUE=0 CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_SPARSEMEM_STATIC=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_GENERIC_GUP=y CONFIG_ARCH_DISCARD_MEMBLOCK=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_COMPACTION=y CONFIG_MIGRATION=y CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_TRANSPARENT_HUGEPAGE=y # CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y CONFIG_TRANSPARENT_HUGE_PAGECACHE=y # CONFIG_CLEANCACHE is not set CONFIG_FRONTSWAP=y # CONFIG_CMA is not set CONFIG_ZSWAP=y CONFIG_ZPOOL=y # CONFIG_ZBUD is not set # CONFIG_Z3FOLD is not set # CONFIG_ZSMALLOC is not set CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_DEFERRED_STRUCT_PAGE_INIT=y # CONFIG_IDLE_PAGE_TRACKING is not set # CONFIG_PERCPU_STATS is not set CONFIG_GUP_BENCHMARK=y # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_X86_RESERVE_LOW=64 CONFIG_MATH_EMULATION=y CONFIG_MTRR=y # CONFIG_MTRR_SANITIZER is not set CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y # CONFIG_ARCH_RANDOM is not set CONFIG_X86_SMAP=y CONFIG_X86_INTEL_UMIP=y # CONFIG_EFI is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set CONFIG_HZ_300=y # CONFIG_HZ_1000 is not set CONFIG_HZ=300 CONFIG_KEXEC=y CONFIG_PHYSICAL_START=0x1000000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 # CONFIG_HOTPLUG_CPU is not set # CONFIG_COMPAT_VDSO is not set # CONFIG_CMDLINE_BOOL is not set CONFIG_MODIFY_LDT_SYSCALL=y # # Power management and ACPI options # # CONFIG_SUSPEND is not set # CONFIG_HIBERNATION is not set CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y CONFIG_PM_CLK=y CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y CONFIG_ACPI=y CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y # CONFIG_ACPI_DEBUGGER is not set CONFIG_ACPI_SPCR_TABLE=y # CONFIG_ACPI_PROCFS_POWER is not set CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y # CONFIG_ACPI_EC_DEBUGFS is not set CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_VIDEO=y CONFIG_ACPI_FAN=y # CONFIG_ACPI_DOCK is not set CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y CONFIG_ACPI_PROCESSOR_IDLE=y CONFIG_ACPI_PROCESSOR=y # CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set CONFIG_ACPI_THERMAL=y CONFIG_ACPI_CUSTOM_DSDT_FILE="" CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_TABLE_UPGRADE=y # CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_PCI_SLOT is not set # CONFIG_ACPI_CONTAINER is not set CONFIG_ACPI_HOTPLUG_IOAPIC=y # CONFIG_ACPI_SBS is not set # CONFIG_ACPI_HED is not set # CONFIG_ACPI_CUSTOM_METHOD is not set # CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y # CONFIG_ACPI_APEI is not set # CONFIG_DPTF_POWER is not set # CONFIG_PMIC_OPREGION is not set # CONFIG_ACPI_CONFIGFS is not set CONFIG_X86_PM_TIMER=y # CONFIG_SFI is not set # # CPU Frequency scaling # CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set # CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set # # CPU frequency scaling drivers # CONFIG_CPUFREQ_DT=y CONFIG_CPUFREQ_DT_PLATDEV=y CONFIG_X86_INTEL_PSTATE=y # CONFIG_X86_PCC_CPUFREQ is not set # CONFIG_X86_ACPI_CPUFREQ is not set CONFIG_X86_POWERNOW_K6=y CONFIG_X86_POWERNOW_K7=y CONFIG_X86_POWERNOW_K7_ACPI=y CONFIG_X86_GX_SUSPMOD=y # CONFIG_X86_SPEEDSTEP_CENTRINO is not set CONFIG_X86_SPEEDSTEP_ICH=y CONFIG_X86_SPEEDSTEP_SMI=y # CONFIG_X86_P4_CLOCKMOD is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set # CONFIG_X86_LONGRUN is not set # CONFIG_X86_LONGHAUL is not set # CONFIG_X86_E_POWERSAVER is not set # # shared options # CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y # # CPU Idle # CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_INTEL_IDLE is not set # # Bus options (PCI etc.) # CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set CONFIG_PCI_GOMMCONFIG=y # CONFIG_PCI_GODIRECT is not set # CONFIG_PCI_GOANY is not set CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_CNB20LE_QUIRK=y # CONFIG_PCIEPORTBUS is not set # CONFIG_PCI_MSI is not set CONFIG_PCI_QUIRKS=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set CONFIG_PCI_STUB=y CONFIG_PCI_ATS=y CONFIG_PCI_LOCKLESS_CONFIG=y CONFIG_PCI_IOV=y CONFIG_PCI_PRI=y # CONFIG_PCI_PASID is not set CONFIG_PCI_LABEL=y # CONFIG_HOTPLUG_PCI is not set # # Cadence PCIe controllers support # CONFIG_PCIE_CADENCE=y CONFIG_PCIE_CADENCE_HOST=y CONFIG_PCIE_CADENCE_EP=y # # DesignWare PCI Core Support # # # PCI host controller drivers # # # PCI Endpoint # CONFIG_PCI_ENDPOINT=y CONFIG_PCI_ENDPOINT_CONFIGFS=y # CONFIG_PCI_EPF_TEST is not set # # PCI switch controller drivers # # CONFIG_PCI_SW_SWITCHTEC is not set CONFIG_ISA_BUS=y CONFIG_ISA_DMA_API=y CONFIG_ISA=y CONFIG_EISA=y CONFIG_EISA_VLB_PRIMING=y # CONFIG_EISA_PCI_EISA is not set CONFIG_EISA_VIRTUAL_ROOT=y # CONFIG_EISA_NAMES is not set CONFIG_SCx200=y CONFIG_SCx200HR_TIMER=y # CONFIG_OLPC is not set # CONFIG_ALIX is not set CONFIG_NET5501=y CONFIG_GEOS=y CONFIG_AMD_NB=y CONFIG_PCCARD=y CONFIG_PCMCIA=y # CONFIG_PCMCIA_LOAD_CIS is not set # CONFIG_CARDBUS is not set # # PC-card bridges # # CONFIG_YENTA is not set # CONFIG_PD6729 is not set CONFIG_I82092=y CONFIG_I82365=y CONFIG_TCIC=y CONFIG_PCMCIA_PROBE=y CONFIG_PCCARD_NONSTATIC=y # CONFIG_RAPIDIO is not set CONFIG_X86_SYSFB=y # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y CONFIG_ELFCORE=y CONFIG_BINFMT_SCRIPT=y CONFIG_HAVE_AOUT=y CONFIG_BINFMT_AOUT=y # CONFIG_BINFMT_MISC is not set # CONFIG_COREDUMP is not set CONFIG_COMPAT_32=y CONFIG_HAVE_ATOMIC_IOMAP=y CONFIG_NET=y # # Networking options # # CONFIG_PACKET is not set CONFIG_UNIX=y CONFIG_UNIX_DIAG=y CONFIG_TLS=y CONFIG_XFRM=y CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=y CONFIG_XFRM_USER=y # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set # CONFIG_XFRM_STATISTICS is not set CONFIG_XFRM_IPCOMP=y # CONFIG_NET_KEY is not set CONFIG_SMC=y CONFIG_SMC_DIAG=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set CONFIG_IP_ADVANCED_ROUTER=y # CONFIG_IP_FIB_TRIE_STATS is not set CONFIG_IP_MULTIPLE_TABLES=y # CONFIG_IP_ROUTE_MULTIPATH is not set CONFIG_IP_ROUTE_VERBOSE=y CONFIG_IP_ROUTE_CLASSID=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y # CONFIG_IP_PNP_BOOTP is not set # CONFIG_IP_PNP_RARP is not set CONFIG_NET_IPIP=y # CONFIG_NET_IPGRE_DEMUX is not set CONFIG_NET_IP_TUNNEL=y CONFIG_IP_MROUTE_COMMON=y # CONFIG_SYN_COOKIES is not set CONFIG_NET_UDP_TUNNEL=y CONFIG_NET_FOU=y # CONFIG_NET_FOU_IP_TUNNELS is not set CONFIG_INET_AH=y # CONFIG_INET_ESP is not set CONFIG_INET_IPCOMP=y CONFIG_INET_XFRM_TUNNEL=y CONFIG_INET_TUNNEL=y # CONFIG_INET_XFRM_MODE_TRANSPORT is not set # CONFIG_INET_XFRM_MODE_TUNNEL is not set # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_DIAG is not set CONFIG_TCP_CONG_ADVANCED=y CONFIG_TCP_CONG_BIC=y CONFIG_TCP_CONG_CUBIC=y CONFIG_TCP_CONG_WESTWOOD=y # CONFIG_TCP_CONG_HTCP is not set # CONFIG_TCP_CONG_HSTCP is not set # CONFIG_TCP_CONG_HYBLA is not set # CONFIG_TCP_CONG_VEGAS is not set # CONFIG_TCP_CONG_NV is not set CONFIG_TCP_CONG_SCALABLE=y CONFIG_TCP_CONG_LP=y # CONFIG_TCP_CONG_VENO is not set # CONFIG_TCP_CONG_YEAH is not set CONFIG_TCP_CONG_ILLINOIS=y # CONFIG_TCP_CONG_DCTCP is not set CONFIG_TCP_CONG_CDG=y CONFIG_TCP_CONG_BBR=y # CONFIG_DEFAULT_BIC is not set # CONFIG_DEFAULT_CUBIC is not set # CONFIG_DEFAULT_WESTWOOD is not set # CONFIG_DEFAULT_CDG is not set CONFIG_DEFAULT_BBR=y # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_TCP_CONG="bbr" # CONFIG_TCP_MD5SIG is not set CONFIG_IPV6=y # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set CONFIG_INET6_AH=y CONFIG_INET6_ESP=y CONFIG_INET6_ESP_OFFLOAD=y # CONFIG_INET6_IPCOMP is not set # CONFIG_IPV6_MIP6 is not set CONFIG_INET6_TUNNEL=y # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set CONFIG_INET6_XFRM_MODE_TUNNEL=y CONFIG_INET6_XFRM_MODE_BEET=y CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y # CONFIG_IPV6_VTI is not set CONFIG_IPV6_SIT=y CONFIG_IPV6_SIT_6RD=y CONFIG_IPV6_NDISC_NODETYPE=y CONFIG_IPV6_TUNNEL=y CONFIG_IPV6_FOU=y CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_SUBTREES=y CONFIG_IPV6_MROUTE=y # CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set # CONFIG_IPV6_PIMSM_V2 is not set CONFIG_IPV6_SEG6_LWTUNNEL=y # CONFIG_IPV6_SEG6_HMAC is not set # CONFIG_NETWORK_SECMARK is not set CONFIG_NET_PTP_CLASSIFY=y CONFIG_NETWORK_PHY_TIMESTAMPING=y # CONFIG_NETFILTER is not set CONFIG_IP_DCCP=y # # DCCP CCIDs Configuration # CONFIG_IP_DCCP_CCID2_DEBUG=y CONFIG_IP_DCCP_CCID3=y # CONFIG_IP_DCCP_CCID3_DEBUG is not set CONFIG_IP_DCCP_TFRC_LIB=y # # DCCP Kernel Hacking # # CONFIG_IP_DCCP_DEBUG is not set # CONFIG_IP_SCTP is not set # CONFIG_RDS is not set CONFIG_TIPC=y CONFIG_TIPC_MEDIA_IB=y # CONFIG_TIPC_MEDIA_UDP is not set CONFIG_TIPC_DIAG=y # CONFIG_ATM is not set # CONFIG_L2TP is not set CONFIG_STP=y CONFIG_GARP=y CONFIG_MRP=y CONFIG_BRIDGE=y # CONFIG_BRIDGE_IGMP_SNOOPING is not set CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=y CONFIG_NET_DSA_LEGACY=y CONFIG_NET_DSA_TAG_BRCM=y CONFIG_NET_DSA_TAG_BRCM_PREPEND=y CONFIG_NET_DSA_TAG_LAN9303=y CONFIG_NET_DSA_TAG_MTK=y CONFIG_NET_DSA_TAG_TRAILER=y CONFIG_NET_DSA_TAG_QCA=y CONFIG_VLAN_8021Q=y CONFIG_VLAN_8021Q_GVRP=y CONFIG_VLAN_8021Q_MVRP=y # CONFIG_DECNET is not set CONFIG_LLC=y CONFIG_LLC2=y # CONFIG_ATALK is not set CONFIG_X25=y # CONFIG_LAPB is not set CONFIG_PHONET=y CONFIG_6LOWPAN=y CONFIG_6LOWPAN_DEBUGFS=y CONFIG_6LOWPAN_NHC=y # CONFIG_6LOWPAN_NHC_DEST is not set # CONFIG_6LOWPAN_NHC_FRAGMENT is not set CONFIG_6LOWPAN_NHC_HOP=y CONFIG_6LOWPAN_NHC_IPV6=y CONFIG_6LOWPAN_NHC_MOBILITY=y CONFIG_6LOWPAN_NHC_ROUTING=y CONFIG_6LOWPAN_NHC_UDP=y CONFIG_6LOWPAN_GHC_EXT_HDR_HOP=y # CONFIG_6LOWPAN_GHC_UDP is not set CONFIG_6LOWPAN_GHC_ICMPV6=y # CONFIG_6LOWPAN_GHC_EXT_HDR_DEST is not set CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=y CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=y # CONFIG_IEEE802154 is not set CONFIG_NET_SCHED=y # # Queueing/Scheduling # CONFIG_NET_SCH_CBQ=y CONFIG_NET_SCH_HTB=y # CONFIG_NET_SCH_HFSC is not set CONFIG_NET_SCH_PRIO=y CONFIG_NET_SCH_MULTIQ=y # CONFIG_NET_SCH_RED is not set CONFIG_NET_SCH_SFB=y # CONFIG_NET_SCH_SFQ is not set CONFIG_NET_SCH_TEQL=y CONFIG_NET_SCH_TBF=y # CONFIG_NET_SCH_CBS is not set CONFIG_NET_SCH_GRED=y CONFIG_NET_SCH_DSMARK=y CONFIG_NET_SCH_NETEM=y # CONFIG_NET_SCH_DRR is not set CONFIG_NET_SCH_MQPRIO=y CONFIG_NET_SCH_CHOKE=y CONFIG_NET_SCH_QFQ=y CONFIG_NET_SCH_CODEL=y CONFIG_NET_SCH_FQ_CODEL=y # CONFIG_NET_SCH_FQ is not set # CONFIG_NET_SCH_HHF is not set CONFIG_NET_SCH_PIE=y # CONFIG_NET_SCH_INGRESS is not set # CONFIG_NET_SCH_PLUG is not set # CONFIG_NET_SCH_DEFAULT is not set # # Classification # CONFIG_NET_CLS=y CONFIG_NET_CLS_BASIC=y CONFIG_NET_CLS_TCINDEX=y CONFIG_NET_CLS_ROUTE4=y # CONFIG_NET_CLS_FW is not set # CONFIG_NET_CLS_U32 is not set # CONFIG_NET_CLS_RSVP is not set CONFIG_NET_CLS_RSVP6=y CONFIG_NET_CLS_FLOW=y # CONFIG_NET_CLS_CGROUP is not set CONFIG_NET_CLS_BPF=y # CONFIG_NET_CLS_FLOWER is not set CONFIG_NET_CLS_MATCHALL=y # CONFIG_NET_EMATCH is not set CONFIG_NET_CLS_ACT=y CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_GACT=y # CONFIG_GACT_PROB is not set CONFIG_NET_ACT_MIRRED=y CONFIG_NET_ACT_SAMPLE=y CONFIG_NET_ACT_NAT=y # CONFIG_NET_ACT_PEDIT is not set # CONFIG_NET_ACT_SIMP is not set # CONFIG_NET_ACT_SKBEDIT is not set CONFIG_NET_ACT_CSUM=y CONFIG_NET_ACT_VLAN=y CONFIG_NET_ACT_BPF=y CONFIG_NET_ACT_SKBMOD=y CONFIG_NET_ACT_IFE=y CONFIG_NET_ACT_TUNNEL_KEY=y # CONFIG_NET_IFE_SKBMARK is not set CONFIG_NET_IFE_SKBPRIO=y CONFIG_NET_IFE_SKBTCINDEX=y CONFIG_NET_SCH_FIFO=y # CONFIG_DCB is not set CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=y CONFIG_BATMAN_ADV_BATMAN_V=y # CONFIG_BATMAN_ADV_BLA is not set # CONFIG_BATMAN_ADV_DAT is not set # CONFIG_BATMAN_ADV_NC is not set CONFIG_BATMAN_ADV_MCAST=y # CONFIG_BATMAN_ADV_DEBUGFS is not set # CONFIG_OPENVSWITCH is not set CONFIG_VSOCKETS=y # CONFIG_VSOCKETS_DIAG is not set # CONFIG_VMWARE_VMCI_VSOCKETS is not set # CONFIG_VIRTIO_VSOCKETS is not set # CONFIG_NETLINK_DIAG is not set CONFIG_MPLS=y CONFIG_NET_MPLS_GSO=y CONFIG_MPLS_ROUTING=y CONFIG_MPLS_IPTUNNEL=y # CONFIG_NET_NSH is not set CONFIG_HSR=y CONFIG_NET_SWITCHDEV=y # CONFIG_NET_L3_MASTER_DEV is not set # CONFIG_NET_NCSI is not set CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y # CONFIG_CGROUP_NET_PRIO is not set # CONFIG_CGROUP_NET_CLASSID is not set CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y # CONFIG_BPF_STREAM_PARSER is not set CONFIG_NET_FLOW_LIMIT=y # # Network testing # # CONFIG_NET_PKTGEN is not set CONFIG_NET_DROP_MONITOR=y CONFIG_HAMRADIO=y # # Packet Radio protocols # CONFIG_AX25=y # CONFIG_AX25_DAMA_SLAVE is not set # CONFIG_NETROM is not set # CONFIG_ROSE is not set # # AX.25 network device drivers # # CONFIG_MKISS is not set # CONFIG_6PACK is not set CONFIG_BPQETHER=y CONFIG_SCC=y # CONFIG_SCC_DELAY is not set CONFIG_SCC_TRXECHO=y # CONFIG_BAYCOM_SER_FDX is not set # CONFIG_BAYCOM_SER_HDX is not set CONFIG_BAYCOM_PAR=y CONFIG_BAYCOM_EPP=y CONFIG_YAM=y CONFIG_CAN=y # CONFIG_CAN_RAW is not set # CONFIG_CAN_BCM is not set CONFIG_CAN_GW=y # # CAN Device Drivers # CONFIG_CAN_VCAN=y # CONFIG_CAN_VXCAN is not set # CONFIG_CAN_SLCAN is not set # CONFIG_CAN_DEV is not set # CONFIG_CAN_DEBUG_DEVICES is not set # CONFIG_BT is not set CONFIG_AF_RXRPC=y CONFIG_AF_RXRPC_IPV6=y CONFIG_AF_RXRPC_INJECT_LOSS=y CONFIG_AF_RXRPC_DEBUG=y # CONFIG_RXKAD is not set CONFIG_AF_KCM=y CONFIG_STREAM_PARSER=y CONFIG_FIB_RULES=y CONFIG_WIRELESS=y CONFIG_WIRELESS_EXT=y CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y CONFIG_WEXT_SPY=y CONFIG_WEXT_PRIV=y CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set # CONFIG_CFG80211_CERTIFICATION_ONUS is not set CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_CRDA_SUPPORT is not set CONFIG_CFG80211_WEXT=y CONFIG_MAC80211=y CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y # CONFIG_MAC80211_RC_MINSTREL_HT is not set CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel" CONFIG_MAC80211_MESH=y CONFIG_MAC80211_LEDS=y # CONFIG_MAC80211_DEBUGFS is not set # CONFIG_MAC80211_MESSAGE_TRACING is not set # CONFIG_MAC80211_DEBUG_MENU is not set CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 # CONFIG_WIMAX is not set CONFIG_RFKILL=y CONFIG_RFKILL_LEDS=y # CONFIG_RFKILL_INPUT is not set CONFIG_RFKILL_GPIO=y CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y CONFIG_NET_9P_RDMA=y CONFIG_NET_9P_DEBUG=y # CONFIG_CAIF is not set CONFIG_CEPH_LIB=y # CONFIG_CEPH_LIB_PRETTYDEBUG is not set CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y CONFIG_NFC=y CONFIG_NFC_DIGITAL=y CONFIG_NFC_NCI=y # CONFIG_NFC_NCI_UART is not set # CONFIG_NFC_HCI is not set # # Near Field Communication (NFC) devices # # CONFIG_NFC_SIM is not set CONFIG_NFC_PORT100=y # CONFIG_NFC_FDP is not set CONFIG_NFC_PN533=y # CONFIG_NFC_PN533_USB is not set CONFIG_NFC_PN533_I2C=y CONFIG_NFC_MRVL=y CONFIG_NFC_MRVL_USB=y CONFIG_NFC_MRVL_I2C=y # CONFIG_NFC_ST_NCI_I2C is not set CONFIG_NFC_NXP_NCI=y CONFIG_NFC_NXP_NCI_I2C=y CONFIG_NFC_S3FWRN5=y CONFIG_NFC_S3FWRN5_I2C=y CONFIG_PSAMPLE=y CONFIG_NET_IFE=y CONFIG_LWTUNNEL=y CONFIG_LWTUNNEL_BPF=y CONFIG_DST_CACHE=y CONFIG_GRO_CELLS=y CONFIG_NET_DEVLINK=y CONFIG_MAY_USE_DEVLINK=y # # Device Drivers # # # Generic Driver Options # CONFIG_UEVENT_HELPER=y CONFIG_UEVENT_HELPER_PATH="" CONFIG_DEVTMPFS=y # CONFIG_DEVTMPFS_MOUNT is not set # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_DRIVER is not set CONFIG_DEBUG_DEVRES=y # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_W1=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y # CONFIG_DMA_FENCE_TRACE is not set # # Bus devices # # CONFIG_SIMPLE_PM_BUS is not set CONFIG_CONNECTOR=y # CONFIG_PROC_EVENTS is not set CONFIG_MTD=y CONFIG_MTD_REDBOOT_PARTS=y CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set # CONFIG_MTD_CMDLINE_PARTS is not set CONFIG_MTD_OF_PARTS=y # CONFIG_MTD_AR7_PARTS is not set # # Partition parsers # # # User Modules And Translation Layers # CONFIG_MTD_BLKDEVS=y CONFIG_MTD_BLOCK=y CONFIG_FTL=y CONFIG_NFTL=y # CONFIG_NFTL_RW is not set CONFIG_INFTL=y # CONFIG_RFD_FTL is not set # CONFIG_SSFDC is not set CONFIG_SM_FTL=y # CONFIG_MTD_OOPS is not set CONFIG_MTD_SWAP=y CONFIG_MTD_PARTITIONED_MASTER=y # # RAM/ROM/Flash chip drivers # # CONFIG_MTD_CFI is not set # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set CONFIG_MTD_ABSENT=y # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set CONFIG_MTD_PHYSMAP=y # CONFIG_MTD_PHYSMAP_COMPAT is not set # CONFIG_MTD_PHYSMAP_OF is not set CONFIG_MTD_INTEL_VR_NOR=y CONFIG_MTD_PLATRAM=y # # Self-contained MTD device drivers # # CONFIG_MTD_PMC551 is not set CONFIG_MTD_SLRAM=y CONFIG_MTD_PHRAM=y # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers # CONFIG_MTD_DOCG3=y CONFIG_BCH_CONST_M=14 CONFIG_BCH_CONST_T=4 # CONFIG_MTD_ONENAND is not set CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_ECC_SMC=y # CONFIG_MTD_NAND is not set # # LPDDR & LPDDR2 PCM memory drivers # CONFIG_MTD_LPDDR=y CONFIG_MTD_QINFO_PROBE=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_MT81xx_NOR=y # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_SPI_INTEL_SPI=y CONFIG_SPI_INTEL_SPI_PCI=y # CONFIG_SPI_INTEL_SPI_PLATFORM is not set # CONFIG_MTD_UBI is not set CONFIG_DTC=y CONFIG_OF=y # CONFIG_OF_UNITTEST is not set CONFIG_OF_FLATTREE=y CONFIG_OF_KOBJ=y CONFIG_OF_DYNAMIC=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_NET=y CONFIG_OF_MDIO=y CONFIG_OF_RESOLVE=y CONFIG_OF_OVERLAY=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_PARPORT=y # CONFIG_PARPORT_PC is not set # CONFIG_PARPORT_AX88796 is not set # CONFIG_PARPORT_1284 is not set CONFIG_PNP=y CONFIG_PNP_DEBUG_MESSAGES=y # # Protocols # # CONFIG_ISAPNP is not set # CONFIG_PNPBIOS is not set CONFIG_PNPACPI=y CONFIG_BLK_DEV=y CONFIG_BLK_DEV_NULL_BLK=y CONFIG_BLK_DEV_FD=y CONFIG_BLK_DEV_PCIESSD_MTIP32XX=y CONFIG_BLK_DEV_DAC960=y CONFIG_BLK_DEV_UMEM=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_DRBD is not set CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_SX8=y # CONFIG_BLK_DEV_RAM is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set # CONFIG_VIRTIO_BLK is not set CONFIG_BLK_DEV_RBD=y CONFIG_BLK_DEV_RSXX=y # # NVME Support # CONFIG_NVME_CORE=y CONFIG_BLK_DEV_NVME=y # CONFIG_NVME_MULTIPATH is not set CONFIG_NVME_FABRICS=y CONFIG_NVME_RDMA=y CONFIG_NVME_FC=y CONFIG_NVME_TARGET=y # CONFIG_NVME_TARGET_LOOP is not set CONFIG_NVME_TARGET_RDMA=y # CONFIG_NVME_TARGET_FC is not set # # Misc devices # # CONFIG_AD525X_DPOT is not set # CONFIG_DUMMY_IRQ is not set # CONFIG_IBM_ASM is not set CONFIG_PHANTOM=y # CONFIG_SGI_IOC4 is not set CONFIG_TIFM_CORE=y CONFIG_TIFM_7XX1=y # CONFIG_ICS932S401 is not set CONFIG_ENCLOSURE_SERVICES=y # CONFIG_HP_ILO is not set CONFIG_APDS9802ALS=y CONFIG_ISL29003=y CONFIG_ISL29020=y CONFIG_SENSORS_TSL2550=y CONFIG_SENSORS_BH1770=y # CONFIG_SENSORS_APDS990X is not set # CONFIG_HMC6352 is not set CONFIG_DS1682=y # CONFIG_VMWARE_BALLOON is not set CONFIG_PCH_PHUB=y # CONFIG_USB_SWITCH_FSA9480 is not set CONFIG_SRAM=y CONFIG_PCI_ENDPOINT_TEST=y CONFIG_MISC_RTSX=y # CONFIG_C2PORT is not set # # EEPROM support # # CONFIG_EEPROM_AT24 is not set CONFIG_EEPROM_LEGACY=y # CONFIG_EEPROM_MAX6875 is not set CONFIG_EEPROM_93CX6=y CONFIG_EEPROM_IDT_89HPESX=y CONFIG_CB710_CORE=y # CONFIG_CB710_DEBUG is not set CONFIG_CB710_DEBUG_ASSUMPTIONS=y # # Texas Instruments shared transport line discipline # # CONFIG_TI_ST is not set # CONFIG_SENSORS_LIS3_I2C is not set CONFIG_ALTERA_STAPL=y CONFIG_INTEL_MEI=y CONFIG_INTEL_MEI_ME=y # CONFIG_INTEL_MEI_TXE is not set CONFIG_VMWARE_VMCI=y # # Intel MIC & related support # # # Intel MIC Bus Driver # # # SCIF Bus Driver # # # VOP Bus Driver # # # Intel MIC Host Driver # # # Intel MIC Card Driver # # # SCIF Driver # # # Intel MIC Coprocessor State Management (COSM) Drivers # # # VOP Driver # # CONFIG_ECHO is not set CONFIG_MISC_RTSX_PCI=y # CONFIG_MISC_RTSX_USB is not set CONFIG_HAVE_IDE=y CONFIG_IDE=y # # Please see Documentation/ide/ide.txt for help/info on IDE drives # CONFIG_IDE_XFER_MODE=y CONFIG_IDE_TIMINGS=y CONFIG_IDE_ATAPI=y CONFIG_IDE_LEGACY=y # CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_IDE_GD=y # CONFIG_IDE_GD_ATA is not set CONFIG_IDE_GD_ATAPI=y CONFIG_BLK_DEV_IDECS=y # CONFIG_BLK_DEV_IDECD is not set # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEACPI is not set # CONFIG_IDE_TASK_IOCTL is not set CONFIG_IDE_PROC_FS=y # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_PLATFORM=y # CONFIG_BLK_DEV_CMD640 is not set # CONFIG_BLK_DEV_IDEPNP is not set CONFIG_BLK_DEV_IDEDMA_SFF=y # # PCI IDE chipsets support # CONFIG_BLK_DEV_IDEPCI=y # CONFIG_IDEPCI_PCIBUS_ORDER is not set # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y CONFIG_BLK_DEV_OPTI621=y # CONFIG_BLK_DEV_RZ1000 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y CONFIG_BLK_DEV_AEC62XX=y # CONFIG_BLK_DEV_ALI15X3 is not set CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CS5520 is not set CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y CONFIG_BLK_DEV_CS5536=y # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_JMICRON is not set # CONFIG_BLK_DEV_SC1200 is not set CONFIG_BLK_DEV_PIIX=y # CONFIG_BLK_DEV_IT8172 is not set # CONFIG_BLK_DEV_IT8213 is not set CONFIG_BLK_DEV_IT821X=y CONFIG_BLK_DEV_NS87415=y CONFIG_BLK_DEV_PDC202XX_OLD=y CONFIG_BLK_DEV_PDC202XX_NEW=y # CONFIG_BLK_DEV_SVWKS is not set CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y CONFIG_BLK_DEV_SLC90E66=y CONFIG_BLK_DEV_TRM290=y CONFIG_BLK_DEV_VIA82CXXX=y CONFIG_BLK_DEV_TC86C001=y # # Other IDE chipsets support # # # Note: most of these also require special kernel boot parameters # # CONFIG_BLK_DEV_4DRIVES is not set CONFIG_BLK_DEV_ALI14XX=y CONFIG_BLK_DEV_DTC2278=y CONFIG_BLK_DEV_HT6560B=y CONFIG_BLK_DEV_QD65XX=y CONFIG_BLK_DEV_UMC8672=y CONFIG_BLK_DEV_IDEDMA=y # # SCSI device support # CONFIG_SCSI_MOD=y CONFIG_RAID_ATTRS=y CONFIG_SCSI=y CONFIG_SCSI_DMA=y CONFIG_SCSI_NETLINK=y # CONFIG_SCSI_MQ_DEFAULT is not set CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) # # CONFIG_BLK_DEV_SD is not set CONFIG_CHR_DEV_ST=y # CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set # CONFIG_CHR_DEV_SG is not set CONFIG_CHR_DEV_SCH=y CONFIG_SCSI_ENCLOSURE=y # CONFIG_SCSI_CONSTANTS is not set CONFIG_SCSI_LOGGING=y # CONFIG_SCSI_SCAN_ASYNC is not set # # SCSI Transports # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y CONFIG_SCSI_ISCSI_ATTRS=y CONFIG_SCSI_SAS_ATTRS=y CONFIG_SCSI_SAS_LIBSAS=y # CONFIG_SCSI_SAS_HOST_SMP is not set CONFIG_SCSI_SRP_ATTRS=y CONFIG_SCSI_LOWLEVEL=y CONFIG_ISCSI_TCP=y CONFIG_ISCSI_BOOT_SYSFS=y CONFIG_SCSI_CXGB3_ISCSI=y CONFIG_SCSI_CXGB4_ISCSI=y # CONFIG_SCSI_BNX2_ISCSI is not set CONFIG_SCSI_BNX2X_FCOE=y # CONFIG_BE2ISCSI is not set CONFIG_BLK_DEV_3W_XXXX_RAID=y CONFIG_SCSI_HPSA=y CONFIG_SCSI_3W_9XXX=y CONFIG_SCSI_3W_SAS=y CONFIG_SCSI_ACARD=y CONFIG_SCSI_AHA152X=y CONFIG_SCSI_AHA1542=y CONFIG_SCSI_AHA1740=y CONFIG_SCSI_AACRAID=y CONFIG_SCSI_AIC7XXX=y CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 CONFIG_AIC7XXX_RESET_DELAY_MS=5000 # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set # CONFIG_AIC7XXX_DEBUG_ENABLE is not set CONFIG_AIC7XXX_DEBUG_MASK=0 # CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set # CONFIG_SCSI_AIC79XX is not set CONFIG_SCSI_AIC94XX=y CONFIG_AIC94XX_DEBUG=y # CONFIG_SCSI_MVSAS is not set CONFIG_SCSI_MVUMI=y # CONFIG_SCSI_DPT_I2O is not set CONFIG_SCSI_ADVANSYS=y CONFIG_SCSI_ARCMSR=y CONFIG_SCSI_ESAS2R=y CONFIG_MEGARAID_NEWGEN=y CONFIG_MEGARAID_MM=y CONFIG_MEGARAID_MAILBOX=y CONFIG_MEGARAID_LEGACY=y CONFIG_MEGARAID_SAS=y CONFIG_SCSI_MPT3SAS=y CONFIG_SCSI_MPT2SAS_MAX_SGE=128 CONFIG_SCSI_MPT3SAS_MAX_SGE=128 CONFIG_SCSI_MPT2SAS=y # CONFIG_SCSI_SMARTPQI is not set # CONFIG_SCSI_UFSHCD is not set CONFIG_SCSI_HPTIOP=y # CONFIG_SCSI_BUSLOGIC is not set CONFIG_VMWARE_PVSCSI=y CONFIG_LIBFC=y CONFIG_LIBFCOE=y CONFIG_FCOE=y CONFIG_FCOE_FNIC=y CONFIG_SCSI_SNIC=y # CONFIG_SCSI_SNIC_DEBUG_FS is not set CONFIG_SCSI_DMX3191D=y CONFIG_SCSI_GDTH=y # CONFIG_SCSI_ISCI is not set CONFIG_SCSI_GENERIC_NCR5380=y # CONFIG_SCSI_IPS is not set CONFIG_SCSI_INITIO=y CONFIG_SCSI_INIA100=y CONFIG_SCSI_STEX=y CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 # CONFIG_SCSI_SYM53C8XX_MMIO is not set CONFIG_SCSI_QLOGIC_FAS=y # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set CONFIG_SCSI_QLA_ISCSI=y # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_SIM710 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_AM53C974 is not set CONFIG_SCSI_NSP32=y CONFIG_SCSI_WD719X=y CONFIG_SCSI_DEBUG=y CONFIG_SCSI_PMCRAID=y # CONFIG_SCSI_PM8001 is not set # CONFIG_SCSI_BFA_FC is not set CONFIG_SCSI_VIRTIO=y CONFIG_SCSI_CHELSIO_FCOE=y # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set # CONFIG_SCSI_DH is not set CONFIG_SCSI_OSD_INITIATOR=y # CONFIG_SCSI_OSD_ULD is not set CONFIG_SCSI_OSD_DPRINT_SENSE=1 # CONFIG_SCSI_OSD_DEBUG is not set # CONFIG_ATA is not set CONFIG_MD=y CONFIG_BLK_DEV_MD=y CONFIG_MD_AUTODETECT=y CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=y CONFIG_MD_RAID456=y CONFIG_MD_MULTIPATH=y # CONFIG_MD_FAULTY is not set CONFIG_BCACHE=y CONFIG_BCACHE_DEBUG=y # CONFIG_BCACHE_CLOSURES_DEBUG is not set CONFIG_BLK_DEV_DM_BUILTIN=y CONFIG_BLK_DEV_DM=y # CONFIG_DM_MQ_DEFAULT is not set CONFIG_DM_DEBUG=y CONFIG_DM_BUFIO=y CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING=y CONFIG_DM_DEBUG_BLOCK_STACK_TRACING=y CONFIG_DM_BIO_PRISON=y CONFIG_DM_PERSISTENT_DATA=y CONFIG_DM_UNSTRIPED=y # CONFIG_DM_CRYPT is not set # CONFIG_DM_SNAPSHOT is not set CONFIG_DM_THIN_PROVISIONING=y CONFIG_DM_CACHE=y CONFIG_DM_CACHE_SMQ=y CONFIG_DM_ERA=y # CONFIG_DM_MIRROR is not set CONFIG_DM_RAID=y # CONFIG_DM_ZERO is not set CONFIG_DM_MULTIPATH=y # CONFIG_DM_MULTIPATH_QL is not set # CONFIG_DM_MULTIPATH_ST is not set # CONFIG_DM_DELAY is not set # CONFIG_DM_UEVENT is not set CONFIG_DM_FLAKEY=y CONFIG_DM_VERITY=y # CONFIG_DM_VERITY_FEC is not set # CONFIG_DM_SWITCH is not set CONFIG_DM_LOG_WRITES=y CONFIG_DM_INTEGRITY=y CONFIG_TARGET_CORE=y # CONFIG_TCM_IBLOCK is not set CONFIG_TCM_FILEIO=y CONFIG_TCM_PSCSI=y # CONFIG_TCM_USER2 is not set # CONFIG_LOOPBACK_TARGET is not set CONFIG_TCM_FC=y CONFIG_ISCSI_TARGET=y CONFIG_ISCSI_TARGET_CXGB4=y # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y CONFIG_MII=y CONFIG_NET_CORE=y # CONFIG_BONDING is not set CONFIG_DUMMY=y CONFIG_EQUALIZER=y CONFIG_NET_FC=y # CONFIG_IFB is not set CONFIG_NET_TEAM=y CONFIG_NET_TEAM_MODE_BROADCAST=y # CONFIG_NET_TEAM_MODE_ROUNDROBIN is not set CONFIG_NET_TEAM_MODE_RANDOM=y CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=y # CONFIG_NET_TEAM_MODE_LOADBALANCE is not set # CONFIG_MACVLAN is not set # CONFIG_VXLAN is not set CONFIG_GENEVE=y CONFIG_GTP=y CONFIG_MACSEC=y # CONFIG_NETCONSOLE is not set CONFIG_TUN=y # CONFIG_TUN_VNET_CROSS_LE is not set CONFIG_VETH=y CONFIG_VIRTIO_NET=y CONFIG_NLMON=y CONFIG_ARCNET=y # CONFIG_ARCNET_1201 is not set CONFIG_ARCNET_1051=y CONFIG_ARCNET_RAW=y # CONFIG_ARCNET_CAP is not set # CONFIG_ARCNET_COM90xx is not set # CONFIG_ARCNET_COM90xxIO is not set CONFIG_ARCNET_RIM_I=y CONFIG_ARCNET_COM20020=y CONFIG_ARCNET_COM20020_ISA=y CONFIG_ARCNET_COM20020_PCI=y CONFIG_ARCNET_COM20020_CS=y # # CAIF transport drivers # # # Distributed Switch Architecture drivers # CONFIG_B53=y CONFIG_B53_MDIO_DRIVER=y CONFIG_B53_MMAP_DRIVER=y CONFIG_B53_SRAB_DRIVER=y CONFIG_NET_DSA_BCM_SF2=y CONFIG_NET_DSA_LOOP=y CONFIG_NET_DSA_MT7530=y CONFIG_NET_DSA_MV88E6060=y # CONFIG_MICROCHIP_KSZ is not set # CONFIG_NET_DSA_MV88E6XXX is not set CONFIG_NET_DSA_QCA8K=y CONFIG_NET_DSA_SMSC_LAN9303=y # CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set CONFIG_NET_DSA_SMSC_LAN9303_MDIO=y CONFIG_ETHERNET=y CONFIG_MDIO=y CONFIG_NET_VENDOR_3COM=y # CONFIG_EL3 is not set CONFIG_3C515=y CONFIG_PCMCIA_3C574=y CONFIG_PCMCIA_3C589=y CONFIG_VORTEX=y # CONFIG_TYPHOON is not set # CONFIG_NET_VENDOR_ADAPTEC is not set CONFIG_NET_VENDOR_AGERE=y CONFIG_ET131X=y CONFIG_NET_VENDOR_ALACRITECH=y CONFIG_SLICOSS=y CONFIG_NET_VENDOR_ALTEON=y CONFIG_ACENIC=y CONFIG_ACENIC_OMIT_TIGON_I=y CONFIG_ALTERA_TSE=y CONFIG_NET_VENDOR_AMAZON=y CONFIG_NET_VENDOR_AMD=y CONFIG_AMD8111_ETH=y # CONFIG_LANCE is not set # CONFIG_PCNET32 is not set CONFIG_PCMCIA_NMCLAN=y CONFIG_NI65=y CONFIG_AMD_XGBE=y CONFIG_AMD_XGBE_HAVE_ECC=y CONFIG_NET_VENDOR_AQUANTIA=y CONFIG_NET_VENDOR_ARC=y CONFIG_NET_VENDOR_ATHEROS=y CONFIG_ATL2=y CONFIG_ATL1=y CONFIG_ATL1E=y CONFIG_ATL1C=y CONFIG_ALX=y CONFIG_NET_VENDOR_AURORA=y CONFIG_AURORA_NB8800=y # CONFIG_NET_CADENCE is not set CONFIG_NET_VENDOR_BROADCOM=y CONFIG_B44=y CONFIG_B44_PCI_AUTOSELECT=y CONFIG_B44_PCICORE_AUTOSELECT=y CONFIG_B44_PCI=y CONFIG_BCMGENET=y CONFIG_BNX2=y CONFIG_CNIC=y CONFIG_TIGON3=y CONFIG_TIGON3_HWMON=y CONFIG_BNX2X=y # CONFIG_BNX2X_SRIOV is not set # CONFIG_SYSTEMPORT is not set # CONFIG_BNXT is not set CONFIG_NET_VENDOR_BROCADE=y CONFIG_BNA=y CONFIG_NET_VENDOR_CAVIUM=y CONFIG_NET_VENDOR_CHELSIO=y # CONFIG_CHELSIO_T1 is not set CONFIG_CHELSIO_T3=y CONFIG_CHELSIO_T4=y CONFIG_CHELSIO_T4VF=y CONFIG_CHELSIO_LIB=y # CONFIG_NET_VENDOR_CIRRUS is not set CONFIG_NET_VENDOR_CISCO=y # CONFIG_ENIC is not set # CONFIG_NET_VENDOR_CORTINA is not set CONFIG_CX_ECAT=y # CONFIG_DNET is not set CONFIG_NET_VENDOR_DEC=y # CONFIG_NET_TULIP is not set # CONFIG_NET_VENDOR_DLINK is not set CONFIG_NET_VENDOR_EMULEX=y CONFIG_BE2NET=y CONFIG_BE2NET_HWMON=y # CONFIG_NET_VENDOR_EZCHIP is not set CONFIG_NET_VENDOR_EXAR=y CONFIG_S2IO=y # CONFIG_VXGE is not set CONFIG_NET_VENDOR_FUJITSU=y # CONFIG_PCMCIA_FMVJ18X is not set CONFIG_NET_VENDOR_HP=y CONFIG_HP100=y # CONFIG_NET_VENDOR_HUAWEI is not set CONFIG_NET_VENDOR_INTEL=y # CONFIG_E100 is not set CONFIG_E1000=y CONFIG_E1000E=y CONFIG_E1000E_HWTS=y CONFIG_IGB=y CONFIG_IGB_HWMON=y # CONFIG_IGBVF is not set # CONFIG_IXGB is not set CONFIG_IXGBE=y CONFIG_IXGBE_HWMON=y # CONFIG_I40E is not set CONFIG_NET_VENDOR_I825XX=y CONFIG_JME=y CONFIG_NET_VENDOR_MARVELL=y CONFIG_MVMDIO=y CONFIG_SKGE=y CONFIG_SKGE_DEBUG=y # CONFIG_SKGE_GENESIS is not set CONFIG_SKY2=y CONFIG_SKY2_DEBUG=y CONFIG_NET_VENDOR_MELLANOX=y CONFIG_MLX4_EN=y CONFIG_MLX4_CORE=y CONFIG_MLX4_DEBUG=y CONFIG_MLX4_CORE_GEN2=y # CONFIG_MLX5_CORE is not set CONFIG_MLXSW_CORE=y CONFIG_MLXSW_CORE_HWMON=y CONFIG_MLXSW_CORE_THERMAL=y # CONFIG_MLXSW_PCI is not set # CONFIG_MLXSW_I2C is not set CONFIG_MLXFW=y # CONFIG_NET_VENDOR_MICREL is not set CONFIG_NET_VENDOR_MYRI=y # CONFIG_MYRI10GE is not set CONFIG_FEALNX=y # CONFIG_NET_VENDOR_NATSEMI is not set CONFIG_NET_VENDOR_NETRONOME=y CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_NVIDIA=y # CONFIG_FORCEDETH is not set CONFIG_NET_VENDOR_OKI=y CONFIG_PCH_GBE=y CONFIG_ETHOC=y CONFIG_NET_PACKET_ENGINE=y CONFIG_HAMACHI=y # CONFIG_YELLOWFIN is not set CONFIG_NET_VENDOR_QLOGIC=y CONFIG_QLA3XXX=y CONFIG_QLCNIC=y # CONFIG_QLCNIC_SRIOV is not set # CONFIG_QLCNIC_HWMON is not set CONFIG_QLGE=y CONFIG_NETXEN_NIC=y # CONFIG_QED is not set # CONFIG_NET_VENDOR_QUALCOMM is not set # CONFIG_NET_VENDOR_REALTEK is not set CONFIG_NET_VENDOR_RENESAS=y CONFIG_NET_VENDOR_RDC=y # CONFIG_R6040 is not set # CONFIG_NET_VENDOR_ROCKER is not set # CONFIG_NET_VENDOR_SAMSUNG is not set CONFIG_NET_VENDOR_SEEQ=y # CONFIG_NET_VENDOR_SILAN is not set CONFIG_NET_VENDOR_SIS=y CONFIG_SIS900=y # CONFIG_SIS190 is not set CONFIG_NET_VENDOR_SOLARFLARE=y CONFIG_SFC=y CONFIG_SFC_MTD=y # CONFIG_SFC_MCDI_MON is not set CONFIG_SFC_SRIOV=y # CONFIG_SFC_MCDI_LOGGING is not set CONFIG_SFC_FALCON=y # CONFIG_SFC_FALCON_MTD is not set CONFIG_NET_VENDOR_SMSC=y # CONFIG_SMC9194 is not set CONFIG_PCMCIA_SMC91C92=y # CONFIG_EPIC100 is not set CONFIG_SMSC911X=y CONFIG_SMSC9420=y CONFIG_NET_VENDOR_SOCIONEXT=y # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_SUN is not set CONFIG_NET_VENDOR_TEHUTI=y CONFIG_TEHUTI=y # CONFIG_NET_VENDOR_TI is not set CONFIG_NET_VENDOR_VIA=y # CONFIG_VIA_RHINE is not set # CONFIG_VIA_VELOCITY is not set CONFIG_NET_VENDOR_WIZNET=y CONFIG_WIZNET_W5100=y CONFIG_WIZNET_W5300=y # CONFIG_WIZNET_BUS_DIRECT is not set # CONFIG_WIZNET_BUS_INDIRECT is not set CONFIG_WIZNET_BUS_ANY=y CONFIG_NET_VENDOR_XIRCOM=y CONFIG_PCMCIA_XIRC2PS=y CONFIG_NET_VENDOR_SYNOPSYS=y CONFIG_DWC_XLGMAC=y CONFIG_DWC_XLGMAC_PCI=y CONFIG_FDDI=y CONFIG_DEFXX=y # CONFIG_DEFXX_MMIO is not set CONFIG_SKFP=y CONFIG_HIPPI=y CONFIG_ROADRUNNER=y CONFIG_ROADRUNNER_LARGE_RINGS=y # CONFIG_NET_SB1000 is not set CONFIG_MDIO_DEVICE=y CONFIG_MDIO_BUS=y CONFIG_MDIO_BCM_UNIMAC=y CONFIG_MDIO_BITBANG=y CONFIG_MDIO_BUS_MUX=y CONFIG_MDIO_BUS_MUX_GPIO=y # CONFIG_MDIO_BUS_MUX_MMIOREG is not set CONFIG_MDIO_GPIO=y CONFIG_MDIO_HISI_FEMAC=y CONFIG_PHYLIB=y CONFIG_SWPHY=y CONFIG_LED_TRIGGER_PHY=y # # MII PHY device drivers # CONFIG_AMD_PHY=y CONFIG_AQUANTIA_PHY=y CONFIG_AT803X_PHY=y CONFIG_BCM7XXX_PHY=y CONFIG_BCM87XX_PHY=y CONFIG_BCM_NET_PHYLIB=y CONFIG_BROADCOM_PHY=y CONFIG_CICADA_PHY=y # CONFIG_CORTINA_PHY is not set CONFIG_DAVICOM_PHY=y CONFIG_DP83822_PHY=y CONFIG_DP83848_PHY=y # CONFIG_DP83867_PHY is not set CONFIG_FIXED_PHY=y CONFIG_ICPLUS_PHY=y CONFIG_INTEL_XWAY_PHY=y CONFIG_LSI_ET1011C_PHY=y CONFIG_LXT_PHY=y CONFIG_MARVELL_PHY=y CONFIG_MARVELL_10G_PHY=y # CONFIG_MICREL_PHY is not set CONFIG_MICROCHIP_PHY=y CONFIG_MICROSEMI_PHY=y CONFIG_NATIONAL_PHY=y # CONFIG_QSEMI_PHY is not set CONFIG_REALTEK_PHY=y CONFIG_RENESAS_PHY=y # CONFIG_ROCKCHIP_PHY is not set CONFIG_SMSC_PHY=y CONFIG_STE10XP=y # CONFIG_TERANETICS_PHY is not set # CONFIG_VITESSE_PHY is not set CONFIG_XILINX_GMII2RGMII=y # CONFIG_PLIP is not set CONFIG_PPP=y CONFIG_PPP_BSDCOMP=y CONFIG_PPP_DEFLATE=y CONFIG_PPP_FILTER=y # CONFIG_PPP_MPPE is not set CONFIG_PPP_MULTILINK=y # CONFIG_PPPOE is not set # CONFIG_PPP_ASYNC is not set # CONFIG_PPP_SYNC_TTY is not set # CONFIG_SLIP is not set CONFIG_SLHC=y CONFIG_USB_NET_DRIVERS=y CONFIG_USB_CATC=y CONFIG_USB_KAWETH=y CONFIG_USB_PEGASUS=y CONFIG_USB_RTL8150=y # CONFIG_USB_RTL8152 is not set CONFIG_USB_LAN78XX=y CONFIG_USB_USBNET=y # CONFIG_USB_NET_AX8817X is not set CONFIG_USB_NET_AX88179_178A=y CONFIG_USB_NET_CDCETHER=y # CONFIG_USB_NET_CDC_EEM is not set CONFIG_USB_NET_CDC_NCM=y CONFIG_USB_NET_HUAWEI_CDC_NCM=y CONFIG_USB_NET_CDC_MBIM=y CONFIG_USB_NET_DM9601=y CONFIG_USB_NET_SR9700=y CONFIG_USB_NET_SR9800=y # CONFIG_USB_NET_SMSC75XX is not set CONFIG_USB_NET_SMSC95XX=y CONFIG_USB_NET_GL620A=y # CONFIG_USB_NET_NET1080 is not set CONFIG_USB_NET_PLUSB=y # CONFIG_USB_NET_MCS7830 is not set CONFIG_USB_NET_RNDIS_HOST=y CONFIG_USB_NET_CDC_SUBSET_ENABLE=y CONFIG_USB_NET_CDC_SUBSET=y CONFIG_USB_ALI_M5632=y # CONFIG_USB_AN2720 is not set CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y # CONFIG_USB_EPSON2888 is not set CONFIG_USB_KC2190=y CONFIG_USB_NET_ZAURUS=y CONFIG_USB_NET_CX82310_ETH=y CONFIG_USB_NET_KALMIA=y CONFIG_USB_NET_QMI_WWAN=y # CONFIG_USB_HSO is not set # CONFIG_USB_NET_INT51X1 is not set CONFIG_USB_CDC_PHONET=y # CONFIG_USB_IPHETH is not set # CONFIG_USB_SIERRA_NET is not set # CONFIG_USB_VL600 is not set # CONFIG_USB_NET_CH9200 is not set CONFIG_WLAN=y # CONFIG_WIRELESS_WDS is not set # CONFIG_WLAN_VENDOR_ADMTEK is not set # CONFIG_WLAN_VENDOR_ATH is not set # CONFIG_WLAN_VENDOR_ATMEL is not set CONFIG_WLAN_VENDOR_BROADCOM=y # CONFIG_B43 is not set CONFIG_B43LEGACY=y CONFIG_B43LEGACY_PCI_AUTOSELECT=y CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y CONFIG_B43LEGACY_LEDS=y CONFIG_B43LEGACY_HWRNG=y CONFIG_B43LEGACY_DEBUG=y CONFIG_B43LEGACY_DMA=y # CONFIG_B43LEGACY_DMA_AND_PIO_MODE is not set CONFIG_B43LEGACY_DMA_MODE=y # CONFIG_B43LEGACY_PIO_MODE is not set CONFIG_BRCMUTIL=y # CONFIG_BRCMSMAC is not set CONFIG_BRCMFMAC=y # CONFIG_BRCMFMAC_SDIO is not set # CONFIG_BRCMFMAC_USB is not set # CONFIG_BRCMFMAC_PCIE is not set # CONFIG_BRCM_TRACING is not set CONFIG_BRCMDBG=y # CONFIG_WLAN_VENDOR_CISCO is not set # CONFIG_WLAN_VENDOR_INTEL is not set CONFIG_WLAN_VENDOR_INTERSIL=y # CONFIG_HOSTAP is not set # CONFIG_HERMES is not set CONFIG_P54_COMMON=y CONFIG_P54_USB=y CONFIG_P54_PCI=y CONFIG_P54_LEDS=y CONFIG_PRISM54=y # CONFIG_WLAN_VENDOR_MARVELL is not set # CONFIG_WLAN_VENDOR_MEDIATEK is not set CONFIG_WLAN_VENDOR_RALINK=y CONFIG_RT2X00=y # CONFIG_RT2400PCI is not set CONFIG_RT2500PCI=y CONFIG_RT61PCI=y CONFIG_RT2800PCI=y # CONFIG_RT2800PCI_RT33XX is not set # CONFIG_RT2800PCI_RT35XX is not set CONFIG_RT2800PCI_RT53XX=y # CONFIG_RT2800PCI_RT3290 is not set CONFIG_RT2500USB=y # CONFIG_RT73USB is not set CONFIG_RT2800USB=y CONFIG_RT2800USB_RT33XX=y CONFIG_RT2800USB_RT35XX=y CONFIG_RT2800USB_RT3573=y CONFIG_RT2800USB_RT53XX=y # CONFIG_RT2800USB_RT55XX is not set # CONFIG_RT2800USB_UNKNOWN is not set CONFIG_RT2800_LIB=y CONFIG_RT2800_LIB_MMIO=y CONFIG_RT2X00_LIB_MMIO=y CONFIG_RT2X00_LIB_PCI=y CONFIG_RT2X00_LIB_USB=y CONFIG_RT2X00_LIB=y CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_LEDS=y CONFIG_RT2X00_DEBUG=y # CONFIG_WLAN_VENDOR_REALTEK is not set # CONFIG_WLAN_VENDOR_RSI is not set CONFIG_WLAN_VENDOR_ST=y CONFIG_CW1200=y CONFIG_CW1200_WLAN_SDIO=y CONFIG_WLAN_VENDOR_TI=y CONFIG_WL1251=y CONFIG_WL1251_SDIO=y # CONFIG_WL12XX is not set # CONFIG_WL18XX is not set CONFIG_WLCORE=y # CONFIG_WLCORE_SDIO is not set # CONFIG_WILINK_PLATFORM_DATA is not set CONFIG_WLAN_VENDOR_ZYDAS=y CONFIG_USB_ZD1201=y # CONFIG_ZD1211RW is not set CONFIG_WLAN_VENDOR_QUANTENNA=y CONFIG_QTNFMAC=y CONFIG_QTNFMAC_PEARL_PCIE=y CONFIG_PCMCIA_RAYCS=y CONFIG_PCMCIA_WL3501=y CONFIG_MAC80211_HWSIM=y CONFIG_USB_NET_RNDIS_WLAN=y # # Enable WiMAX (Networking options) to see the WiMAX drivers # CONFIG_WAN=y CONFIG_LANMEDIA=y CONFIG_HDLC=y CONFIG_HDLC_RAW=y CONFIG_HDLC_RAW_ETH=y CONFIG_HDLC_CISCO=y CONFIG_HDLC_FR=y # CONFIG_HDLC_PPP is not set # # X.25/LAPB support is disabled # CONFIG_PCI200SYN=y # CONFIG_WANXL is not set CONFIG_PC300TOO=y CONFIG_N2=y # CONFIG_C101 is not set # CONFIG_FARSYNC is not set CONFIG_DLCI=y CONFIG_DLCI_MAX=8 CONFIG_SDLA=y # CONFIG_SBNI is not set CONFIG_VMXNET3=y # CONFIG_FUJITSU_ES is not set # CONFIG_THUNDERBOLT_NET is not set CONFIG_NETDEVSIM=y # CONFIG_ISDN is not set # CONFIG_NVM is not set # # Input device support # CONFIG_INPUT=y CONFIG_INPUT_LEDS=y # CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_POLLDEV is not set # CONFIG_INPUT_SPARSEKMAP is not set # CONFIG_INPUT_MATRIXKMAP is not set # # Userland interfaces # # CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_ADP5588 is not set # CONFIG_KEYBOARD_ADP5589 is not set CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_QT1070 is not set # CONFIG_KEYBOARD_QT2160 is not set # CONFIG_KEYBOARD_DLINK_DIR685 is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_GPIO is not set # CONFIG_KEYBOARD_GPIO_POLLED is not set # CONFIG_KEYBOARD_TCA6416 is not set # CONFIG_KEYBOARD_TCA8418 is not set # CONFIG_KEYBOARD_MATRIX is not set # CONFIG_KEYBOARD_LM8323 is not set # CONFIG_KEYBOARD_LM8333 is not set # CONFIG_KEYBOARD_MAX7359 is not set # CONFIG_KEYBOARD_MCS is not set # CONFIG_KEYBOARD_MPR121 is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_OPENCORES is not set # CONFIG_KEYBOARD_SAMSUNG is not set # CONFIG_KEYBOARD_GOLDFISH_EVENTS is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_OMAP4 is not set # CONFIG_KEYBOARD_TC3589X is not set # CONFIG_KEYBOARD_TM2_TOUCHKEY is not set # CONFIG_KEYBOARD_TWL4030 is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_CROS_EC is not set # CONFIG_KEYBOARD_CAP11XX is not set # CONFIG_KEYBOARD_BCM is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_MOUSE_PS2_ALPS=y CONFIG_MOUSE_PS2_BYD=y CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y CONFIG_MOUSE_PS2_CYPRESS=y CONFIG_MOUSE_PS2_LIFEBOOK=y CONFIG_MOUSE_PS2_TRACKPOINT=y # CONFIG_MOUSE_PS2_ELANTECH is not set # CONFIG_MOUSE_PS2_SENTELIC is not set # CONFIG_MOUSE_PS2_TOUCHKIT is not set CONFIG_MOUSE_PS2_FOCALTECH=y # CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2_SMBUS=y # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_APPLETOUCH is not set # CONFIG_MOUSE_BCM5974 is not set # CONFIG_MOUSE_CYAPA is not set # CONFIG_MOUSE_ELAN_I2C is not set # CONFIG_MOUSE_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_MOUSE_GPIO is not set # CONFIG_MOUSE_SYNAPTICS_I2C is not set # CONFIG_MOUSE_SYNAPTICS_USB is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # CONFIG_RMI4_CORE is not set # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y CONFIG_SERIO_CT82C710=y # CONFIG_SERIO_PARKBD is not set CONFIG_SERIO_PCIPS2=y CONFIG_SERIO_LIBPS2=y CONFIG_SERIO_RAW=y CONFIG_SERIO_ALTERA_PS2=y CONFIG_SERIO_PS2MULT=y CONFIG_SERIO_ARC_PS2=y CONFIG_SERIO_APBPS2=y CONFIG_SERIO_GPIO_PS2=y CONFIG_USERIO=y CONFIG_GAMEPORT=y # CONFIG_GAMEPORT_NS558 is not set CONFIG_GAMEPORT_L4=y # CONFIG_GAMEPORT_EMU10K1 is not set CONFIG_GAMEPORT_FM801=y # # Character devices # CONFIG_TTY=y # CONFIG_VT is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set # CONFIG_N_GSM is not set # CONFIG_TRACE_SINK is not set # CONFIG_GOLDFISH_TTY is not set CONFIG_DEVMEM=y CONFIG_DEVKMEM=y # # Serial drivers # CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y CONFIG_SERIAL_8250_PNP=y # CONFIG_SERIAL_8250_FINTEK is not set CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_EXAR=y # CONFIG_SERIAL_8250_CS is not set # CONFIG_SERIAL_8250_MEN_MCB is not set CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # CONFIG_SERIAL_8250_ASPEED_VUART is not set # CONFIG_SERIAL_8250_DW is not set # CONFIG_SERIAL_8250_RT288X is not set CONFIG_SERIAL_8250_LPSS=y CONFIG_SERIAL_8250_MID=y # CONFIG_SERIAL_8250_MOXA is not set # CONFIG_SERIAL_OF_PLATFORM is not set # # Non-8250 serial port support # # CONFIG_SERIAL_UARTLITE is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_SC16IS7XX is not set # CONFIG_SERIAL_TIMBERDALE is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_PCH_UART is not set # CONFIG_SERIAL_XILINX_PS_UART is not set # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_RP2 is not set # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set # CONFIG_SERIAL_MEN_Z135 is not set CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y # CONFIG_TTY_PRINTK is not set # CONFIG_PRINTER is not set CONFIG_PPDEV=y # CONFIG_VIRTIO_CONSOLE is not set # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_TIMERIOMEM is not set CONFIG_HW_RANDOM_INTEL=y # CONFIG_HW_RANDOM_AMD is not set CONFIG_HW_RANDOM_GEODE=y # CONFIG_HW_RANDOM_VIA is not set # CONFIG_HW_RANDOM_VIRTIO is not set # CONFIG_NVRAM is not set CONFIG_DTLK=y # CONFIG_R3964 is not set CONFIG_APPLICOM=y # CONFIG_SONYPI is not set # # PCMCIA character devices # # CONFIG_SYNCLINK_CS is not set # CONFIG_CARDMAN_4000 is not set # CONFIG_CARDMAN_4040 is not set # CONFIG_SCR24X is not set # CONFIG_IPWIRELESS is not set # CONFIG_MWAVE is not set CONFIG_SCx200_GPIO=y # CONFIG_PC8736x_GPIO is not set CONFIG_NSC_GPIO=y CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 # CONFIG_HPET is not set # CONFIG_HANGCHECK_TIMER is not set CONFIG_TCG_TPM=y CONFIG_HW_RANDOM_TPM=y CONFIG_TCG_TIS_CORE=y CONFIG_TCG_TIS=y CONFIG_TCG_TIS_I2C_ATMEL=y CONFIG_TCG_TIS_I2C_INFINEON=y # CONFIG_TCG_TIS_I2C_NUVOTON is not set CONFIG_TCG_NSC=y CONFIG_TCG_ATMEL=y # CONFIG_TCG_INFINEON is not set # CONFIG_TCG_CRB is not set CONFIG_TCG_VTPM_PROXY=y CONFIG_TCG_TIS_ST33ZP24=y CONFIG_TCG_TIS_ST33ZP24_I2C=y CONFIG_TELCLOCK=y # CONFIG_DEVPORT is not set # CONFIG_XILLYBUS is not set # # I2C support # CONFIG_I2C=y CONFIG_ACPI_I2C_OPREGION=y CONFIG_I2C_BOARDINFO=y # CONFIG_I2C_COMPAT is not set # CONFIG_I2C_CHARDEV is not set CONFIG_I2C_MUX=y # # Multiplexer I2C Chip support # CONFIG_I2C_ARB_GPIO_CHALLENGE=y CONFIG_I2C_MUX_GPIO=y # CONFIG_I2C_MUX_GPMUX is not set CONFIG_I2C_MUX_LTC4306=y CONFIG_I2C_MUX_PCA9541=y # CONFIG_I2C_MUX_PCA954x is not set CONFIG_I2C_MUX_PINCTRL=y CONFIG_I2C_MUX_REG=y # CONFIG_I2C_DEMUX_PINCTRL is not set CONFIG_I2C_MUX_MLXCPLD=y # CONFIG_I2C_HELPER_AUTO is not set CONFIG_I2C_SMBUS=y # # I2C Algorithms # CONFIG_I2C_ALGOBIT=y CONFIG_I2C_ALGOPCF=y CONFIG_I2C_ALGOPCA=y # # I2C Hardware Bus support # # # PC SMBus host controller drivers # CONFIG_I2C_ALI1535=y CONFIG_I2C_ALI1563=y CONFIG_I2C_ALI15X3=y CONFIG_I2C_AMD756=y # CONFIG_I2C_AMD756_S4882 is not set # CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_I801 is not set CONFIG_I2C_ISCH=y CONFIG_I2C_ISMT=y CONFIG_I2C_PIIX4=y # CONFIG_I2C_NFORCE2 is not set CONFIG_I2C_SIS5595=y CONFIG_I2C_SIS630=y # CONFIG_I2C_SIS96X is not set CONFIG_I2C_VIA=y CONFIG_I2C_VIAPRO=y # # ACPI drivers # # CONFIG_I2C_SCMI is not set # # I2C system bus drivers (mostly embedded / system-on-chip) # CONFIG_I2C_CBUS_GPIO=y CONFIG_I2C_DESIGNWARE_CORE=y CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_DESIGNWARE_SLAVE=y CONFIG_I2C_DESIGNWARE_PCI=y # CONFIG_I2C_DESIGNWARE_BAYTRAIL is not set CONFIG_I2C_EG20T=y # CONFIG_I2C_EMEV2 is not set # CONFIG_I2C_GPIO is not set # CONFIG_I2C_KEMPLD is not set CONFIG_I2C_OCORES=y CONFIG_I2C_PCA_PLATFORM=y CONFIG_I2C_PXA=y CONFIG_I2C_PXA_PCI=y # CONFIG_I2C_RK3X is not set # CONFIG_I2C_SIMTEC is not set CONFIG_I2C_XILINX=y # # External I2C/SMBus adapter drivers # CONFIG_I2C_DIOLAN_U2C=y CONFIG_I2C_PARPORT=y # CONFIG_I2C_PARPORT_LIGHT is not set CONFIG_I2C_ROBOTFUZZ_OSIF=y # CONFIG_I2C_TAOS_EVM is not set # CONFIG_I2C_TINY_USB is not set # CONFIG_I2C_VIPERBOARD is not set # # Other I2C/SMBus bus drivers # CONFIG_I2C_PCA_ISA=y CONFIG_I2C_CROS_EC_TUNNEL=y # CONFIG_SCx200_ACB is not set CONFIG_I2C_SLAVE=y CONFIG_I2C_SLAVE_EEPROM=y # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_SPI is not set # CONFIG_SPMI is not set CONFIG_HSI=y CONFIG_HSI_BOARDINFO=y # # HSI controllers # # # HSI clients # # CONFIG_HSI_CHAR is not set # CONFIG_PPS is not set # # PTP clock support # # CONFIG_PTP_1588_CLOCK is not set CONFIG_PTP_1588_CLOCK_PCH=y CONFIG_PINCTRL=y CONFIG_GENERIC_PINCTRL_GROUPS=y CONFIG_PINMUX=y CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_PINCONF=y CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_PINCTRL_AMD=y CONFIG_PINCTRL_MCP23S08=y CONFIG_PINCTRL_SINGLE=y CONFIG_PINCTRL_SX150X=y CONFIG_PINCTRL_PALMAS=y # CONFIG_PINCTRL_BAYTRAIL is not set # CONFIG_PINCTRL_CHERRYVIEW is not set # CONFIG_PINCTRL_BROXTON is not set # CONFIG_PINCTRL_CANNONLAKE is not set # CONFIG_PINCTRL_CEDARFORK is not set # CONFIG_PINCTRL_DENVERTON is not set # CONFIG_PINCTRL_GEMINILAKE is not set # CONFIG_PINCTRL_LEWISBURG is not set # CONFIG_PINCTRL_SUNRISEPOINT is not set CONFIG_GPIOLIB=y CONFIG_OF_GPIO=y CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_DEBUG_GPIO=y CONFIG_GPIO_SYSFS=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MAX730X=y # # Memory mapped GPIO drivers # CONFIG_GPIO_74XX_MMIO=y CONFIG_GPIO_ALTERA=y # CONFIG_GPIO_AMDPT is not set # CONFIG_GPIO_DWAPB is not set # CONFIG_GPIO_EXAR is not set # CONFIG_GPIO_FTGPIO010 is not set CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_GRGPIO=y CONFIG_GPIO_HLWD=y CONFIG_GPIO_ICH=y # CONFIG_GPIO_LYNXPOINT is not set CONFIG_GPIO_MB86S7X=y CONFIG_GPIO_MENZ127=y CONFIG_GPIO_MOCKUP=y CONFIG_GPIO_SYSCON=y CONFIG_GPIO_VX855=y CONFIG_GPIO_XILINX=y # # Port-mapped I/O GPIO drivers # CONFIG_GPIO_F7188X=y # CONFIG_GPIO_IT87 is not set CONFIG_GPIO_SCH=y # CONFIG_GPIO_SCH311X is not set CONFIG_GPIO_WINBOND=y CONFIG_GPIO_WS16C48=y # # I2C GPIO expanders # # CONFIG_GPIO_ADP5588 is not set # CONFIG_GPIO_ADNP is not set CONFIG_GPIO_MAX7300=y # CONFIG_GPIO_MAX732X is not set CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_TPIC2810 is not set # # MFD GPIO expanders # # CONFIG_GPIO_ARIZONA is not set CONFIG_GPIO_DA9052=y # CONFIG_GPIO_JANZ_TTL is not set CONFIG_GPIO_KEMPLD=y # CONFIG_GPIO_LP3943 is not set # CONFIG_GPIO_LP87565 is not set CONFIG_GPIO_PALMAS=y CONFIG_GPIO_RC5T583=y # CONFIG_GPIO_TC3589X is not set CONFIG_GPIO_TIMBERDALE=y CONFIG_GPIO_TPS65086=y CONFIG_GPIO_TPS65218=y CONFIG_GPIO_TPS6586X=y # CONFIG_GPIO_TPS65910 is not set # CONFIG_GPIO_TWL4030 is not set # CONFIG_GPIO_WM8994 is not set # # PCI GPIO expanders # # CONFIG_GPIO_AMD8111 is not set CONFIG_GPIO_BT8XX=y CONFIG_GPIO_ML_IOH=y CONFIG_GPIO_PCH=y CONFIG_GPIO_PCI_IDIO_16=y CONFIG_GPIO_PCIE_IDIO_24=y CONFIG_GPIO_RDC321X=y # CONFIG_GPIO_SODAVILLE is not set # # USB GPIO expanders # CONFIG_GPIO_VIPERBOARD=y CONFIG_W1=y CONFIG_W1_CON=y # # 1-wire Bus Masters # # CONFIG_W1_MASTER_MATROX is not set CONFIG_W1_MASTER_DS2490=y # CONFIG_W1_MASTER_DS2482 is not set # CONFIG_W1_MASTER_DS1WM is not set # CONFIG_W1_MASTER_GPIO is not set # # 1-wire Slaves # # CONFIG_W1_SLAVE_THERM is not set # CONFIG_W1_SLAVE_SMEM is not set # CONFIG_W1_SLAVE_DS2405 is not set CONFIG_W1_SLAVE_DS2408=y # CONFIG_W1_SLAVE_DS2408_READBACK is not set CONFIG_W1_SLAVE_DS2413=y CONFIG_W1_SLAVE_DS2406=y CONFIG_W1_SLAVE_DS2423=y CONFIG_W1_SLAVE_DS2805=y CONFIG_W1_SLAVE_DS2431=y # CONFIG_W1_SLAVE_DS2433 is not set CONFIG_W1_SLAVE_DS2438=y CONFIG_W1_SLAVE_DS2760=y # CONFIG_W1_SLAVE_DS2780 is not set CONFIG_W1_SLAVE_DS2781=y # CONFIG_W1_SLAVE_DS28E04 is not set CONFIG_W1_SLAVE_DS28E17=y # CONFIG_POWER_AVS is not set CONFIG_POWER_RESET=y # CONFIG_POWER_RESET_GPIO is not set CONFIG_POWER_RESET_GPIO_RESTART=y CONFIG_POWER_RESET_LTC2952=y CONFIG_POWER_RESET_RESTART=y CONFIG_POWER_RESET_SYSCON=y # CONFIG_POWER_RESET_SYSCON_POWEROFF is not set CONFIG_REBOOT_MODE=y CONFIG_SYSCON_REBOOT_MODE=y CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set CONFIG_PDA_POWER=y # CONFIG_MAX8925_POWER is not set # CONFIG_TEST_POWER is not set # CONFIG_BATTERY_88PM860X is not set CONFIG_BATTERY_ACT8945A=y # CONFIG_BATTERY_DS2760 is not set # CONFIG_BATTERY_DS2780 is not set CONFIG_BATTERY_DS2781=y CONFIG_BATTERY_DS2782=y CONFIG_BATTERY_SBS=y CONFIG_CHARGER_SBS=y CONFIG_MANAGER_SBS=y CONFIG_BATTERY_BQ27XXX=y CONFIG_BATTERY_BQ27XXX_I2C=y CONFIG_BATTERY_BQ27XXX_HDQ=y # CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set # CONFIG_BATTERY_DA9052 is not set # CONFIG_BATTERY_MAX17040 is not set CONFIG_BATTERY_MAX17042=y CONFIG_BATTERY_MAX1721X=y # CONFIG_CHARGER_PCF50633 is not set # CONFIG_CHARGER_ISP1704 is not set # CONFIG_CHARGER_MAX8903 is not set # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set CONFIG_CHARGER_LTC3651=y # CONFIG_CHARGER_MAX14577 is not set # CONFIG_CHARGER_DETECTOR_MAX14656 is not set CONFIG_CHARGER_MAX77693=y CONFIG_CHARGER_BQ2415X=y # CONFIG_CHARGER_BQ24190 is not set CONFIG_CHARGER_BQ24257=y CONFIG_CHARGER_BQ24735=y CONFIG_CHARGER_BQ25890=y CONFIG_CHARGER_SMB347=y # CONFIG_CHARGER_TPS65217 is not set CONFIG_BATTERY_GAUGE_LTC2941=y CONFIG_BATTERY_GOLDFISH=y CONFIG_BATTERY_RT5033=y CONFIG_CHARGER_RT9455=y CONFIG_HWMON=y CONFIG_HWMON_VID=y # CONFIG_HWMON_DEBUG_CHIP is not set # # Native drivers # # CONFIG_SENSORS_ABITUGURU is not set CONFIG_SENSORS_ABITUGURU3=y CONFIG_SENSORS_AD7414=y CONFIG_SENSORS_AD7418=y # CONFIG_SENSORS_ADM1021 is not set CONFIG_SENSORS_ADM1025=y # CONFIG_SENSORS_ADM1026 is not set CONFIG_SENSORS_ADM1029=y # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ADM9240 is not set # CONFIG_SENSORS_ADT7410 is not set # CONFIG_SENSORS_ADT7411 is not set CONFIG_SENSORS_ADT7462=y CONFIG_SENSORS_ADT7470=y # CONFIG_SENSORS_ADT7475 is not set CONFIG_SENSORS_ASC7621=y # CONFIG_SENSORS_K8TEMP is not set CONFIG_SENSORS_K10TEMP=y CONFIG_SENSORS_FAM15H_POWER=y # CONFIG_SENSORS_APPLESMC is not set CONFIG_SENSORS_ASB100=y CONFIG_SENSORS_ASPEED=y # CONFIG_SENSORS_ATXP1 is not set CONFIG_SENSORS_DS620=y CONFIG_SENSORS_DS1621=y CONFIG_SENSORS_DELL_SMM=y # CONFIG_SENSORS_DA9052_ADC is not set # CONFIG_SENSORS_I5K_AMB is not set CONFIG_SENSORS_F71805F=y CONFIG_SENSORS_F71882FG=y # CONFIG_SENSORS_F75375S is not set CONFIG_SENSORS_FSCHMD=y CONFIG_SENSORS_GL518SM=y CONFIG_SENSORS_GL520SM=y CONFIG_SENSORS_G760A=y CONFIG_SENSORS_G762=y CONFIG_SENSORS_GPIO_FAN=y # CONFIG_SENSORS_HIH6130 is not set # CONFIG_SENSORS_I5500 is not set CONFIG_SENSORS_CORETEMP=y CONFIG_SENSORS_IT87=y CONFIG_SENSORS_JC42=y CONFIG_SENSORS_POWR1220=y CONFIG_SENSORS_LINEAGE=y CONFIG_SENSORS_LTC2945=y CONFIG_SENSORS_LTC2990=y CONFIG_SENSORS_LTC4151=y CONFIG_SENSORS_LTC4215=y # CONFIG_SENSORS_LTC4222 is not set # CONFIG_SENSORS_LTC4245 is not set CONFIG_SENSORS_LTC4260=y CONFIG_SENSORS_LTC4261=y CONFIG_SENSORS_MAX16065=y # CONFIG_SENSORS_MAX1619 is not set CONFIG_SENSORS_MAX1668=y # CONFIG_SENSORS_MAX197 is not set CONFIG_SENSORS_MAX6621=y CONFIG_SENSORS_MAX6639=y # CONFIG_SENSORS_MAX6642 is not set CONFIG_SENSORS_MAX6650=y CONFIG_SENSORS_MAX6697=y CONFIG_SENSORS_MAX31790=y # CONFIG_SENSORS_MCP3021 is not set # CONFIG_SENSORS_TC654 is not set CONFIG_SENSORS_MENF21BMC_HWMON=y # CONFIG_SENSORS_LM63 is not set CONFIG_SENSORS_LM73=y CONFIG_SENSORS_LM75=y CONFIG_SENSORS_LM77=y # CONFIG_SENSORS_LM78 is not set CONFIG_SENSORS_LM80=y CONFIG_SENSORS_LM83=y # CONFIG_SENSORS_LM85 is not set # CONFIG_SENSORS_LM87 is not set CONFIG_SENSORS_LM90=y CONFIG_SENSORS_LM92=y # CONFIG_SENSORS_LM93 is not set # CONFIG_SENSORS_LM95234 is not set CONFIG_SENSORS_LM95241=y CONFIG_SENSORS_LM95245=y CONFIG_SENSORS_PC87360=y CONFIG_SENSORS_PC87427=y # CONFIG_SENSORS_NTC_THERMISTOR is not set CONFIG_SENSORS_NCT6683=y CONFIG_SENSORS_NCT6775=y CONFIG_SENSORS_NCT7802=y CONFIG_SENSORS_NCT7904=y # CONFIG_SENSORS_PCF8591 is not set CONFIG_PMBUS=y # CONFIG_SENSORS_PMBUS is not set # CONFIG_SENSORS_ADM1275 is not set # CONFIG_SENSORS_IBM_CFFPS is not set # CONFIG_SENSORS_IR35221 is not set CONFIG_SENSORS_LM25066=y CONFIG_SENSORS_LTC2978=y # CONFIG_SENSORS_LTC3815 is not set CONFIG_SENSORS_MAX16064=y # CONFIG_SENSORS_MAX20751 is not set CONFIG_SENSORS_MAX31785=y CONFIG_SENSORS_MAX34440=y # CONFIG_SENSORS_MAX8688 is not set CONFIG_SENSORS_TPS40422=y CONFIG_SENSORS_TPS53679=y # CONFIG_SENSORS_UCD9000 is not set # CONFIG_SENSORS_UCD9200 is not set CONFIG_SENSORS_ZL6100=y # CONFIG_SENSORS_PWM_FAN is not set # CONFIG_SENSORS_SHT15 is not set CONFIG_SENSORS_SHT21=y # CONFIG_SENSORS_SHT3x is not set # CONFIG_SENSORS_SHTC1 is not set CONFIG_SENSORS_SIS5595=y CONFIG_SENSORS_DME1737=y # CONFIG_SENSORS_EMC1403 is not set # CONFIG_SENSORS_EMC2103 is not set CONFIG_SENSORS_EMC6W201=y CONFIG_SENSORS_SMSC47M1=y CONFIG_SENSORS_SMSC47M192=y # CONFIG_SENSORS_SMSC47B397 is not set CONFIG_SENSORS_STTS751=y # CONFIG_SENSORS_SMM665 is not set CONFIG_SENSORS_ADC128D818=y # CONFIG_SENSORS_ADS1015 is not set CONFIG_SENSORS_ADS7828=y CONFIG_SENSORS_AMC6821=y # CONFIG_SENSORS_INA209 is not set # CONFIG_SENSORS_INA2XX is not set CONFIG_SENSORS_INA3221=y CONFIG_SENSORS_TC74=y CONFIG_SENSORS_THMC50=y # CONFIG_SENSORS_TMP102 is not set # CONFIG_SENSORS_TMP103 is not set # CONFIG_SENSORS_TMP108 is not set CONFIG_SENSORS_TMP401=y CONFIG_SENSORS_TMP421=y CONFIG_SENSORS_VIA_CPUTEMP=y # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_SENSORS_VT8231 is not set CONFIG_SENSORS_W83773G=y # CONFIG_SENSORS_W83781D is not set CONFIG_SENSORS_W83791D=y CONFIG_SENSORS_W83792D=y # CONFIG_SENSORS_W83793 is not set CONFIG_SENSORS_W83795=y CONFIG_SENSORS_W83795_FANCTRL=y CONFIG_SENSORS_W83L785TS=y CONFIG_SENSORS_W83L786NG=y # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # # ACPI drivers # # CONFIG_SENSORS_ACPI_POWER is not set # CONFIG_SENSORS_ATK0110 is not set CONFIG_THERMAL=y # CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_OF=y # CONFIG_THERMAL_WRITABLE_TRIPS is not set CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set # CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set # CONFIG_THERMAL_GOV_FAIR_SHARE is not set CONFIG_THERMAL_GOV_STEP_WISE=y # CONFIG_THERMAL_GOV_BANG_BANG is not set # CONFIG_THERMAL_GOV_USER_SPACE is not set # CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set # CONFIG_CPU_THERMAL is not set # CONFIG_CLOCK_THERMAL is not set # CONFIG_DEVFREQ_THERMAL is not set # CONFIG_THERMAL_EMULATION is not set # CONFIG_QORIQ_THERMAL is not set # CONFIG_DA9062_THERMAL is not set # CONFIG_INTEL_POWERCLAMP is not set # CONFIG_INTEL_SOC_DTS_THERMAL is not set # # ACPI INT340X thermal drivers # # CONFIG_INT340X_THERMAL is not set # CONFIG_INTEL_PCH_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y CONFIG_SSB=y CONFIG_SSB_SPROM=y CONFIG_SSB_PCIHOST_POSSIBLE=y CONFIG_SSB_PCIHOST=y CONFIG_SSB_B43_PCI_BRIDGE=y CONFIG_SSB_PCMCIAHOST_POSSIBLE=y CONFIG_SSB_PCMCIAHOST=y CONFIG_SSB_SDIOHOST_POSSIBLE=y # CONFIG_SSB_SDIOHOST is not set # CONFIG_SSB_SILENT is not set CONFIG_SSB_DEBUG=y CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y CONFIG_SSB_DRIVER_PCICORE=y CONFIG_SSB_DRIVER_GPIO=y CONFIG_BCMA_POSSIBLE=y # CONFIG_BCMA is not set # # Multifunction device drivers # CONFIG_MFD_CORE=y # CONFIG_MFD_CS5535 is not set CONFIG_MFD_ACT8945A=y CONFIG_MFD_AS3711=y # CONFIG_MFD_AS3722 is not set # CONFIG_PMIC_ADP5520 is not set CONFIG_MFD_AAT2870_CORE=y # CONFIG_MFD_ATMEL_FLEXCOM is not set CONFIG_MFD_ATMEL_HLCDC=y CONFIG_MFD_BCM590XX=y # CONFIG_MFD_BD9571MWV is not set # CONFIG_MFD_AXP20X_I2C is not set CONFIG_MFD_CROS_EC=y CONFIG_MFD_CROS_EC_I2C=y # CONFIG_MFD_CROS_EC_CHARDEV is not set # CONFIG_PMIC_DA903X is not set CONFIG_PMIC_DA9052=y CONFIG_MFD_DA9052_I2C=y # CONFIG_MFD_DA9055 is not set CONFIG_MFD_DA9062=y # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_DA9150 is not set # CONFIG_MFD_DLN2 is not set # CONFIG_MFD_MC13XXX_I2C is not set # CONFIG_MFD_HI6421_PMIC is not set CONFIG_HTC_PASIC3=y # CONFIG_HTC_I2CPLD is not set CONFIG_MFD_INTEL_QUARK_I2C_GPIO=y CONFIG_LPC_ICH=y CONFIG_LPC_SCH=y # CONFIG_INTEL_SOC_PMIC is not set # CONFIG_INTEL_SOC_PMIC_CHTWC is not set # CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set CONFIG_MFD_INTEL_LPSS=y # CONFIG_MFD_INTEL_LPSS_ACPI is not set CONFIG_MFD_INTEL_LPSS_PCI=y CONFIG_MFD_JANZ_CMODIO=y CONFIG_MFD_KEMPLD=y # CONFIG_MFD_88PM800 is not set CONFIG_MFD_88PM805=y CONFIG_MFD_88PM860X=y CONFIG_MFD_MAX14577=y # CONFIG_MFD_MAX77620 is not set CONFIG_MFD_MAX77686=y CONFIG_MFD_MAX77693=y CONFIG_MFD_MAX77843=y # CONFIG_MFD_MAX8907 is not set CONFIG_MFD_MAX8925=y # CONFIG_MFD_MAX8997 is not set # CONFIG_MFD_MAX8998 is not set CONFIG_MFD_MT6397=y CONFIG_MFD_MENF21BMC=y CONFIG_MFD_VIPERBOARD=y CONFIG_MFD_RETU=y CONFIG_MFD_PCF50633=y CONFIG_PCF50633_ADC=y CONFIG_PCF50633_GPIO=y # CONFIG_UCB1400_CORE is not set CONFIG_MFD_RDC321X=y CONFIG_MFD_RT5033=y CONFIG_MFD_RC5T583=y # CONFIG_MFD_RK808 is not set CONFIG_MFD_RN5T618=y # CONFIG_MFD_SEC_CORE is not set CONFIG_MFD_SI476X_CORE=y CONFIG_MFD_SM501=y CONFIG_MFD_SM501_GPIO=y CONFIG_MFD_SKY81452=y # CONFIG_MFD_SMSC is not set CONFIG_ABX500_CORE=y CONFIG_AB3100_CORE=y # CONFIG_AB3100_OTP is not set # CONFIG_MFD_STMPE is not set CONFIG_MFD_SYSCON=y CONFIG_MFD_TI_AM335X_TSCADC=y CONFIG_MFD_LP3943=y # CONFIG_MFD_LP8788 is not set CONFIG_MFD_TI_LMU=y CONFIG_MFD_PALMAS=y # CONFIG_TPS6105X is not set # CONFIG_TPS65010 is not set CONFIG_TPS6507X=y CONFIG_MFD_TPS65086=y # CONFIG_MFD_TPS65090 is not set CONFIG_MFD_TPS65217=y # CONFIG_MFD_TPS68470 is not set # CONFIG_MFD_TI_LP873X is not set CONFIG_MFD_TI_LP87565=y CONFIG_MFD_TPS65218=y CONFIG_MFD_TPS6586X=y CONFIG_MFD_TPS65910=y # CONFIG_MFD_TPS65912_I2C is not set # CONFIG_MFD_TPS80031 is not set CONFIG_TWL4030_CORE=y CONFIG_MFD_TWL4030_AUDIO=y # CONFIG_TWL6040_CORE is not set CONFIG_MFD_WL1273_CORE=y CONFIG_MFD_LM3533=y CONFIG_MFD_TIMBERDALE=y CONFIG_MFD_TC3589X=y CONFIG_MFD_VX855=y CONFIG_MFD_ARIZONA=y CONFIG_MFD_ARIZONA_I2C=y # CONFIG_MFD_CS47L24 is not set CONFIG_MFD_WM5102=y CONFIG_MFD_WM5110=y CONFIG_MFD_WM8997=y # CONFIG_MFD_WM8998 is not set CONFIG_MFD_WM8400=y # CONFIG_MFD_WM831X_I2C is not set # CONFIG_MFD_WM8350_I2C is not set CONFIG_MFD_WM8994=y CONFIG_RAVE_SP_CORE=y # CONFIG_REGULATOR is not set # CONFIG_RC_CORE is not set # CONFIG_MEDIA_SUPPORT is not set # # Graphics support # CONFIG_AGP=y CONFIG_AGP_ALI=y # CONFIG_AGP_ATI is not set # CONFIG_AGP_AMD is not set # CONFIG_AGP_AMD64 is not set CONFIG_AGP_INTEL=y # CONFIG_AGP_NVIDIA is not set CONFIG_AGP_SIS=y CONFIG_AGP_SWORKS=y CONFIG_AGP_VIA=y CONFIG_AGP_EFFICEON=y CONFIG_INTEL_GTT=y CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=16 # CONFIG_VGA_SWITCHEROO is not set CONFIG_DRM=y CONFIG_DRM_DP_AUX_CHARDEV=y # CONFIG_DRM_DEBUG_MM is not set # CONFIG_DRM_DEBUG_MM_SELFTEST is not set CONFIG_DRM_KMS_HELPER=y CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set CONFIG_DRM_TTM=y CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y CONFIG_DRM_VM=y # # I2C encoder or helper chips # # CONFIG_DRM_I2C_CH7006 is not set CONFIG_DRM_I2C_SIL164=y CONFIG_DRM_I2C_NXP_TDA998X=y # CONFIG_DRM_RADEON is not set # CONFIG_DRM_AMDGPU is not set # # ACP (Audio CoProcessor) Configuration # # # AMD Library routines # CONFIG_DRM_NOUVEAU=y CONFIG_NOUVEAU_DEBUG=5 CONFIG_NOUVEAU_DEBUG_DEFAULT=3 CONFIG_NOUVEAU_DEBUG_MMU=y # CONFIG_DRM_NOUVEAU_BACKLIGHT is not set # CONFIG_DRM_I915 is not set CONFIG_DRM_VGEM=y CONFIG_DRM_VMWGFX=y CONFIG_DRM_VMWGFX_FBCON=y CONFIG_DRM_GMA500=y CONFIG_DRM_GMA600=y CONFIG_DRM_GMA3600=y CONFIG_DRM_UDL=y CONFIG_DRM_AST=y CONFIG_DRM_MGAG200=y CONFIG_DRM_CIRRUS_QEMU=y # CONFIG_DRM_RCAR_DW_HDMI is not set CONFIG_DRM_RCAR_LVDS=y CONFIG_DRM_QXL=y # CONFIG_DRM_BOCHS is not set # CONFIG_DRM_VIRTIO_GPU is not set CONFIG_DRM_PANEL=y # # Display Panels # CONFIG_DRM_PANEL_ARM_VERSATILE=y # CONFIG_DRM_PANEL_LVDS is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set CONFIG_DRM_PANEL_SEIKO_43WVF1G=y CONFIG_DRM_BRIDGE=y CONFIG_DRM_PANEL_BRIDGE=y # # Display Interface Bridges # CONFIG_DRM_ANALOGIX_ANX78XX=y CONFIG_DRM_DUMB_VGA_DAC=y CONFIG_DRM_LVDS_ENCODER=y CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW=y CONFIG_DRM_NXP_PTN3460=y CONFIG_DRM_PARADE_PS8622=y CONFIG_DRM_SII902X=y CONFIG_DRM_SII9234=y CONFIG_DRM_TOSHIBA_TC358767=y # CONFIG_DRM_TI_TFP410 is not set # CONFIG_DRM_I2C_ADV7511 is not set CONFIG_DRM_ARCPGU=y CONFIG_DRM_HISI_HIBMC=y CONFIG_DRM_MXS=y CONFIG_DRM_MXSFB=y # CONFIG_DRM_TINYDRM is not set # CONFIG_DRM_LEGACY is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y # # Frame buffer Devices # CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set CONFIG_FB_CMDLINE=y CONFIG_FB_NOTIFY=y CONFIG_FB_DDC=y CONFIG_FB_BOOT_VESA_SUPPORT=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=y CONFIG_FB_SYS_COPYAREA=y CONFIG_FB_SYS_IMAGEBLIT=y # CONFIG_FB_FOREIGN_ENDIAN is not set CONFIG_FB_SYS_FOPS=y CONFIG_FB_DEFERRED_IO=y CONFIG_FB_SVGALIB=y CONFIG_FB_BACKLIGHT=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # # Frame buffer hardware drivers # CONFIG_FB_CIRRUS=y CONFIG_FB_PM2=y CONFIG_FB_PM2_FIFO_DISCONNECT=y CONFIG_FB_CYBER2000=y # CONFIG_FB_CYBER2000_DDC is not set CONFIG_FB_ARC=y # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set CONFIG_FB_UVESA=y # CONFIG_FB_VESA is not set # CONFIG_FB_N411 is not set # CONFIG_FB_HGA is not set CONFIG_FB_OPENCORES=y CONFIG_FB_S1D13XXX=y CONFIG_FB_NVIDIA=y # CONFIG_FB_NVIDIA_I2C is not set # CONFIG_FB_NVIDIA_DEBUG is not set CONFIG_FB_NVIDIA_BACKLIGHT=y # CONFIG_FB_RIVA is not set CONFIG_FB_I740=y CONFIG_FB_I810=y # CONFIG_FB_I810_GTF is not set # CONFIG_FB_LE80578 is not set # CONFIG_FB_INTEL is not set # CONFIG_FB_MATROX is not set CONFIG_FB_RADEON=y CONFIG_FB_RADEON_I2C=y # CONFIG_FB_RADEON_BACKLIGHT is not set CONFIG_FB_RADEON_DEBUG=y CONFIG_FB_ATY128=y CONFIG_FB_ATY128_BACKLIGHT=y # CONFIG_FB_ATY is not set CONFIG_FB_S3=y # CONFIG_FB_S3_DDC is not set # CONFIG_FB_SAVAGE is not set CONFIG_FB_SIS=y # CONFIG_FB_SIS_300 is not set CONFIG_FB_SIS_315=y CONFIG_FB_VIA=y CONFIG_FB_VIA_DIRECT_PROCFS=y # CONFIG_FB_VIA_X_COMPATIBILITY is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set CONFIG_FB_3DFX=y CONFIG_FB_3DFX_ACCEL=y CONFIG_FB_3DFX_I2C=y CONFIG_FB_VOODOO1=y CONFIG_FB_VT8623=y # CONFIG_FB_TRIDENT is not set CONFIG_FB_ARK=y CONFIG_FB_PM3=y CONFIG_FB_CARMINE=y # CONFIG_FB_CARMINE_DRAM_EVAL is not set CONFIG_CARMINE_DRAM_CUSTOM=y # CONFIG_FB_GEODE is not set CONFIG_FB_SM501=y CONFIG_FB_SMSCUFX=y CONFIG_FB_UDL=y # CONFIG_FB_IBM_GXT4500 is not set CONFIG_FB_GOLDFISH=y # CONFIG_FB_VIRTUAL is not set CONFIG_FB_METRONOME=y CONFIG_FB_MB862XX=y CONFIG_FB_MB862XX_PCI_GDC=y CONFIG_FB_MB862XX_I2C=y CONFIG_FB_BROADSHEET=y # CONFIG_FB_AUO_K190X is not set # CONFIG_FB_SIMPLE is not set CONFIG_FB_SSD1307=y CONFIG_FB_SM712=y CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_PLATFORM=y CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set # CONFIG_BACKLIGHT_LM3533 is not set # CONFIG_BACKLIGHT_PWM is not set # CONFIG_BACKLIGHT_DA9052 is not set CONFIG_BACKLIGHT_MAX8925=y # CONFIG_BACKLIGHT_APPLE is not set # CONFIG_BACKLIGHT_PM8941_WLED is not set CONFIG_BACKLIGHT_SAHARA=y CONFIG_BACKLIGHT_ADP8860=y # CONFIG_BACKLIGHT_ADP8870 is not set # CONFIG_BACKLIGHT_88PM860X is not set CONFIG_BACKLIGHT_PCF50633=y CONFIG_BACKLIGHT_AAT2870=y CONFIG_BACKLIGHT_LM3630A=y CONFIG_BACKLIGHT_LM3639=y CONFIG_BACKLIGHT_LP855X=y CONFIG_BACKLIGHT_PANDORA=y CONFIG_BACKLIGHT_SKY81452=y # CONFIG_BACKLIGHT_TPS65217 is not set CONFIG_BACKLIGHT_AS3711=y CONFIG_BACKLIGHT_GPIO=y CONFIG_BACKLIGHT_LV5207LP=y # CONFIG_BACKLIGHT_BD6107 is not set CONFIG_BACKLIGHT_ARCXCNN=y CONFIG_VGASTATE=y CONFIG_VIDEOMODE_HELPERS=y CONFIG_HDMI=y CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y # CONFIG_LOGO_LINUX_VGA16 is not set # CONFIG_LOGO_LINUX_CLUT224 is not set CONFIG_SOUND=y CONFIG_SOUND_OSS_CORE=y # CONFIG_SOUND_OSS_CORE_PRECLAIM is not set CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y CONFIG_SND_PCM_ELD=y CONFIG_SND_PCM_IEC958=y CONFIG_SND_DMAENGINE_PCM=y CONFIG_SND_HWDEP=y CONFIG_SND_SEQ_DEVICE=y CONFIG_SND_RAWMIDI=y CONFIG_SND_JACK=y CONFIG_SND_JACK_INPUT_DEV=y CONFIG_SND_OSSEMUL=y # CONFIG_SND_MIXER_OSS is not set CONFIG_SND_PCM_OSS=y CONFIG_SND_PCM_OSS_PLUGINS=y # CONFIG_SND_PCM_TIMER is not set CONFIG_SND_DYNAMIC_MINORS=y CONFIG_SND_MAX_CARDS=32 CONFIG_SND_SUPPORT_OLD_API=y CONFIG_SND_PROC_FS=y CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set CONFIG_SND_VMASTER=y CONFIG_SND_DMA_SGBUF=y CONFIG_SND_SEQUENCER=y # CONFIG_SND_SEQ_DUMMY is not set CONFIG_SND_SEQUENCER_OSS=y CONFIG_SND_SEQ_MIDI_EVENT=y CONFIG_SND_SEQ_MIDI=y CONFIG_SND_SEQ_VIRMIDI=y CONFIG_SND_MPU401_UART=y CONFIG_SND_VX_LIB=y CONFIG_SND_AC97_CODEC=y CONFIG_SND_DRIVERS=y # CONFIG_SND_DUMMY is not set CONFIG_SND_ALOOP=y CONFIG_SND_VIRMIDI=y # CONFIG_SND_MTPAV is not set CONFIG_SND_MTS64=y # CONFIG_SND_SERIAL_U16550 is not set CONFIG_SND_MPU401=y CONFIG_SND_PORTMAN2X4=y CONFIG_SND_AC97_POWER_SAVE=y CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0 # CONFIG_SND_ISA is not set # CONFIG_SND_PCI is not set # # HD-Audio # CONFIG_SND_HDA_PREALLOC_SIZE=64 CONFIG_SND_USB=y CONFIG_SND_USB_AUDIO=y CONFIG_SND_USB_UA101=y # CONFIG_SND_USB_USX2Y is not set CONFIG_SND_USB_CAIAQ=y # CONFIG_SND_USB_CAIAQ_INPUT is not set # CONFIG_SND_USB_US122L is not set CONFIG_SND_USB_6FIRE=y CONFIG_SND_USB_HIFACE=y CONFIG_SND_BCD2000=y CONFIG_SND_USB_LINE6=y # CONFIG_SND_USB_POD is not set CONFIG_SND_USB_PODHD=y CONFIG_SND_USB_TONEPORT=y # CONFIG_SND_USB_VARIAX is not set CONFIG_SND_PCMCIA=y CONFIG_SND_VXPOCKET=y CONFIG_SND_PDAUDIOCF=y CONFIG_SND_SOC=y CONFIG_SND_SOC_AC97_BUS=y CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y CONFIG_SND_SOC_AMD_ACP=y CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=y # CONFIG_SND_SOC_AMD_CZ_RT5645_MACH is not set CONFIG_SND_ATMEL_SOC=y # CONFIG_SND_DESIGNWARE_I2S is not set # # SoC Audio for Freescale CPUs # # # Common SoC Audio options for Freescale CPUs: # # CONFIG_SND_SOC_FSL_ASRC is not set # CONFIG_SND_SOC_FSL_SAI is not set CONFIG_SND_SOC_FSL_SSI=y # CONFIG_SND_SOC_FSL_SPDIF is not set CONFIG_SND_SOC_FSL_ESAI=y # CONFIG_SND_SOC_IMX_AUDMUX is not set # CONFIG_SND_I2S_HI6210_I2S is not set # CONFIG_SND_SOC_IMG is not set CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y # CONFIG_SND_SOC_INTEL_HASWELL is not set # CONFIG_SND_SOC_INTEL_BAYTRAIL is not set # CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI is not set # CONFIG_SND_SST_ATOM_HIFI2_PLATFORM is not set # CONFIG_SND_SOC_INTEL_SKYLAKE is not set CONFIG_SND_SOC_INTEL_MACH=y # # STMicroelectronics STM32 SOC audio support # # CONFIG_SND_SOC_XTFPGA_I2S is not set CONFIG_ZX_TDM=y CONFIG_SND_SOC_I2C_AND_SPI=y # # CODEC drivers # CONFIG_SND_SOC_AC97_CODEC=y CONFIG_SND_SOC_ADAU_UTILS=y CONFIG_SND_SOC_ADAU1701=y CONFIG_SND_SOC_ADAU17X1=y CONFIG_SND_SOC_ADAU1761=y CONFIG_SND_SOC_ADAU1761_I2C=y CONFIG_SND_SOC_ADAU7002=y CONFIG_SND_SOC_AK4458=y CONFIG_SND_SOC_AK4554=y CONFIG_SND_SOC_AK4613=y CONFIG_SND_SOC_AK4642=y CONFIG_SND_SOC_AK5386=y CONFIG_SND_SOC_AK5558=y CONFIG_SND_SOC_ALC5623=y CONFIG_SND_SOC_BD28623=y CONFIG_SND_SOC_BT_SCO=y CONFIG_SND_SOC_CS35L32=y CONFIG_SND_SOC_CS35L33=y CONFIG_SND_SOC_CS35L34=y CONFIG_SND_SOC_CS35L35=y CONFIG_SND_SOC_CS42L42=y CONFIG_SND_SOC_CS42L51=y CONFIG_SND_SOC_CS42L51_I2C=y # CONFIG_SND_SOC_CS42L52 is not set # CONFIG_SND_SOC_CS42L56 is not set CONFIG_SND_SOC_CS42L73=y CONFIG_SND_SOC_CS4265=y CONFIG_SND_SOC_CS4270=y CONFIG_SND_SOC_CS4271=y CONFIG_SND_SOC_CS4271_I2C=y CONFIG_SND_SOC_CS42XX8=y CONFIG_SND_SOC_CS42XX8_I2C=y CONFIG_SND_SOC_CS43130=y CONFIG_SND_SOC_CS4349=y CONFIG_SND_SOC_CS53L30=y CONFIG_SND_SOC_DA7219=y CONFIG_SND_SOC_DIO2125=y CONFIG_SND_SOC_HDMI_CODEC=y CONFIG_SND_SOC_ES7134=y CONFIG_SND_SOC_ES8316=y CONFIG_SND_SOC_ES8328=y CONFIG_SND_SOC_ES8328_I2C=y CONFIG_SND_SOC_GTM601=y CONFIG_SND_SOC_INNO_RK3036=y CONFIG_SND_SOC_MAX98357A=y CONFIG_SND_SOC_MAX98504=y CONFIG_SND_SOC_MAX9867=y CONFIG_SND_SOC_MAX98927=y CONFIG_SND_SOC_MAX98373=y CONFIG_SND_SOC_MAX9860=y CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=y CONFIG_SND_SOC_PCM1681=y CONFIG_SND_SOC_PCM1789=y CONFIG_SND_SOC_PCM1789_I2C=y CONFIG_SND_SOC_PCM179X=y CONFIG_SND_SOC_PCM179X_I2C=y CONFIG_SND_SOC_PCM186X=y CONFIG_SND_SOC_PCM186X_I2C=y CONFIG_SND_SOC_PCM3168A=y CONFIG_SND_SOC_PCM3168A_I2C=y CONFIG_SND_SOC_PCM512x=y CONFIG_SND_SOC_PCM512x_I2C=y CONFIG_SND_SOC_RL6231=y CONFIG_SND_SOC_RT5616=y CONFIG_SND_SOC_RT5631=y CONFIG_SND_SOC_SGTL5000=y CONFIG_SND_SOC_SIGMADSP=y CONFIG_SND_SOC_SIGMADSP_I2C=y CONFIG_SND_SOC_SIGMADSP_REGMAP=y CONFIG_SND_SOC_SIRF_AUDIO_CODEC=y CONFIG_SND_SOC_SPDIF=y CONFIG_SND_SOC_SSM2602=y CONFIG_SND_SOC_SSM2602_I2C=y CONFIG_SND_SOC_SSM4567=y CONFIG_SND_SOC_STA32X=y CONFIG_SND_SOC_STA350=y CONFIG_SND_SOC_STI_SAS=y CONFIG_SND_SOC_TAS2552=y CONFIG_SND_SOC_TAS5086=y CONFIG_SND_SOC_TAS571X=y CONFIG_SND_SOC_TAS5720=y CONFIG_SND_SOC_TAS6424=y CONFIG_SND_SOC_TDA7419=y CONFIG_SND_SOC_TFA9879=y CONFIG_SND_SOC_TLV320AIC23=y CONFIG_SND_SOC_TLV320AIC23_I2C=y CONFIG_SND_SOC_TLV320AIC31XX=y CONFIG_SND_SOC_TLV320AIC32X4=y CONFIG_SND_SOC_TLV320AIC32X4_I2C=y CONFIG_SND_SOC_TLV320AIC3X=y CONFIG_SND_SOC_TS3A227E=y CONFIG_SND_SOC_TSCS42XX=y CONFIG_SND_SOC_WM8510=y CONFIG_SND_SOC_WM8523=y CONFIG_SND_SOC_WM8524=y CONFIG_SND_SOC_WM8580=y CONFIG_SND_SOC_WM8711=y CONFIG_SND_SOC_WM8728=y CONFIG_SND_SOC_WM8731=y CONFIG_SND_SOC_WM8737=y CONFIG_SND_SOC_WM8741=y CONFIG_SND_SOC_WM8750=y CONFIG_SND_SOC_WM8753=y CONFIG_SND_SOC_WM8776=y CONFIG_SND_SOC_WM8804=y CONFIG_SND_SOC_WM8804_I2C=y CONFIG_SND_SOC_WM8903=y CONFIG_SND_SOC_WM8960=y # CONFIG_SND_SOC_WM8962 is not set CONFIG_SND_SOC_WM8974=y CONFIG_SND_SOC_WM8978=y CONFIG_SND_SOC_WM8985=y CONFIG_SND_SOC_ZX_AUD96P22=y CONFIG_SND_SOC_MAX9759=y CONFIG_SND_SOC_NAU8540=y CONFIG_SND_SOC_NAU8810=y CONFIG_SND_SOC_NAU8824=y CONFIG_SND_SOC_TPA6130A2=y CONFIG_SND_SIMPLE_CARD_UTILS=y # CONFIG_SND_SIMPLE_CARD is not set CONFIG_SND_SIMPLE_SCU_CARD=y # CONFIG_SND_AUDIO_GRAPH_CARD is not set # CONFIG_SND_AUDIO_GRAPH_SCU_CARD is not set # CONFIG_SND_X86 is not set CONFIG_AC97_BUS=y # # HID support # CONFIG_HID=y # CONFIG_HID_BATTERY_STRENGTH is not set # CONFIG_HIDRAW is not set # CONFIG_UHID is not set CONFIG_HID_GENERIC=y # # Special HID drivers # # CONFIG_HID_A4TECH is not set # CONFIG_HID_ACCUTOUCH is not set # CONFIG_HID_ACRUX is not set # CONFIG_HID_APPLE is not set # CONFIG_HID_APPLEIR is not set # CONFIG_HID_ASUS is not set # CONFIG_HID_AUREAL is not set # CONFIG_HID_BELKIN is not set # CONFIG_HID_BETOP_FF is not set # CONFIG_HID_CHERRY is not set # CONFIG_HID_CHICONY is not set # CONFIG_HID_CORSAIR is not set # CONFIG_HID_PRODIKEYS is not set # CONFIG_HID_CMEDIA is not set # CONFIG_HID_CYPRESS is not set # CONFIG_HID_DRAGONRISE is not set # CONFIG_HID_EMS_FF is not set # CONFIG_HID_ELAN is not set # CONFIG_HID_ELECOM is not set # CONFIG_HID_ELO is not set # CONFIG_HID_EZKEY is not set # CONFIG_HID_GEMBIRD is not set # CONFIG_HID_GFRM is not set # CONFIG_HID_HOLTEK is not set # CONFIG_HID_GOOGLE_HAMMER is not set # CONFIG_HID_GT683R is not set # CONFIG_HID_KEYTOUCH is not set # CONFIG_HID_KYE is not set # CONFIG_HID_UCLOGIC is not set # CONFIG_HID_WALTOP is not set # CONFIG_HID_GYRATION is not set # CONFIG_HID_ICADE is not set # CONFIG_HID_ITE is not set # CONFIG_HID_JABRA is not set # CONFIG_HID_TWINHAN is not set # CONFIG_HID_KENSINGTON is not set # CONFIG_HID_LCPOWER is not set # CONFIG_HID_LED is not set # CONFIG_HID_LENOVO is not set # CONFIG_HID_LOGITECH is not set # CONFIG_HID_MAGICMOUSE is not set # CONFIG_HID_MAYFLASH is not set # CONFIG_HID_MICROSOFT is not set # CONFIG_HID_MONTEREY is not set # CONFIG_HID_MULTITOUCH is not set # CONFIG_HID_NTI is not set # CONFIG_HID_NTRIG is not set # CONFIG_HID_ORTEK is not set # CONFIG_HID_PANTHERLORD is not set # CONFIG_HID_PENMOUNT is not set # CONFIG_HID_PETALYNX is not set # CONFIG_HID_PICOLCD is not set # CONFIG_HID_PLANTRONICS is not set # CONFIG_HID_PRIMAX is not set # CONFIG_HID_RETRODE is not set # CONFIG_HID_ROCCAT is not set # CONFIG_HID_SAITEK is not set # CONFIG_HID_SAMSUNG is not set # CONFIG_HID_SONY is not set # CONFIG_HID_SPEEDLINK is not set # CONFIG_HID_STEELSERIES is not set # CONFIG_HID_SUNPLUS is not set # CONFIG_HID_RMI is not set # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set # CONFIG_HID_TIVO is not set # CONFIG_HID_TOPSEED is not set # CONFIG_HID_THINGM is not set # CONFIG_HID_THRUSTMASTER is not set # CONFIG_HID_UDRAW_PS3 is not set # CONFIG_HID_WACOM is not set # CONFIG_HID_WIIMOTE is not set # CONFIG_HID_XINMO is not set # CONFIG_HID_ZEROPLUS is not set # CONFIG_HID_ZYDACRON is not set # CONFIG_HID_SENSOR_HUB is not set # CONFIG_HID_ALPS is not set # # USB HID support # CONFIG_USB_HID=y # CONFIG_HID_PID is not set # CONFIG_USB_HIDDEV is not set # # I2C HID support # # CONFIG_I2C_HID is not set CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB=y CONFIG_USB_PCI=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # # Miscellaneous USB options # # CONFIG_USB_DEFAULT_PERSIST is not set CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_OTG=y # CONFIG_USB_OTG_WHITELIST is not set CONFIG_USB_OTG_BLACKLIST_HUB=y CONFIG_USB_OTG_FSM=y CONFIG_USB_LEDS_TRIGGER_USBPORT=y # CONFIG_USB_MON is not set CONFIG_USB_WUSB=y # CONFIG_USB_WUSB_CBAF is not set # # USB Host Controller Drivers # CONFIG_USB_C67X00_HCD=y # CONFIG_USB_XHCI_HCD is not set # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_OXU210HP_HCD=y CONFIG_USB_ISP116X_HCD=y CONFIG_USB_FOTG210_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PCI=y # CONFIG_USB_OHCI_HCD_SSB is not set CONFIG_USB_OHCI_HCD_PLATFORM=y # CONFIG_USB_UHCI_HCD is not set CONFIG_USB_U132_HCD=y CONFIG_USB_SL811_HCD=y # CONFIG_USB_SL811_HCD_ISO is not set CONFIG_USB_SL811_CS=y CONFIG_USB_R8A66597_HCD=y # CONFIG_USB_WHCI_HCD is not set # CONFIG_USB_HWA_HCD is not set CONFIG_USB_HCD_SSB=y # CONFIG_USB_HCD_TEST_MODE is not set # # USB Device Class drivers # # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set CONFIG_USB_WDM=y CONFIG_USB_TMC=y # # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may # # # also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_REALTEK is not set CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y CONFIG_USB_STORAGE_USBAT=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set CONFIG_USB_STORAGE_KARMA=y # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set CONFIG_USB_STORAGE_ENE_UB6250=y CONFIG_USB_UAS=y # # USB Imaging devices # CONFIG_USB_MDC800=y CONFIG_USB_MICROTEK=y CONFIG_USBIP_CORE=y CONFIG_USBIP_VHCI_HCD=y CONFIG_USBIP_VHCI_HC_PORTS=8 CONFIG_USBIP_VHCI_NR_HCS=1 # CONFIG_USBIP_HOST is not set CONFIG_USBIP_VUDC=y # CONFIG_USBIP_DEBUG is not set CONFIG_USB_MUSB_HDRC=y # CONFIG_USB_MUSB_HOST is not set # CONFIG_USB_MUSB_GADGET is not set CONFIG_USB_MUSB_DUAL_ROLE=y # # Platform Glue Layer # # # MUSB DMA mode # CONFIG_MUSB_PIO_ONLY=y CONFIG_USB_DWC3=y # CONFIG_USB_DWC3_ULPI is not set CONFIG_USB_DWC3_HOST=y # CONFIG_USB_DWC3_GADGET is not set # CONFIG_USB_DWC3_DUAL_ROLE is not set # # Platform Glue Driver Support # CONFIG_USB_DWC3_PCI=y CONFIG_USB_DWC3_OF_SIMPLE=y CONFIG_USB_DWC2=y # CONFIG_USB_DWC2_HOST is not set # # Gadget/Dual-role mode requires USB Gadget support to be enabled # CONFIG_USB_DWC2_PERIPHERAL=y # CONFIG_USB_DWC2_DUAL_ROLE is not set CONFIG_USB_DWC2_PCI=y CONFIG_USB_DWC2_DEBUG=y # CONFIG_USB_DWC2_VERBOSE is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set # CONFIG_USB_DWC2_DEBUG_PERIODIC is not set CONFIG_USB_CHIPIDEA=y CONFIG_USB_CHIPIDEA_OF=y CONFIG_USB_CHIPIDEA_PCI=y CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_ULPI=y CONFIG_USB_ISP1760=y CONFIG_USB_ISP1761_UDC=y # CONFIG_USB_ISP1760_HOST_ROLE is not set CONFIG_USB_ISP1760_GADGET_ROLE=y # CONFIG_USB_ISP1760_DUAL_ROLE is not set # # USB port drivers # # CONFIG_USB_USS720 is not set # CONFIG_USB_SERIAL is not set # # USB Miscellaneous drivers # CONFIG_USB_EMI62=y CONFIG_USB_EMI26=y CONFIG_USB_ADUTUX=y CONFIG_USB_SEVSEG=y # CONFIG_USB_RIO500 is not set CONFIG_USB_LEGOTOWER=y CONFIG_USB_LCD=y # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_IDMOUSE is not set CONFIG_USB_FTDI_ELAN=y CONFIG_USB_APPLEDISPLAY=y CONFIG_USB_SISUSBVGA=y # CONFIG_USB_LD is not set CONFIG_USB_TRANCEVIBRATOR=y # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_EHSET_TEST_FIXTURE is not set CONFIG_USB_ISIGHTFW=y CONFIG_USB_YUREX=y CONFIG_USB_EZUSB_FX2=y CONFIG_USB_HUB_USB251XB=y # CONFIG_USB_HSIC_USB3503 is not set # CONFIG_USB_HSIC_USB4604 is not set CONFIG_USB_LINK_LAYER_TEST=y CONFIG_USB_CHAOSKEY=y # # USB Physical Layer drivers # CONFIG_USB_PHY=y CONFIG_NOP_USB_XCEIV=y CONFIG_USB_GPIO_VBUS=y CONFIG_TAHVO_USB=y CONFIG_TAHVO_USB_HOST_BY_DEFAULT=y CONFIG_USB_ISP1301=y CONFIG_USB_GADGET=y # CONFIG_USB_GADGET_DEBUG is not set # CONFIG_USB_GADGET_DEBUG_FILES is not set # CONFIG_USB_GADGET_DEBUG_FS is not set CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 # # USB Peripheral Controller # # CONFIG_USB_FUSB300 is not set CONFIG_USB_FOTG210_UDC=y # CONFIG_USB_GR_UDC is not set CONFIG_USB_R8A66597=y CONFIG_USB_PXA27X=y CONFIG_USB_MV_UDC=y CONFIG_USB_MV_U3D=y # CONFIG_USB_SNP_UDC_PLAT is not set # CONFIG_USB_M66592 is not set # CONFIG_USB_BDC_UDC is not set # CONFIG_USB_AMD5536UDC is not set CONFIG_USB_NET2272=y CONFIG_USB_NET2272_DMA=y CONFIG_USB_NET2280=y CONFIG_USB_GOKU=y # CONFIG_USB_EG20T is not set CONFIG_USB_GADGET_XILINX=y CONFIG_USB_DUMMY_HCD=y # CONFIG_USB_CONFIGFS is not set CONFIG_TYPEC=y CONFIG_TYPEC_TCPM=y CONFIG_TYPEC_FUSB302=y CONFIG_TYPEC_UCSI=y # CONFIG_UCSI_ACPI is not set CONFIG_TYPEC_TPS6598X=y # # USB Type-C Multiplexer/DeMultiplexer Switch support # CONFIG_TYPEC_MUX_PI3USB30532=y # CONFIG_USB_ROLES_INTEL_XHCI is not set # CONFIG_USB_LED_TRIG is not set CONFIG_USB_ULPI_BUS=y CONFIG_USB_ROLE_SWITCH=y CONFIG_UWB=y CONFIG_UWB_HWA=y CONFIG_UWB_WHCI=y # CONFIG_UWB_I1480U is not set CONFIG_MMC=y # CONFIG_PWRSEQ_EMMC is not set # CONFIG_PWRSEQ_SIMPLE is not set # CONFIG_MMC_BLOCK is not set # CONFIG_SDIO_UART is not set CONFIG_MMC_TEST=y # # MMC/SD/SDIO Host Controller Drivers # # CONFIG_MMC_DEBUG is not set CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PCI=y # CONFIG_MMC_RICOH_MMC is not set # CONFIG_MMC_SDHCI_ACPI is not set # CONFIG_MMC_SDHCI_PLTFM is not set # CONFIG_MMC_WBSD is not set CONFIG_MMC_TIFM_SD=y # CONFIG_MMC_GOLDFISH is not set CONFIG_MMC_SDRICOH_CS=y CONFIG_MMC_CB710=y CONFIG_MMC_VIA_SDMMC=y # CONFIG_MMC_VUB300 is not set CONFIG_MMC_USHC=y CONFIG_MMC_USDHI6ROL0=y CONFIG_MMC_REALTEK_PCI=y CONFIG_MMC_CQHCI=y CONFIG_MMC_TOSHIBA_PCI=y # CONFIG_MMC_MTK is not set CONFIG_MEMSTICK=y # CONFIG_MEMSTICK_DEBUG is not set # # MemoryStick drivers # CONFIG_MEMSTICK_UNSAFE_RESUME=y CONFIG_MSPRO_BLOCK=y CONFIG_MS_BLOCK=y # # MemoryStick Host Controller Drivers # CONFIG_MEMSTICK_TIFM_MS=y # CONFIG_MEMSTICK_JMICRON_38X is not set CONFIG_MEMSTICK_R592=y CONFIG_MEMSTICK_REALTEK_PCI=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y # CONFIG_LEDS_CLASS_FLASH is not set # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # # LED drivers # CONFIG_LEDS_88PM860X=y # CONFIG_LEDS_APU is not set CONFIG_LEDS_BCM6328=y # CONFIG_LEDS_BCM6358 is not set CONFIG_LEDS_LM3530=y # CONFIG_LEDS_LM3533 is not set CONFIG_LEDS_LM3642=y CONFIG_LEDS_LM3692X=y CONFIG_LEDS_MT6323=y CONFIG_LEDS_NET48XX=y CONFIG_LEDS_WRAP=y # CONFIG_LEDS_PCA9532 is not set CONFIG_LEDS_GPIO=y CONFIG_LEDS_LP3944=y CONFIG_LEDS_LP3952=y # CONFIG_LEDS_LP5521 is not set # CONFIG_LEDS_LP5523 is not set # CONFIG_LEDS_LP5562 is not set # CONFIG_LEDS_LP8501 is not set # CONFIG_LEDS_LP8860 is not set # CONFIG_LEDS_CLEVO_MAIL is not set # CONFIG_LEDS_PCA955X is not set CONFIG_LEDS_PCA963X=y CONFIG_LEDS_DA9052=y # CONFIG_LEDS_PWM is not set # CONFIG_LEDS_BD2802 is not set CONFIG_LEDS_INTEL_SS4200=y CONFIG_LEDS_LT3593=y CONFIG_LEDS_TCA6507=y CONFIG_LEDS_TLC591XX=y CONFIG_LEDS_LM355x=y # CONFIG_LEDS_OT200 is not set CONFIG_LEDS_MENF21BMC=y CONFIG_LEDS_IS31FL319X=y CONFIG_LEDS_IS31FL32XX=y # # LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) # CONFIG_LEDS_BLINKM=y # CONFIG_LEDS_SYSCON is not set CONFIG_LEDS_MLXCPLD=y # CONFIG_LEDS_MLXREG is not set # CONFIG_LEDS_USER is not set # CONFIG_LEDS_NIC78BX is not set # # LED Triggers # CONFIG_LEDS_TRIGGERS=y # CONFIG_LEDS_TRIGGER_TIMER is not set CONFIG_LEDS_TRIGGER_ONESHOT=y # CONFIG_LEDS_TRIGGER_MTD is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y # CONFIG_LEDS_TRIGGER_CPU is not set CONFIG_LEDS_TRIGGER_ACTIVITY=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y # # iptables trigger is under Netfilter config (LED target) # # CONFIG_LEDS_TRIGGER_TRANSIENT is not set CONFIG_LEDS_TRIGGER_CAMERA=y # CONFIG_LEDS_TRIGGER_PANIC is not set # CONFIG_LEDS_TRIGGER_NETDEV is not set # CONFIG_ACCESSIBILITY is not set CONFIG_INFINIBAND=y # CONFIG_INFINIBAND_USER_MAD is not set # CONFIG_INFINIBAND_USER_ACCESS is not set CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y CONFIG_INFINIBAND_MTHCA=y # CONFIG_INFINIBAND_MTHCA_DEBUG is not set CONFIG_INFINIBAND_CXGB3=y CONFIG_INFINIBAND_CXGB4=y CONFIG_MLX4_INFINIBAND=y CONFIG_INFINIBAND_NES=y CONFIG_INFINIBAND_NES_DEBUG=y CONFIG_INFINIBAND_OCRDMA=y CONFIG_INFINIBAND_VMWARE_PVRDMA=y CONFIG_INFINIBAND_IPOIB=y # CONFIG_INFINIBAND_IPOIB_CM is not set # CONFIG_INFINIBAND_IPOIB_DEBUG is not set # CONFIG_INFINIBAND_SRP is not set CONFIG_INFINIBAND_SRPT=y CONFIG_INFINIBAND_ISER=y CONFIG_INFINIBAND_ISERT=y CONFIG_RDMA_RXE=y CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EDAC=y CONFIG_EDAC_LEGACY_SYSFS=y # CONFIG_EDAC_DEBUG is not set # CONFIG_EDAC_AMD76X is not set CONFIG_EDAC_E7XXX=y CONFIG_EDAC_E752X=y # CONFIG_EDAC_I82875P is not set CONFIG_EDAC_I82975X=y CONFIG_EDAC_I3000=y # CONFIG_EDAC_I3200 is not set CONFIG_EDAC_IE31200=y CONFIG_EDAC_X38=y CONFIG_EDAC_I5400=y # CONFIG_EDAC_I82860 is not set CONFIG_EDAC_R82600=y # CONFIG_EDAC_I5000 is not set CONFIG_EDAC_I5100=y CONFIG_EDAC_I7300=y CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y CONFIG_RTC_HCTOSYS_DEVICE="rtc0" CONFIG_RTC_SYSTOHC=y CONFIG_RTC_SYSTOHC_DEVICE="rtc0" CONFIG_RTC_DEBUG=y # CONFIG_RTC_NVMEM is not set # # RTC interfaces # # CONFIG_RTC_INTF_SYSFS is not set CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set CONFIG_RTC_DRV_TEST=y # # I2C RTC drivers # CONFIG_RTC_DRV_88PM860X=y CONFIG_RTC_DRV_ABB5ZES3=y CONFIG_RTC_DRV_ABX80X=y CONFIG_RTC_DRV_DS1307=y # CONFIG_RTC_DRV_DS1307_HWMON is not set # CONFIG_RTC_DRV_DS1307_CENTURY is not set # CONFIG_RTC_DRV_DS1374 is not set CONFIG_RTC_DRV_DS1672=y CONFIG_RTC_DRV_HYM8563=y CONFIG_RTC_DRV_MAX6900=y CONFIG_RTC_DRV_MAX8925=y # CONFIG_RTC_DRV_MAX77686 is not set CONFIG_RTC_DRV_RS5C372=y # CONFIG_RTC_DRV_ISL1208 is not set CONFIG_RTC_DRV_ISL12022=y CONFIG_RTC_DRV_ISL12026=y CONFIG_RTC_DRV_X1205=y # CONFIG_RTC_DRV_PCF8523 is not set CONFIG_RTC_DRV_PCF85063=y # CONFIG_RTC_DRV_PCF85363 is not set CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_DRV_PCF8583=y CONFIG_RTC_DRV_M41T80=y # CONFIG_RTC_DRV_M41T80_WDT is not set CONFIG_RTC_DRV_BQ32K=y CONFIG_RTC_DRV_TWL4030=y CONFIG_RTC_DRV_PALMAS=y CONFIG_RTC_DRV_TPS6586X=y CONFIG_RTC_DRV_TPS65910=y CONFIG_RTC_DRV_RC5T583=y # CONFIG_RTC_DRV_S35390A is not set CONFIG_RTC_DRV_FM3130=y CONFIG_RTC_DRV_RX8010=y CONFIG_RTC_DRV_RX8581=y CONFIG_RTC_DRV_RX8025=y # CONFIG_RTC_DRV_EM3027 is not set # CONFIG_RTC_DRV_RV8803 is not set # # SPI RTC drivers # CONFIG_RTC_I2C_AND_SPI=y # # SPI and I2C RTC drivers # # CONFIG_RTC_DRV_DS3232 is not set CONFIG_RTC_DRV_PCF2127=y CONFIG_RTC_DRV_RV3029C2=y # CONFIG_RTC_DRV_RV3029_HWMON is not set # # Platform RTC drivers # CONFIG_RTC_DRV_CMOS=y # CONFIG_RTC_DRV_DS1286 is not set CONFIG_RTC_DRV_DS1511=y CONFIG_RTC_DRV_DS1553=y CONFIG_RTC_DRV_DS1685_FAMILY=y # CONFIG_RTC_DRV_DS1685 is not set # CONFIG_RTC_DRV_DS1689 is not set # CONFIG_RTC_DRV_DS17285 is not set # CONFIG_RTC_DRV_DS17485 is not set CONFIG_RTC_DRV_DS17885=y # CONFIG_RTC_DS1685_PROC_REGS is not set # CONFIG_RTC_DS1685_SYSFS_REGS is not set # CONFIG_RTC_DRV_DS1742 is not set CONFIG_RTC_DRV_DS2404=y CONFIG_RTC_DRV_DA9052=y CONFIG_RTC_DRV_DA9063=y # CONFIG_RTC_DRV_STK17TA8 is not set CONFIG_RTC_DRV_M48T86=y CONFIG_RTC_DRV_M48T35=y CONFIG_RTC_DRV_M48T59=y CONFIG_RTC_DRV_MSM6242=y CONFIG_RTC_DRV_BQ4802=y # CONFIG_RTC_DRV_RP5C01 is not set CONFIG_RTC_DRV_V3020=y CONFIG_RTC_DRV_PCF50633=y CONFIG_RTC_DRV_AB3100=y # CONFIG_RTC_DRV_ZYNQMP is not set CONFIG_RTC_DRV_CROS_EC=y # # on-CPU RTC drivers # # CONFIG_RTC_DRV_FTRTC010 is not set CONFIG_RTC_DRV_SNVS=y # CONFIG_RTC_DRV_MT6397 is not set CONFIG_RTC_DRV_R7301=y # # HID Sensor RTC drivers # # CONFIG_RTC_DRV_HID_SENSOR_TIME is not set CONFIG_DMADEVICES=y CONFIG_DMADEVICES_DEBUG=y # CONFIG_DMADEVICES_VDEBUG is not set # # DMA Devices # CONFIG_DMA_ENGINE=y CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_ACPI=y CONFIG_DMA_OF=y CONFIG_ALTERA_MSGDMA=y CONFIG_DW_AXI_DMAC=y CONFIG_FSL_EDMA=y CONFIG_INTEL_IDMA64=y CONFIG_PCH_DMA=y # CONFIG_TIMB_DMA is not set # CONFIG_QCOM_HIDMA_MGMT is not set CONFIG_QCOM_HIDMA=y CONFIG_DW_DMAC_CORE=y CONFIG_DW_DMAC=y CONFIG_DW_DMAC_PCI=y CONFIG_HSU_DMA=y # # DMA Clients # # CONFIG_ASYNC_TX_DMA is not set CONFIG_DMATEST=y CONFIG_DMA_ENGINE_RAID=y # # DMABUF options # CONFIG_SYNC_FILE=y # CONFIG_SW_SYNC is not set CONFIG_AUXDISPLAY=y CONFIG_CHARLCD=y CONFIG_HD44780=y # CONFIG_IMG_ASCII_LCD is not set # CONFIG_HT16K33 is not set # CONFIG_PANEL is not set CONFIG_UIO=y CONFIG_UIO_CIF=y CONFIG_UIO_PDRV_GENIRQ=y CONFIG_UIO_DMEM_GENIRQ=y CONFIG_UIO_AEC=y # CONFIG_UIO_SERCOS3 is not set CONFIG_UIO_PCI_GENERIC=y CONFIG_UIO_NETX=y # CONFIG_UIO_PRUSS is not set CONFIG_UIO_MF624=y CONFIG_VIRT_DRIVERS=y # CONFIG_VBOXGUEST is not set CONFIG_VIRTIO=y # CONFIG_VIRTIO_MENU is not set # # Microsoft Hyper-V guest support # # CONFIG_HYPERV is not set CONFIG_STAGING=y CONFIG_IPX=y CONFIG_IPX_INTERN=y # CONFIG_NCP_FS is not set # CONFIG_PRISM2_USB is not set # CONFIG_COMEDI is not set # CONFIG_R8712U is not set CONFIG_RTS5208=y CONFIG_FB_SM750=y CONFIG_FB_XGI=y # # Speakup console speech # CONFIG_STAGING_MEDIA=y # # Android # # CONFIG_STAGING_BOARD is not set CONFIG_GOLDFISH_AUDIO=y # CONFIG_MTD_GOLDFISH_NAND is not set CONFIG_LNET=y CONFIG_LNET_MAX_PAYLOAD=1048576 CONFIG_LNET_SELFTEST=y # CONFIG_LNET_XPRT_IB is not set CONFIG_LUSTRE_FS=y # CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK is not set # CONFIG_DGNC is not set # CONFIG_GS_FPGABOOT is not set CONFIG_UNISYSSPAR=y CONFIG_COMMON_CLK_XLNX_CLKWZRD=y # CONFIG_WILC1000_SDIO is not set # CONFIG_MOST is not set # CONFIG_KS7010 is not set CONFIG_GREYBUS=y CONFIG_GREYBUS_ES2=y # CONFIG_GREYBUS_AUDIO is not set CONFIG_GREYBUS_BOOTROM=y # CONFIG_GREYBUS_HID is not set # CONFIG_GREYBUS_LIGHT is not set CONFIG_GREYBUS_LOG=y CONFIG_GREYBUS_LOOPBACK=y CONFIG_GREYBUS_POWER=y # CONFIG_GREYBUS_RAW is not set # CONFIG_GREYBUS_VIBRATOR is not set CONFIG_GREYBUS_BRIDGED_PHY=y CONFIG_GREYBUS_GPIO=y CONFIG_GREYBUS_I2C=y CONFIG_GREYBUS_PWM=y CONFIG_GREYBUS_SDIO=y # CONFIG_GREYBUS_UART is not set CONFIG_GREYBUS_USB=y # # USB Power Delivery and Type-C drivers # # CONFIG_TYPEC_TCPCI is not set # CONFIG_DRM_VBOXVIDEO is not set # CONFIG_MTK_MMC is not set CONFIG_X86_PLATFORM_DEVICES=y # CONFIG_ACER_WMI is not set # CONFIG_ACER_WIRELESS is not set # CONFIG_ACERHDF is not set # CONFIG_ALIENWARE_WMI is not set # CONFIG_ASUS_LAPTOP is not set # CONFIG_DELL_SMBIOS is not set # CONFIG_DELL_LAPTOP is not set # CONFIG_DELL_WMI is not set # CONFIG_DELL_WMI_AIO is not set # CONFIG_DELL_WMI_LED is not set # CONFIG_DELL_SMO8800 is not set # CONFIG_DELL_RBTN is not set # CONFIG_FUJITSU_LAPTOP is not set # CONFIG_FUJITSU_TABLET is not set # CONFIG_AMILO_RFKILL is not set # CONFIG_GPD_POCKET_FAN is not set # CONFIG_TC1100_WMI is not set # CONFIG_HP_ACCEL is not set # CONFIG_HP_WIRELESS is not set # CONFIG_HP_WMI is not set # CONFIG_MSI_LAPTOP is not set # CONFIG_PANASONIC_LAPTOP is not set # CONFIG_COMPAL_LAPTOP is not set # CONFIG_SONY_LAPTOP is not set # CONFIG_IDEAPAD_LAPTOP is not set # CONFIG_THINKPAD_ACPI is not set # CONFIG_SENSORS_HDAPS is not set # CONFIG_INTEL_MENLOW is not set # CONFIG_ASUS_WIRELESS is not set CONFIG_ACPI_WMI=y CONFIG_WMI_BMOF=y # CONFIG_INTEL_WMI_THUNDERBOLT is not set # CONFIG_MSI_WMI is not set # CONFIG_PEAQ_WMI is not set # CONFIG_TOPSTAR_LAPTOP is not set # CONFIG_TOSHIBA_BT_RFKILL is not set # CONFIG_TOSHIBA_HAPS is not set # CONFIG_TOSHIBA_WMI is not set # CONFIG_ACPI_CMPC is not set # CONFIG_INTEL_INT0002_VGPIO is not set # CONFIG_INTEL_HID_EVENT is not set # CONFIG_INTEL_VBTN is not set # CONFIG_INTEL_IPS is not set # CONFIG_INTEL_PMC_CORE is not set # CONFIG_IBM_RTL is not set # CONFIG_SAMSUNG_LAPTOP is not set CONFIG_MXM_WMI=y # CONFIG_INTEL_OAKTRAIL is not set # CONFIG_SAMSUNG_Q10 is not set # CONFIG_APPLE_GMUX is not set # CONFIG_INTEL_RST is not set # CONFIG_INTEL_SMARTCONNECT is not set # CONFIG_PVPANIC is not set # CONFIG_INTEL_PMC_IPC is not set # CONFIG_SURFACE_PRO3_BUTTON is not set # CONFIG_INTEL_PUNIT_IPC is not set # CONFIG_MLX_PLATFORM is not set CONFIG_PMC_ATOM=y # CONFIG_GOLDFISH_BUS is not set CONFIG_GOLDFISH_PIPE=y CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=y # CONFIG_CHROMEOS_PSTORE is not set # CONFIG_CROS_EC_LPC is not set CONFIG_CROS_EC_PROTO=y # CONFIG_CROS_KBD_LED_BACKLIGHT is not set CONFIG_MELLANOX_PLATFORM=y # CONFIG_MLXREG_HOTPLUG is not set CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y # # Common Clock Framework # CONFIG_CLK_HSDK=y CONFIG_COMMON_CLK_MAX77686=y # CONFIG_COMMON_CLK_SI5351 is not set CONFIG_COMMON_CLK_SI514=y CONFIG_COMMON_CLK_SI544=y # CONFIG_COMMON_CLK_SI570 is not set # CONFIG_COMMON_CLK_CDCE706 is not set # CONFIG_COMMON_CLK_CDCE925 is not set # CONFIG_COMMON_CLK_CS2000_CP is not set CONFIG_COMMON_CLK_PALMAS=y CONFIG_COMMON_CLK_PWM=y # CONFIG_COMMON_CLK_VC5 is not set CONFIG_HWSPINLOCK=y # # Clock Source drivers # CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_I8253_LOCK=y CONFIG_CLKBLD_I8253=y CONFIG_MAILBOX=y # CONFIG_PLATFORM_MHU is not set # CONFIG_PCC is not set # CONFIG_ALTERA_MBOX is not set CONFIG_MAILBOX_TEST=y CONFIG_IOMMU_SUPPORT=y # # Generic IOMMU Pagetable Support # # # Remoteproc drivers # CONFIG_REMOTEPROC=y # # Rpmsg drivers # CONFIG_RPMSG=y # CONFIG_RPMSG_CHAR is not set CONFIG_RPMSG_QCOM_GLINK_NATIVE=y CONFIG_RPMSG_QCOM_GLINK_RPM=y CONFIG_RPMSG_VIRTIO=y CONFIG_SOUNDWIRE=y # # SoundWire Devices # # CONFIG_SOUNDWIRE_INTEL is not set # # SOC (System On Chip) specific Drivers # # # Amlogic SoC drivers # # # Broadcom SoC drivers # # # i.MX SoC drivers # # # Qualcomm SoC drivers # # CONFIG_SOC_TI is not set # # Xilinx SoC drivers # CONFIG_XILINX_VCU=y CONFIG_PM_DEVFREQ=y # # DEVFREQ Governors # CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y CONFIG_DEVFREQ_GOV_PERFORMANCE=y # CONFIG_DEVFREQ_GOV_POWERSAVE is not set CONFIG_DEVFREQ_GOV_USERSPACE=y CONFIG_DEVFREQ_GOV_PASSIVE=y # # DEVFREQ Drivers # CONFIG_PM_DEVFREQ_EVENT=y CONFIG_EXTCON=y # # Extcon Device Drivers # # CONFIG_EXTCON_ARIZONA is not set CONFIG_EXTCON_GPIO=y # CONFIG_EXTCON_INTEL_INT3496 is not set # CONFIG_EXTCON_MAX14577 is not set CONFIG_EXTCON_MAX3355=y # CONFIG_EXTCON_MAX77693 is not set CONFIG_EXTCON_MAX77843=y # CONFIG_EXTCON_PALMAS is not set # CONFIG_EXTCON_RT8973A is not set # CONFIG_EXTCON_SM5502 is not set # CONFIG_EXTCON_USB_GPIO is not set CONFIG_EXTCON_USBC_CROS_EC=y # CONFIG_MEMORY is not set # CONFIG_IIO is not set # CONFIG_NTB is not set # CONFIG_VME_BUS is not set CONFIG_PWM=y CONFIG_PWM_SYSFS=y CONFIG_PWM_ATMEL_HLCDC_PWM=y CONFIG_PWM_CROS_EC=y CONFIG_PWM_FSL_FTM=y CONFIG_PWM_LP3943=y CONFIG_PWM_LPSS=y CONFIG_PWM_LPSS_PCI=y # CONFIG_PWM_LPSS_PLATFORM is not set CONFIG_PWM_PCA9685=y CONFIG_PWM_TWL=y # CONFIG_PWM_TWL_LED is not set # # IRQ chip support # CONFIG_IRQCHIP=y CONFIG_ARM_GIC_MAX_NR=1 CONFIG_IPACK_BUS=y CONFIG_BOARD_TPCI200=y # CONFIG_SERIAL_IPOCTAL is not set CONFIG_RESET_CONTROLLER=y CONFIG_RESET_TI_SYSCON=y CONFIG_FMC=y # CONFIG_FMC_FAKEDEV is not set CONFIG_FMC_TRIVIAL=y # CONFIG_FMC_WRITE_EEPROM is not set CONFIG_FMC_CHARDEV=y # # PHY Subsystem # CONFIG_GENERIC_PHY=y # CONFIG_BCM_KONA_USB2_PHY is not set CONFIG_PHY_PXA_28NM_HSIC=y CONFIG_PHY_PXA_28NM_USB2=y # CONFIG_PHY_MAPPHONE_MDM6600 is not set # CONFIG_PHY_QCOM_USB_HS is not set CONFIG_PHY_QCOM_USB_HSIC=y CONFIG_PHY_SAMSUNG_USB2=y # CONFIG_PHY_TUSB1210 is not set CONFIG_POWERCAP=y CONFIG_INTEL_RAPL=y CONFIG_MCB=y # CONFIG_MCB_PCI is not set CONFIG_MCB_LPC=y # # Performance monitor support # CONFIG_RAS=y CONFIG_THUNDERBOLT=y # # Android # # CONFIG_ANDROID is not set CONFIG_DAX=y # CONFIG_DEV_DAX is not set CONFIG_NVMEM=y # # HW tracing support # CONFIG_STM=y # CONFIG_STM_DUMMY is not set # CONFIG_STM_SOURCE_CONSOLE is not set # CONFIG_STM_SOURCE_HEARTBEAT is not set CONFIG_STM_SOURCE_FTRACE=y CONFIG_INTEL_TH=y CONFIG_INTEL_TH_PCI=y # CONFIG_INTEL_TH_ACPI is not set CONFIG_INTEL_TH_GTH=y # CONFIG_INTEL_TH_STH is not set CONFIG_INTEL_TH_MSU=y CONFIG_INTEL_TH_PTI=y CONFIG_INTEL_TH_DEBUG=y CONFIG_FPGA=y CONFIG_ALTERA_PR_IP_CORE=y CONFIG_ALTERA_PR_IP_CORE_PLAT=y CONFIG_FPGA_MGR_ALTERA_CVP=y # CONFIG_FPGA_BRIDGE is not set # CONFIG_FSI is not set CONFIG_PM_OPP=y # CONFIG_SIOX is not set CONFIG_SLIMBUS=y CONFIG_SLIM_QCOM_CTRL=y # # Firmware Drivers # CONFIG_EDD=y CONFIG_EDD_OFF=y # CONFIG_FIRMWARE_MEMMAP is not set CONFIG_DELL_RBU=y CONFIG_DCDBAS=y CONFIG_DMIID=y # CONFIG_DMI_SYSFS is not set CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y # CONFIG_ISCSI_IBFT_FIND is not set CONFIG_FW_CFG_SYSFS=y CONFIG_FW_CFG_SYSFS_CMDLINE=y CONFIG_GOOGLE_FIRMWARE=y CONFIG_GOOGLE_COREBOOT_TABLE=y # CONFIG_GOOGLE_COREBOOT_TABLE_ACPI is not set CONFIG_GOOGLE_COREBOOT_TABLE_OF=y CONFIG_GOOGLE_MEMCONSOLE=y # CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y CONFIG_GOOGLE_VPD=y # # Tegra firmware driver # # # File systems # CONFIG_DCACHE_WORD_ACCESS=y CONFIG_FS_IOMAP=y CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_POSIX_ACL=y # CONFIG_EXT3_FS_SECURITY is not set CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y # CONFIG_EXT4_FS_SECURITY is not set CONFIG_EXT4_ENCRYPTION=y CONFIG_EXT4_FS_ENCRYPTION=y CONFIG_EXT4_DEBUG=y CONFIG_JBD2=y # CONFIG_JBD2_DEBUG is not set CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=y CONFIG_REISERFS_CHECK=y # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set CONFIG_JFS_FS=y CONFIG_JFS_POSIX_ACL=y CONFIG_JFS_SECURITY=y CONFIG_JFS_DEBUG=y CONFIG_JFS_STATISTICS=y CONFIG_OCFS2_FS=y CONFIG_OCFS2_FS_O2CB=y CONFIG_OCFS2_FS_STATS=y # CONFIG_OCFS2_DEBUG_MASKLOG is not set # CONFIG_OCFS2_DEBUG_FS is not set CONFIG_BTRFS_FS=y # CONFIG_BTRFS_FS_POSIX_ACL is not set CONFIG_BTRFS_FS_CHECK_INTEGRITY=y # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set # CONFIG_BTRFS_DEBUG is not set # CONFIG_BTRFS_ASSERT is not set CONFIG_BTRFS_FS_REF_VERIFY=y CONFIG_NILFS2_FS=y # CONFIG_F2FS_FS is not set # CONFIG_FS_DAX is not set CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y # CONFIG_EXPORTFS_BLOCK_OPS is not set CONFIG_FILE_LOCKING=y CONFIG_MANDATORY_FILE_LOCKING=y CONFIG_FS_ENCRYPTION=y CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_FANOTIFY is not set CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y # CONFIG_PRINT_QUOTA_WARNING is not set CONFIG_QUOTA_DEBUG=y CONFIG_QUOTA_TREE=y CONFIG_QFMT_V1=y CONFIG_QFMT_V2=y CONFIG_QUOTACTL=y # CONFIG_AUTOFS4_FS is not set CONFIG_FUSE_FS=y CONFIG_CUSE=y CONFIG_OVERLAY_FS=y CONFIG_OVERLAY_FS_REDIRECT_DIR=y CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y CONFIG_OVERLAY_FS_INDEX=y CONFIG_OVERLAY_FS_NFS_EXPORT=y # CONFIG_OVERLAY_FS_XINO_AUTO is not set # # Caches # CONFIG_FSCACHE=y # CONFIG_FSCACHE_STATS is not set # CONFIG_FSCACHE_HISTOGRAM is not set # CONFIG_FSCACHE_DEBUG is not set # CONFIG_FSCACHE_OBJECT_LIST is not set # CONFIG_CACHEFILES is not set # # CD-ROM/DVD Filesystems # # CONFIG_ISO9660_FS is not set CONFIG_UDF_FS=y CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_FAT_DEFAULT_UTF8=y CONFIG_NTFS_FS=y # CONFIG_NTFS_DEBUG is not set CONFIG_NTFS_RW=y # # Pseudo filesystems # CONFIG_PROC_FS=y # CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_CHILDREN=y CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_TMPFS_XATTR=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_CONFIGFS_FS=y # CONFIG_MISC_FILESYSTEMS is not set # CONFIG_NETWORK_FILESYSTEMS is not set CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_737=y # CONFIG_NLS_CODEPAGE_775 is not set CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_CODEPAGE_852=y # CONFIG_NLS_CODEPAGE_855 is not set CONFIG_NLS_CODEPAGE_857=y CONFIG_NLS_CODEPAGE_860=y # CONFIG_NLS_CODEPAGE_861 is not set CONFIG_NLS_CODEPAGE_862=y # CONFIG_NLS_CODEPAGE_863 is not set CONFIG_NLS_CODEPAGE_864=y CONFIG_NLS_CODEPAGE_865=y # CONFIG_NLS_CODEPAGE_866 is not set CONFIG_NLS_CODEPAGE_869=y # CONFIG_NLS_CODEPAGE_936 is not set CONFIG_NLS_CODEPAGE_950=y # CONFIG_NLS_CODEPAGE_932 is not set CONFIG_NLS_CODEPAGE_949=y CONFIG_NLS_CODEPAGE_874=y # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y CONFIG_NLS_ISO8859_3=y # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set CONFIG_NLS_ISO8859_7=y # CONFIG_NLS_ISO8859_9 is not set CONFIG_NLS_ISO8859_13=y CONFIG_NLS_ISO8859_14=y CONFIG_NLS_ISO8859_15=y CONFIG_NLS_KOI8_R=y # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_MAC_ROMAN is not set CONFIG_NLS_MAC_CELTIC=y CONFIG_NLS_MAC_CENTEURO=y CONFIG_NLS_MAC_CROATIAN=y CONFIG_NLS_MAC_CYRILLIC=y CONFIG_NLS_MAC_GAELIC=y # CONFIG_NLS_MAC_GREEK is not set CONFIG_NLS_MAC_ICELAND=y CONFIG_NLS_MAC_INUIT=y CONFIG_NLS_MAC_ROMANIAN=y CONFIG_NLS_MAC_TURKISH=y # CONFIG_NLS_UTF8 is not set # CONFIG_DLM is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # # printk and dmesg options # CONFIG_PRINTK_TIME=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 CONFIG_BOOT_PRINTK_DELAY=y CONFIG_DYNAMIC_DEBUG=y # # Compile-time checks and compiler options # CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=y # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_GDB_SCRIPTS is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 # CONFIG_STRIP_ASM_SYMS is not set CONFIG_READABLE_ASM=y CONFIG_UNUSED_SYMBOLS=y # CONFIG_PAGE_OWNER is not set CONFIG_DEBUG_FS=y CONFIG_HEADERS_CHECK=y # CONFIG_DEBUG_SECTION_MISMATCH is not set # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set CONFIG_FRAME_POINTER=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 CONFIG_MAGIC_SYSRQ_SERIAL=y CONFIG_DEBUG_KERNEL=y # # Memory Debugging # CONFIG_PAGE_EXTENSION=y # CONFIG_DEBUG_PAGEALLOC is not set CONFIG_PAGE_POISONING=y # CONFIG_PAGE_POISONING_NO_SANITY is not set # CONFIG_PAGE_POISONING_ZERO is not set # CONFIG_DEBUG_PAGE_REF is not set # CONFIG_DEBUG_RODATA_TEST is not set # CONFIG_DEBUG_OBJECTS is not set CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set # CONFIG_DEBUG_STACK_USAGE is not set CONFIG_DEBUG_VM=y # CONFIG_DEBUG_VM_VMACACHE is not set # CONFIG_DEBUG_VM_RB is not set CONFIG_DEBUG_VM_PGFLAGS=y CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set # CONFIG_DEBUG_MEMORY_INIT is not set CONFIG_DEBUG_PER_CPU_MAPS=y CONFIG_HAVE_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_SHIRQ is not set # # Debug Lockups and Hangs # CONFIG_LOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=1 CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 # CONFIG_WQ_WATCHDOG is not set # CONFIG_PANIC_ON_OOPS is not set CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_PANIC_TIMEOUT=0 CONFIG_SCHED_DEBUG=y CONFIG_SCHED_INFO=y # CONFIG_SCHEDSTATS is not set # CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_TIMEKEEPING is not set # # Lock Debugging (spinlocks, mutexes, etc...) # CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_PROVE_LOCKING is not set CONFIG_LOCK_STAT=y CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set # CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_LOCKDEP=y # CONFIG_DEBUG_LOCKDEP is not set CONFIG_DEBUG_ATOMIC_SLEEP=y CONFIG_DEBUG_LOCKING_API_SELFTESTS=y CONFIG_LOCK_TORTURE_TEST=y # CONFIG_WW_MUTEX_SELFTEST is not set CONFIG_TRACE_IRQFLAGS=y CONFIG_STACKTRACE=y # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_LIST=y CONFIG_DEBUG_PI_LIST=y CONFIG_DEBUG_SG=y # CONFIG_DEBUG_NOTIFIERS is not set CONFIG_DEBUG_CREDENTIALS=y # # RCU Debugging # CONFIG_TORTURE_TEST=y CONFIG_RCU_PERF_TEST=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_RCU_CPU_STALL_TIMEOUT=21 CONFIG_RCU_TRACE=y # CONFIG_RCU_EQS_DEBUG is not set CONFIG_DEBUG_WQ_FORCE_RR_CPU=y # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_FENTRY=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACER_MAX_TRACE=y CONFIG_TRACE_CLOCK=y CONFIG_RING_BUFFER=y CONFIG_EVENT_TRACING=y CONFIG_CONTEXT_SWITCH_TRACER=y CONFIG_RING_BUFFER_ALLOW_SWAP=y CONFIG_TRACING=y CONFIG_GENERIC_TRACER=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y CONFIG_FUNCTION_TRACER=y CONFIG_PREEMPTIRQ_EVENTS=y CONFIG_IRQSOFF_TRACER=y # CONFIG_SCHED_TRACER is not set CONFIG_HWLAT_TRACER=y CONFIG_FTRACE_SYSCALLS=y CONFIG_TRACER_SNAPSHOT=y CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP=y CONFIG_TRACE_BRANCH_PROFILING=y # CONFIG_BRANCH_PROFILE_NONE is not set # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set CONFIG_PROFILE_ALL_BRANCHES=y # CONFIG_BRANCH_TRACER is not set CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set CONFIG_DYNAMIC_FTRACE=y CONFIG_DYNAMIC_FTRACE_WITH_REGS=y # CONFIG_FUNCTION_PROFILER is not set CONFIG_FTRACE_MCOUNT_RECORD=y # CONFIG_FTRACE_STARTUP_TEST is not set # CONFIG_MMIOTRACE is not set CONFIG_TRACING_MAP=y CONFIG_HIST_TRIGGERS=y CONFIG_TRACEPOINT_BENCHMARK=y CONFIG_RING_BUFFER_BENCHMARK=y # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_TRACE_EVAL_MAP_FILE is not set # CONFIG_TRACING_EVENTS_GPIO is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_DMA_API_DEBUG is not set # CONFIG_RUNTIME_TESTING_MENU is not set CONFIG_MEMTEST=y CONFIG_BUG_ON_DATA_CORRUPTION=y # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y CONFIG_UBSAN=y # CONFIG_UBSAN_SANITIZE_ALL is not set # CONFIG_UBSAN_ALIGNMENT is not set # CONFIG_UBSAN_NULL is not set CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y # CONFIG_STRICT_DEVMEM is not set CONFIG_X86_VERBOSE_BOOTUP=y # CONFIG_EARLY_PRINTK is not set CONFIG_X86_PTDUMP_CORE=y # CONFIG_X86_PTDUMP is not set CONFIG_DEBUG_WX=y # CONFIG_DOUBLEFAULT is not set # CONFIG_DEBUG_TLBFLUSH is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2 CONFIG_IO_DELAY_TYPE_NONE=3 # CONFIG_IO_DELAY_0X80 is not set CONFIG_IO_DELAY_0XED=y # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=1 # CONFIG_DEBUG_BOOT_PARAMS is not set # CONFIG_CPA_DEBUG is not set # CONFIG_OPTIMIZE_INLINING is not set # CONFIG_DEBUG_ENTRY is not set # CONFIG_DEBUG_NMI_SELFTEST is not set # CONFIG_X86_DEBUG_FPU is not set CONFIG_PUNIT_ATOM_DEBUG=y CONFIG_UNWINDER_FRAME_POINTER=y # CONFIG_UNWINDER_GUESS is not set # # Security options # CONFIG_KEYS=y CONFIG_PERSISTENT_KEYRINGS=y CONFIG_BIG_KEYS=y CONFIG_TRUSTED_KEYS=y CONFIG_ENCRYPTED_KEYS=y CONFIG_KEY_DH_OPERATIONS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set CONFIG_SECURITYFS=y # CONFIG_FORTIFY_SOURCE is not set # CONFIG_STATIC_USERMODEHELPER is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY="" CONFIG_XOR_BLOCKS=y CONFIG_ASYNC_CORE=y CONFIG_ASYNC_MEMCPY=y CONFIG_ASYNC_XOR=y CONFIG_ASYNC_PQ=y CONFIG_ASYNC_RAID6_RECOV=y CONFIG_CRYPTO=y # # Crypto core or helper # CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_BLKCIPHER=y CONFIG_CRYPTO_BLKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_KPP=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_RSA=y CONFIG_CRYPTO_DH=y CONFIG_CRYPTO_ECDH=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_USER=y CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y CONFIG_CRYPTO_GF128MUL=y CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_NULL2=y # CONFIG_CRYPTO_PCRYPT is not set CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_CRYPTD=y CONFIG_CRYPTO_MCRYPTD=y CONFIG_CRYPTO_AUTHENC=y CONFIG_CRYPTO_SIMD=y CONFIG_CRYPTO_GLUE_HELPER_X86=y CONFIG_CRYPTO_ENGINE=y # # Authenticated Encryption with Associated Data # CONFIG_CRYPTO_CCM=y CONFIG_CRYPTO_GCM=y CONFIG_CRYPTO_CHACHA20POLY1305=y CONFIG_CRYPTO_SEQIV=y CONFIG_CRYPTO_ECHAINIV=y # # Block modes # CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CFB=y CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y CONFIG_CRYPTO_ECB=y # CONFIG_CRYPTO_LRW is not set CONFIG_CRYPTO_PCBC=y CONFIG_CRYPTO_XTS=y CONFIG_CRYPTO_KEYWRAP=y # # Hash modes # CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_XCBC=y CONFIG_CRYPTO_VMAC=y # # Digest # CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRC32C_INTEL=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32_PCLMUL=y CONFIG_CRYPTO_CRCT10DIF=y CONFIG_CRYPTO_GHASH=y CONFIG_CRYPTO_POLY1305=y CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_MICHAEL_MIC=y # CONFIG_CRYPTO_RMD128 is not set # CONFIG_CRYPTO_RMD160 is not set # CONFIG_CRYPTO_RMD256 is not set # CONFIG_CRYPTO_RMD320 is not set CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA3=y CONFIG_CRYPTO_SM3=y CONFIG_CRYPTO_TGR192=y CONFIG_CRYPTO_WP512=y # # Ciphers # CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_AES_TI is not set CONFIG_CRYPTO_AES_586=y CONFIG_CRYPTO_AES_NI_INTEL=y # CONFIG_CRYPTO_ANUBIS is not set CONFIG_CRYPTO_ARC4=y # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_CAMELLIA is not set CONFIG_CRYPTO_CAST_COMMON=y CONFIG_CRYPTO_CAST5=y CONFIG_CRYPTO_CAST6=y CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_FCRYPT=y CONFIG_CRYPTO_KHAZAD=y CONFIG_CRYPTO_SALSA20=y # CONFIG_CRYPTO_SALSA20_586 is not set CONFIG_CRYPTO_CHACHA20=y # CONFIG_CRYPTO_SEED is not set CONFIG_CRYPTO_SERPENT=y CONFIG_CRYPTO_SERPENT_SSE2_586=y # CONFIG_CRYPTO_SM4 is not set CONFIG_CRYPTO_SPECK=y # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_TWOFISH_586 is not set # # Compression # CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y # CONFIG_CRYPTO_842 is not set CONFIG_CRYPTO_LZ4=y CONFIG_CRYPTO_LZ4HC=y # # Random Number Generation # CONFIG_CRYPTO_ANSI_CPRNG=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_DRBG_HMAC=y # CONFIG_CRYPTO_DRBG_HASH is not set CONFIG_CRYPTO_DRBG_CTR=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_USER_API=y CONFIG_CRYPTO_USER_API_HASH=y CONFIG_CRYPTO_USER_API_SKCIPHER=y # CONFIG_CRYPTO_USER_API_RNG is not set # CONFIG_CRYPTO_USER_API_AEAD is not set CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=y CONFIG_CRYPTO_DEV_PADLOCK_AES=y # CONFIG_CRYPTO_DEV_PADLOCK_SHA is not set # CONFIG_CRYPTO_DEV_GEODE is not set CONFIG_CRYPTO_DEV_HIFN_795X=y # CONFIG_CRYPTO_DEV_HIFN_795X_RNG is not set # CONFIG_CRYPTO_DEV_CCP is not set CONFIG_CRYPTO_DEV_QAT=y # CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set # CONFIG_CRYPTO_DEV_QAT_C3XXX is not set CONFIG_CRYPTO_DEV_QAT_C62X=y CONFIG_CRYPTO_DEV_QAT_DH895xCCVF=y CONFIG_CRYPTO_DEV_QAT_C3XXXVF=y CONFIG_CRYPTO_DEV_QAT_C62XVF=y CONFIG_CRYPTO_DEV_CHELSIO=y # CONFIG_CHELSIO_IPSEC_INLINE is not set CONFIG_CRYPTO_DEV_CHELSIO_TLS=y CONFIG_CRYPTO_DEV_VIRTIO=y CONFIG_CRYPTO_DEV_CCREE=y CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y CONFIG_X509_CERTIFICATE_PARSER=y CONFIG_PKCS7_MESSAGE_PARSER=y # CONFIG_PKCS7_TEST_KEY is not set # CONFIG_SIGNED_PE_FILE_VERIFICATION is not set # # Certificates for signature checking # CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SYSTEM_EXTRA_CERTIFICATE=y CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096 CONFIG_SECONDARY_TRUSTED_KEYRING=y # CONFIG_SYSTEM_BLACKLIST_KEYRING is not set CONFIG_HAVE_KVM=y # CONFIG_VIRTUALIZATION is not set CONFIG_BINARY_PRINTF=y # # Library routines # CONFIG_RAID6_PQ=y CONFIG_BITREVERSE=y CONFIG_RATIONAL=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_HAS_FAST_MULTIPLIER=y CONFIG_CRC_CCITT=y CONFIG_CRC16=y CONFIG_CRC_T10DIF=y CONFIG_CRC_ITU_T=y CONFIG_CRC32=y CONFIG_CRC32_SELFTEST=y CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_SLICEBY4 is not set # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set CONFIG_CRC4=y CONFIG_CRC7=y CONFIG_LIBCRC32C=y CONFIG_CRC8=y CONFIG_XXHASH=y CONFIG_AUDIT_GENERIC=y CONFIG_RANDOM32_SELFTEST=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_LZ4_COMPRESS=y CONFIG_LZ4HC_COMPRESS=y CONFIG_LZ4_DECOMPRESS=y CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y CONFIG_XZ_DEC=y CONFIG_XZ_DEC_X86=y CONFIG_XZ_DEC_POWERPC=y CONFIG_XZ_DEC_IA64=y # CONFIG_XZ_DEC_ARM is not set # CONFIG_XZ_DEC_ARMTHUMB is not set # CONFIG_XZ_DEC_SPARC is not set CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_TEST=y CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZ4=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_BCH=y CONFIG_BCH_CONST_PARAMS=y CONFIG_RADIX_TREE_MULTIORDER=y CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y CONFIG_SGL_ALLOC=y CONFIG_DMA_DIRECT_OPS=y CONFIG_DMA_VIRT_OPS=y CONFIG_CHECK_SIGNATURE=y CONFIG_CPUMASK_OFFSTACK=y CONFIG_CPU_RMAP=y CONFIG_DQL=y CONFIG_GLOB=y CONFIG_GLOB_SELFTEST=y CONFIG_NLATTR=y CONFIG_CLZ_TAB=y # CONFIG_CORDIC is not set CONFIG_DDR=y CONFIG_IRQ_POLL=y CONFIG_MPILIB=y CONFIG_LIBFDT=y CONFIG_OID_REGISTRY=y CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_STRING_SELFTEST is not set -------------- next part -------------- #!/bin/sh export_top_env() { export suite='boot' export testcase='boot' export timeout='10m' export job_origin='/lkp/lkp/src/jobs/boot.yaml' export queue='rand' export testbox='vm-lkp-nhm-dp2-yocto-ia32-6' export tbox_group='vm-lkp-nhm-dp2-yocto-ia32' export branch='linus/master' export commit='60cc43fc888428bb2f18f08997432d426a243338' export kconfig='i386-randconfig-c0-04180358' export submit_id='5ad661be0b9a9328f2480bc2' export job_file='/lkp/scheduled/vm-lkp-nhm-dp2-yocto-ia32-6/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180418-10482-1lry5np-0.yaml' export id='f8181b9d3b946852892eaaa1bb6f3d40bb1a0d64' export model='qemu-system-x86_64 -enable-kvm' export nr_vm=16 export nr_cpu=1 export memory='420M' export rootfs='yocto-tiny-i386-2016-04-22.cgz' export need_kconfig='CONFIG_KVM_GUEST=y' export compiler='gcc-7' export enqueue_time='2018-04-18 05:06:06 +0800' export _id='5ad661be0b9a9328f2480bc2' export _rt='/result/boot/1/vm-lkp-nhm-dp2-yocto-ia32/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338' export user='lkp' export tbox_host_file='/lkp/lkp/.src-20180417-175914/hosts/vm-lkp-nhm-dp2-yocto-ia32-6' export verify_tbox_config='true' export kernel='/pkg/linux/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1' export result_root='/result/boot/1/vm-lkp-nhm-dp2-yocto-ia32/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0' export dequeue_time='2018-04-18 05:06:13 +0800' export LKP_SERVER='inn' export max_uptime=600 export initrd='/osimage/yocto/yocto-tiny-i386-2016-04-22.cgz' export bootloader_append='root=/dev/ram0 user=lkp job=/lkp/scheduled/vm-lkp-nhm-dp2-yocto-ia32-6/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180418-10482-1lry5np-0.yaml ARCH=i386 kconfig=i386-randconfig-c0-04180358 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp2-yocto-ia32/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw' export bm_initrd='/osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig.i386_2016-09-03.cgz' export lkp_initrd='/lkp/lkp/lkp-i386.cgz' export site='inn' export LKP_CGI_PORT=80 export LKP_CIFS_PORT=139 export job_initrd='/lkp/scheduled/vm-lkp-nhm-dp2-yocto-ia32-6/boot-1-yocto-tiny-i386-2016-04-22.cgz-60cc43fc888428bb2f18f08997432d426a243338-20180418-10482-1lry5np-0.cgz' [ -n "$LKP_SRC" ] || export LKP_SRC=/lkp/${user:-lkp}/src } run_job() { echo $$ > $TMP/run-job.pid . $LKP_SRC/lib/http.sh . $LKP_SRC/lib/job.sh . $LKP_SRC/lib/env.sh export_top_env run_monitor $LKP_SRC/monitors/one-shot/wrapper boot-slabinfo run_monitor $LKP_SRC/monitors/one-shot/wrapper boot-meminfo run_monitor $LKP_SRC/monitors/one-shot/wrapper memmap run_monitor $LKP_SRC/monitors/no-stdout/wrapper boot-time run_monitor $LKP_SRC/monitors/wrapper kmsg run_monitor $LKP_SRC/monitors/wrapper oom-killer run_monitor $LKP_SRC/monitors/plain/watchdog run_test $LKP_SRC/tests/wrapper sleep 1 } extract_stats() { $LKP_SRC/stats/wrapper boot-slabinfo $LKP_SRC/stats/wrapper boot-meminfo $LKP_SRC/stats/wrapper memmap $LKP_SRC/stats/wrapper boot-memory $LKP_SRC/stats/wrapper boot-time $LKP_SRC/stats/wrapper kernel-size $LKP_SRC/stats/wrapper kmsg $LKP_SRC/stats/wrapper time sleep.time $LKP_SRC/stats/wrapper time $LKP_SRC/stats/wrapper dmesg $LKP_SRC/stats/wrapper kmsg $LKP_SRC/stats/wrapper stderr $LKP_SRC/stats/wrapper last_state } "$@" -------------- next part -------------- #!/bin/bash # To reproduce, # 1) save job-script and this script (both are attached in 0day report email) # 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH kernel=$1 initrds=( /osimage/yocto/yocto-tiny-i386-2016-04-22.cgz /lkp/lkp/lkp-i386.cgz /osimage/deps/debian-x86_64-2016-08-31.cgz/run-ipconfig.i386_2016-09-03.cgz ) HTTP_PREFIX=https://github.com/0day-ci/lkp-qemu/raw/master wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}" { cat "${initrds[@]//*\//}" [[ $INSTALL_MOD_PATH ]] && ( cd "$INSTALL_MOD_PATH" find lib | cpio -o -H newc --quiet | gzip ) echo job-script | cpio -o -H newc --quiet | gzip } > initrd.img kvm=( qemu-system-x86_64 -enable-kvm -kernel $kernel -initrd initrd.img -m 420 -smp 1 -device e1000,netdev=net0 -netdev user,id=net0 -boot order=nc -no-reboot -watchdog i6300esb -watchdog-action debug -rtc base=localtime -serial stdio -display none -monitor null ) append=( ip=::::vm-lkp-nhm-dp2-yocto-ia32-6::dhcp root=/dev/ram0 user=lkp job=/job-script ARCH=i386 kconfig=i386-randconfig-c0-04180358 branch=linus/master commit=60cc43fc888428bb2f18f08997432d426a243338 BOOT_IMAGE=/pkg/linux/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/vmlinuz-4.17.0-rc1 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nhm-dp2-yocto-ia32/yocto-tiny-i386-2016-04-22.cgz/i386-randconfig-c0-04180358/gcc-7/60cc43fc888428bb2f18f08997432d426a243338/0 result_service=tmpfs debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw drbd.minor_count=8 rcuperf.shutdown=0 ) "${kvm[@]}" -append "${append[*]}" From torvalds at linux-foundation.org Wed Apr 18 18:37:21 2018 From: torvalds at linux-foundation.org (Linus Torvalds) Date: Wed, 18 Apr 2018 11:37:21 -0700 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb In-Reply-To: <20180418134058.l3orjjxcpv7cxjfw@wfg-t540p.sh.intel.com> References: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> <20180418134058.l3orjjxcpv7cxjfw@wfg-t540p.sh.intel.com> Message-ID: Ugh, that lustre code is disgusting. I thought we were getting rid of it. Anyway, I started looking at why the stack trace is such an incredible mess, with lots of stale entries. The reason (well, _one_ reason) seems to be "ksocknal_startup". It has a 500-byte stack frame for some incomprehensible reason. I assume due to excessive inlining, because the function itself doesn't seem to be that bad. Similarly, LNetNIInit has a 300-byte stack frame. So it gets pretty deep. I'm getting the feeling that KASAN is making things worse because probably it's disabling all the sane stack frame stuff (ie no merging of stack slot entries, perhaps?). Without KASAN (but also without a lot of other things, so I might be blaming KASAN incorrectly), the stack usage of ksocknal_startup() is just under 100 bytes, so if it is KASAN, it's really a big difference. Anyway, apart from the excessive elements, the report seems fine, but I'm adding Neil Brown to the cc, since he's the one that has been making most of the lustre/lnet changes this merge window. Also adding Andrey to check about the oddly large stack usage. Not including the whole email with the attachements - Neil, it's on lkml and lustre-devel if you hadn't seen it. Linus From simmonsja at ornl.gov Wed Apr 18 21:56:44 2018 From: simmonsja at ornl.gov (Simmons, James A.) Date: Wed, 18 Apr 2018 21:56:44 +0000 Subject: [lustre-devel] [PATCH 00/20] staging: lustre: convert to rhashtable In-Reply-To: <87y3hlqk3w.fsf@notabene.neil.brown.name> References: <152348312863.12394.11915752362061083241.stgit@noble> , <87y3hlqk3w.fsf@notabene.neil.brown.name> Message-ID: <1524088604572.29145@ornl.gov> >>> libcfs in lustre has a resizeable hashtable. >>> Linux already has a resizeable hashtable, rhashtable, which is better >>> is most metrics. See https://lwn.net/Articles/751374/ in a few days >>> for an introduction to rhashtable. >> >> Thansk for starting this work. I was think about cleaning the libcfs >> hash but your port to rhashtables is way better. How did you gather >> metrics to see that rhashtable was better than libcfs hash? > >Code inspection and reputation. It is hard to beat inlined lockless >code for lookups. And rhashtable is heavily used in the network >subsystem and they are very focused on latency there. I'm not sure that >insertion is as fast as it can be (I have some thoughts on that) but I'm >sure lookup will be better. >I haven't done any performance testing myself, only correctness. Sorry this email never reached my infradead account so I'm replying from my work account. I was just wondering if numbers were gathered. I'm curious how well this would scale on some HPC cluster. In any case I can do a comparison with and without the patches on one of my test clusters and share the numbers with you using real world work loads. >>> This series converts lustre to use rhashtable. This affects several >>> different tables, and each is different is various ways. >>> >>> There are two outstanding issues. One is that a bug in rhashtable >>> means that we cannot enable auto-shrinking in one of the tables. That >>> is documented as appropriate and should be fixed soon. >>> >>> The other is that rhashtable has an atomic_t which counts the elements >>> in a hash table. At least one table in lustre went to some trouble to >>> avoid any table-wide atomics, so that could lead to a regression. >>> I'm hoping that rhashtable can be enhanced with the option of a >>> per-cpu counter, or similar. >>> >> >> This doesn't sound quite ready to land just yet. This will have to do some >> soak testing and a larger scope of test to make sure no new regressions >> happen. Believe me I did work to make lustre work better on tickless >> systems, which I'm preparing for the linux client, and small changes could >> break things in interesting ways. I will port the rhashtable change to the >> Intel developement branch and get people more familar with the hash code >> to look at it. > >Whether it is "ready" or not probably depends on perspective and >priorities. As I see it, getting lustre cleaned up and out of staging >is a fairly high priority, and it will require a lot of code change. >It is inevitable that regressions will slip in (some already have) and >it is important to keep testing (the test suite is of great benefit, but >is only part of the story of course). But to test the code, it needs to >land. Testing the code in Intel's devel branch and then porting it >across doesn't really prove much. For testing to be meaningful, it >needs to be tested in a branch that up-to-date with mainline and on >track to be merged into mainline. > >I have no particular desire to rush this in, but I don't see any >particular benefit in delaying it either. > >I guess I see staging as implicitly a 'devel' branch. You seem to be >treating it a bit like a 'stable' branch - is that right? So two years ago no one would touch the linux Lustre client due to it being so broken. Then after about a year of work the client got into sort of working state. Even to the point actual sites are using it. It still is broken and guess who gets notified of the brokenness :-) The good news is that people do actually test it but if it regress to much we will lose our testing audience. Sadly its a chicken and egg problem. Yes I want to see it leave staging but I like the Lustre client to be in good working order. If it leaves staging still broken and no one uses it then their is not much point. So to understand why I work with the Intel development branch and linux kernel version I need to explain my test setup. So I test at different levels. At level one I have my generic x86 nodes and x86 server back ends. Pretty vanilla and the scale is pretty small. 3 servers nodes and a couple of clients. In the environment I can easily test the upstream client. This is not VMs but real hardware and real storage back end. Besides x86 client nodes for level one testing I also have Power9 ppc nodes. Also its possible for me to test the upstream client directly. In case you want to know nope lustre doesn't work out of the box for Power9. The IB stack needs fixing and we need to handle 64K pages at the LNet layer. I have work that resolves those issues. The fixes need to be pushed upstream. Next I have an ARM client cluster to test with which runs a newer kernel that is "offical". When we first got the cluster I stomped all over it but discovered I had to share it and the other parties involved were not to happy with my experimenting. The ARM system had the same issues as the Power9 so now it works. Once the upstream client is in better shape I think I could subject the other users of the system to try it out. I have been told the ARM vendor has a strong interest in the linux lustre client as well. Once I'm done with that testing I moved to my personal Cray test cluster. Sadly Cray has unique hardware so if I use the latest vanilla upstream kernel that unique hardware no longer works which makes the test bed pretty much useless. Since I have to work with an older kernel I back port the linux kernel client work and run test to make sure to works. On that cluster I can run real HPC work loads. Lastly if the work shows itself stable at this point I see if I can put it on a Cray development system that users at my workplace test on. If the user scream things are broken then I find out how they break it. General users are very creative at find ways to break things that we wouldn't think of. >I think we have a better chance of being heard if we have "skin in the >game" and have upstream code that would use this. I agree. I just want a working base line that users can work with :-) For me landing the rhashtable work is only the beginning. Its behavior at very large scales needs to be examined to find any potential bottlenecks. Which bring me to the next point since this is cross posting to the lustre-devel list. For me the largest test cluster I can get my hands on is 80 nodes. Would anyone be willing to donate test time on their test bed clusters to help out in this work. It would be really awesome to test on a many thousand node system. I will be at the Lustre User Group Conference next week so if you want to meet up with me to discuss details I would love to help you set up your test cluster so we really can exercise these changes. From neilb at suse.com Wed Apr 18 22:38:10 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 19 Apr 2018 08:38:10 +1000 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb In-Reply-To: References: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> <20180418134058.l3orjjxcpv7cxjfw@wfg-t540p.sh.intel.com> Message-ID: <87k1t4qgx9.fsf@notabene.neil.brown.name> On Wed, Apr 18 2018, Linus Torvalds wrote: > Ugh, that lustre code is disgusting. > > I thought we were getting rid of it. Lots of people seem to get value out of it. So we're trying to polish the code to make it less disgusting. This is just a little fall-out. The smoking gun is [ 6.528851] LNetError: 1:0:(module.c:546:libcfs_init()) misc_register: error -16 lustre registers a misc char device with the same number as USERIO. If they both try to register, one fails. Until recently, lustre could only be built as a module so when lustre failed to register the char dev, the module-load fails. Now it can be built monolithic (makes my testing easier) and the failure mode is different. The module that tried to register the chardev rewinds some initialization, and a subsequent module assumes that init was done, and explodes. There are patches in Greg's inbox to change lustre to use a dynamically allocated minor. And it is on my todo list to get lustre to do less initialization at module-init time (where, in a monolithic build, it is hard to give up if some previous module failed), and more at mount time. So this is a known bug (maybe a new manifestation) and a fix has been posted. There is certainly room for lots more cleanup and that is slowly happening. I'll make a note to look into the large stack frames you observed. Previous report of bug was Subject: [staging] 184ecc5ceb: BUG:unable_to_handle_kernel Message-ID: <20180319091931.gt6ijdw7ahkbtvrq at inn> Thanks, NeilBrown > > Anyway, I started looking at why the stack trace is such an incredible > mess, with lots of stale entries. > > The reason (well, _one_ reason) seems to be "ksocknal_startup". It has > a 500-byte stack frame for some incomprehensible reason. I assume due > to excessive inlining, because the function itself doesn't seem to be > that bad. > > Similarly, LNetNIInit has a 300-byte stack frame. So it gets pretty deep. > > I'm getting the feeling that KASAN is making things worse because > probably it's disabling all the sane stack frame stuff (ie no merging > of stack slot entries, perhaps?). > > Without KASAN (but also without a lot of other things, so I might be > blaming KASAN incorrectly), the stack usage of ksocknal_startup() is > just under 100 bytes, so if it is KASAN, it's really a big difference. > > Anyway, apart from the excessive elements, the report seems fine, but > I'm adding Neil Brown to the cc, since he's the one that has been > making most of the lustre/lnet changes this merge window. > > Also adding Andrey to check about the oddly large stack usage. > > Not including the whole email with the attachements - Neil, it's on > lkml and lustre-devel if you hadn't seen it. > > Linus -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From aryabinin at virtuozzo.com Thu Apr 19 13:55:28 2018 From: aryabinin at virtuozzo.com (Andrey Ryabinin) Date: Thu, 19 Apr 2018 16:55:28 +0300 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb In-Reply-To: References: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> <20180418134058.l3orjjxcpv7cxjfw@wfg-t540p.sh.intel.com> Message-ID: On 04/19/2018 04:35 PM, Andrey Ryabinin wrote: > > > On 04/18/2018 09:37 PM, Linus Torvalds wrote: >> Ugh, that lustre code is disgusting. >> >> I thought we were getting rid of it. >> >> Anyway, I started looking at why the stack trace is such an incredible >> mess, with lots of stale entries. >> >> The reason (well, _one_ reason) seems to be "ksocknal_startup". It has >> a 500-byte stack frame for some incomprehensible reason. I assume due >> to excessive inlining, because the function itself doesn't seem to be >> that bad. >> >> Similarly, LNetNIInit has a 300-byte stack frame. So it gets pretty deep. >> >> I'm getting the feeling that KASAN is making things worse because >> probably it's disabling all the sane stack frame stuff (ie no merging >> of stack slot entries, perhaps?). >> > > AFAIR no merging of stack slots policy enabled only if -fsanitize-address-use-after-scope > is on (which is CONFIG_KASAN_EXTRA). This feature does cause sometimes significant stack bloat, > but hasn't been proven to be very useful, so I wouldn't mind disabling it completely. > > So far I know only about a single BUG - https://lkml.kernel.org/r/<151238865557.4852.10258661301122491354 at mail.alporthouse.com> > it has found. Actually, there is one more - https://syzkaller.appspot.com/bug?id=6a929b72a32ca0b1a6985126fa1bc77c03c12304 so two bugs. > There are also a lot of other I didn't finish this sentence: There are also a lot of other reports about use-after-scope, but seem all of them are false positives caused by STRUCTLEAK plugin. From aryabinin at virtuozzo.com Thu Apr 19 13:35:08 2018 From: aryabinin at virtuozzo.com (Andrey Ryabinin) Date: Thu, 19 Apr 2018 16:35:08 +0300 Subject: [lustre-devel] [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb In-Reply-To: References: <20180418133831.uef7d77ejdyjtxgh@wfg-t540p.sh.intel.com> <20180418134058.l3orjjxcpv7cxjfw@wfg-t540p.sh.intel.com> Message-ID: On 04/18/2018 09:37 PM, Linus Torvalds wrote: > Ugh, that lustre code is disgusting. > > I thought we were getting rid of it. > > Anyway, I started looking at why the stack trace is such an incredible > mess, with lots of stale entries. > > The reason (well, _one_ reason) seems to be "ksocknal_startup". It has > a 500-byte stack frame for some incomprehensible reason. I assume due > to excessive inlining, because the function itself doesn't seem to be > that bad. > > Similarly, LNetNIInit has a 300-byte stack frame. So it gets pretty deep. > > I'm getting the feeling that KASAN is making things worse because > probably it's disabling all the sane stack frame stuff (ie no merging > of stack slot entries, perhaps?). > AFAIR no merging of stack slots policy enabled only if -fsanitize-address-use-after-scope is on (which is CONFIG_KASAN_EXTRA). This feature does cause sometimes significant stack bloat, but hasn't been proven to be very useful, so I wouldn't mind disabling it completely. So far I know only about a single BUG - https://lkml.kernel.org/r/<151238865557.4852.10258661301122491354 at mail.alporthouse.com> it has found. There are also a lot of other > Without KASAN (but also without a lot of other things, so I might be > blaming KASAN incorrectly), the stack usage of ksocknal_startup() is > just under 100 bytes, so if it is KASAN, it's really a big difference. > Yes, it's because of KASAN: CONFIG_KASAN=n socklnd.c:2795:1:ksocknal_startup 144 static CONFIG_KASAN=y CONFIG_KASAN_OUTLINE=y CONFIG_KASAN_EXTRA=n socklnd.c:2795:1:ksocknal_startup 552 static CONFIG_KASAN=y CONFIG_KASAN_OUTLINE=y CONFIG_KASAN_EXTRA=y socklnd.c:2795:1:ksocknal_startup 624 static It's expected that KASAN may cause sometimes significant stack usage growth. This is needed to catch out-of-bounds accesses to stack data. When compiler can't proof that access to stack variable is valid (e.g. reference to stack variable passed to some external function), it will create redzones around such stack variable. E.g. ksocknal_enumerate_interfaces() which is called only from ksocknal_startup(), thus probably inlined into ksocknal_startup() does this: for (i = j = 0; i < n; i++) { int up; __u32 ip; __u32 mask; if (!strcmp(names[i], "lo")) /* skip the loopback IF */ continue; rc = lnet_ipif_query(names[i], &up, &ip, &mask); With KASAN stack might look something like this: [32-byte left redzone of the stack frame] [up (4 bytes)] [28-bytes redzone][ip (4 bytes)] [28-bytes redzone][mask (4 bytes)] [28-bytes redzone][32-byte right redzone of the stack frame] GCC always use 32-bytes redzones. AFAIK clang is more smart about this, it has adaptive redzone policy - smaller redzones for small variables, and bigger for big. In this particular case, the best way to reduce stack usage is to refactor the code. 1) Drop 'int *up' argument from lnet_ipif_query(). When interface is down lnet_ipif_query() sets up to zero and doesn't return error. But all callers treat up == 0 as error. So instead, lnet_ipif_query() should simply return error code, and 'up' won't be needed. This will simplify the code, and should drop the stack usage with KASAN and without KASAN. 2) Instead of using local ip, mask variables, pass pointers '&net->ksnn_interfaces[j].ksni_ipaddr', '&net->ksnn_interfaces[j].ksni_netmask'. As in 1) this should alst drop the stack usage both with KASAN and without KASAN From amir.shehata.whamcloud at gmail.com Thu Apr 19 18:04:59 2018 From: amir.shehata.whamcloud at gmail.com (Amir Shehata) Date: Thu, 19 Apr 2018 11:04:59 -0700 Subject: [lustre-devel] LNET Configuration Update/Reconciliation In-Reply-To: References: Message-ID: One thing to note is that lnetctl still doesn't cover all the configuration that can be done via module params. We're trying to get it there. There was actually a ticket that was recently opened: https://jira.hpdd.intel.com/browse/LU-10930 Please look at my comment there. Currently if configuring the system via lnetctl it will ignore the module parameters it handles. This was done to avoid conflicts with existing module parameter and to give precedence to configurations done via lnetctl. Having a feature like what you're describing would be a good extension to lnetctl and allow it to handle conflicts. Would be good if you open an LU ticket to track this change. thanks amir On 16 April 2018 at 13:52, Di Natale, Giuseppe wrote: > In theory, lnetctl itself is the exporter. Once modprobe.conf settings are > loaded, lnetctl export will get you most of the way there (default values > for tunables and such are exported as well). If you're already using > lnetctl, it can export the current configuration (again, including > tunables, etc). > > > As for migrating from lnetctl back to modprobe.conf, I wasn't planning on > tackling that. > > > What I am trying to implement is a method of "reconciling" the current > configuration with a newly imported one. So to start, let us assume lnet > has some configuration x. Let's say you make changes to the YAML file (add > a few new routes, remove a network, maybe remove a route) producing > configuration y. I want to implement a feature in lnetctl that will take > the currently loaded configuration (in this case, configuration x) and turn > it into configuration y without taking down connections unless it's > necessary. > > Giuseppe > ------------------------------ > *From:* Ben Evans > *Sent:* Friday, April 13, 2018 7:01:15 AM > *To:* Di Natale, Giuseppe; lustre-devel at lists.lustre.org > *Subject:* Re: [lustre-devel] LNET Configuration Update/Reconciliation > > In LU-4939, I'm working on exporting and importing the parameters set via > lctl conf_param and set_param -P. The output is in yaml, and I've got an > importer working in a separate patch that has yet to be accepted upstream. > > Would you consider having an exporter for the lnetctl and modprobe.conf > settings into yaml so that you could migrate between the two methods of > setting configuration? > > From: lustre-devel on behalf of > "Di Natale, Giuseppe" > Date: Thursday, April 12, 2018 at 3:53 PM > To: "lustre-devel at lists.lustre.org" > Subject: [lustre-devel] LNET Configuration Update/Reconciliation > > Greetings Developers, > > > We are currently using modprobe.conf to configure routes, but we are > hoping to reach a point where we can push out new LNET configurations to > nodes and have lnetctl apply configuration changes on the fly. > > > It would be nice to have the ability to update or "reconcile" the > difference between the loaded configuration and an updated configuration > being imported. I was exploring how to implement such functionality in > lnetctl. Would others find such functionality useful? > > > My current thought is that I'd implement this as a new lnetctl subcommand > (i.e. "update"). Does that seem reasonable or would you suggest another > interface? > > > Thanks, > > Giuseppe > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.drokin at intel.com Sat Apr 21 03:42:29 2018 From: oleg.drokin at intel.com (Oleg Drokin) Date: Fri, 20 Apr 2018 23:42:29 -0400 Subject: [lustre-devel] New tag 2.11.51 Message-ID: Hello! I just tagged 2.11.51 in Lustre master development branch. Here’s the changelog: Alex Zhuravlev (2): LU-9273 tests: disable random I/O in replay-ost-single/5 LU-10833 tests: missing sed command Alexander Boyko (1): LU-10889 ptlrpc: update req timeout if resending happened Alexey Lyashkov (1): LU-10877 lu: fix reference leak Andreas Dilger (5): LU-10830 utils: fix create mode for lfs setstripe LU-10264 mdc: fix possible NULL pointer dereference LU-10698 obdclass: allow specifying complex jobids LU-10898 tests: disable failing conf-sanity test LU-1187 idl: remove obsolete directory split flags Andriy Skulysh (2): LU-10643 ptlrpc: ptlrpc_register_bulk() LBUG on ENOMEM LU-10841 ldlm: ASSERTION(lock->l_granted_mode!=lock->l_req_mode) Ann Koehler (1): LU-10649 llite: yield cpu after call to ll_agl_trigger Ben Evans (3): LU-10629 lod: Clear OST pool with setstripe LU-4939 obdclass: llog_print params file LU-4939 tests: fix typo in sanity.sh Bob Glossman (3): LU-10845 kernel: kernel update [SLES12 SP3 4.4.120-94.17] LU-10847 kernel update [SLES12 SP2 4.4.120-92.70] LU-10847 doc: fix broken ChangeLog Bruno Faccini (1): LU-10826 ptlrpc: fix test_req_buffer_pressure behavior Dmitry Eremin (1): LU-4423 obdclass: use workqueue for zombie management Elena Gryaznova (1): LU-10834 tests: fix cleanup_77c() defect Emoly Liu (2): LU-10703 nodemap: save and clear fileset correctly LU-8913 nodemap: fix nodemap range format '*@' support Fan Yong (5): LU-10761 osd-ldiskfs: not create REMOTE_PARENT_DIR on OST LU-10773 obdclass: yield cpu during changelog_block_trim_ext LU-10598 obdclass: ignore IGIF formatted last_id LU-10887 lfsck: offer shard's mode when re-create it LU-10732 tests: sanity-lfsck to reset speed limit Hongchao Zhang (2): LU-8999 quota: fix issue of multiple call of seq start LU-10368 mdc: resend quotactl if needed James Nunez (4): LU-10461 tests: call exit in the skip routine LU-9444 tests: replace SINGLEMDS1 with SINGLEMDS LU-10710 tests: fix run_write_disjoint line continuation LU-9586 tests: remove replay-dual 15c from ALWAYS_EXCEPT James Simmons (3): LU-10752 build: fix rpm packaging issues for gss LU-10157 lnet: make LNET_MAX_IOV dependent on page size LU-10869 build: package configuration files for Ubuntu / Debian Jian Yu (1): LU-10835 tests: unload dm-flakey module Jinshan Xiong (1): LU-10779 llite: rename FSFILT_IOC_* to system flags John L. Hammond (11): LU-10383 hsm: remove struct hsm_thread_data LU-10383 hsm: add action count to hsm scan data LU-10383 hsm: ignore compound_id LU-10541 llite: setxattr directly in ll_set_acl LU-10792 llite: remove unused parameters from md_{get,set}xattr() LU-10788 llite: pass flags through __vfs_setxattr() LU-10787 llite: correct removexattr detection LU-10785 llite: use xattr_handler name for ACLs LU-10819 o2ib: use splice in kiblnd_peer_connect_failed() LU-10912 mdc: use large xattr buffers for old servers LU-10699 hsm: remove struct hsm_compat_data_cb Li Dongyang (2): LU-10560 mdt: remove extra headers from mdt_identity.c LU-10805 lnet: switch to module_param Liang Zhen (2): LU-6032 ldlm: don't disable softirq for exp_rpc_lock LU-6032 obdclass: new wrapper to convert NID to string Mike Marciniszyn (2): LU-10560 libcfs: Use kernel_write when appropriate LU-10560 libcfs: Fix inconsistent declaration for cfs_kernel_write() Mikhail Pershin (1): LU-7420 echo: fix echo server to work with unified target Minh Diep (1): LU-10566 test: fix nfs exports clean up Nathaniel Clark (2): LU-9551 utils: add l_tunedisk to fix disk tunings LU-10901 build: Update ZFS/SPL to 0.7.8 Oleg Drokin (2): LU-10766 utils: Correct error handling in llapi_dir_create New tag 2.11.51 Patrick Farrell (1): LU-10776 osc: Do not request more than 2GiB grant Qian Yingjin (1): LU-10802 nrs: mismatch problem for wildcard in jobid TBF Steve Guminski (1): LU-5170 lfs: Standardize error messages in lfs_changelog() Teddy Chan (1): LU-9658 ptlrpc: Add QoS for uid and gid in NRS-TBF Vladimir Saveliev (1): LU-6632 mgs: dont remove EXCLUDE records on lctl replace_nids Wang Shilong (3): LU-10837 ldiskfs: skip bitmap check if block bitmap is uninitialized LU-10795 quota: fix wrong skipping of reintegration LU-10859 ldiskfs: fix deadlock with heavy memory preassure Yang Sheng (3): LU-10565 osd: bi_error, pagevec_init, PAGE_CACHE_SHIFT changes LU-10565 osd: unify interface for vfs LU-10565 osd: move ext4_tranfer_project to osd dilip krishnagiri (2): LU-9592 tests: remove sanity-quota tests from ALWAYS_EXCEPT LU-9043 test: remove conf-sanity test 24a ALWAYS_EXCEPT From gregkh at linuxfoundation.org Mon Apr 23 12:58:27 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 14:58:27 +0200 Subject: [lustre-devel] [PATCH 00/22] staging: lustre: llite: fix xattr handling In-Reply-To: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> References: <1523852111-17321-1-git-send-email-jsimmons@infradead.org> Message-ID: <20180423125827.GA32162@kroah.com> On Mon, Apr 16, 2018 at 12:14:49AM -0400, James Simmons wrote: > From: James Simmons > > Lustre utilities and user land APIs heavly depend on special xattr > handling. Sadly much of the xattr handling for lustre client has > been broken for awhile. This is all the fixes needed to make xattr > handling work properly with the latest kernels. Most of these now applied, please rebase and fix up the remaining ones when resending. thanks, greg k-h From gregkh at linuxfoundation.org Mon Apr 23 12:58:51 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 14:58:51 +0200 Subject: [lustre-devel] [PATCH 00/25] staging: lustre: libcfs: SMP rework In-Reply-To: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> References: <1523851807-16573-1-git-send-email-jsimmons@infradead.org> Message-ID: <20180423125851.GB32162@kroah.com> On Mon, Apr 16, 2018 at 12:09:42AM -0400, James Simmons wrote: > Recently lustre support has been expanded to extreme machines with as > many as a 1000+ cores. On the other end lustre also has been ported > to platforms like ARM and KNL which have uniquie NUMA and core setup. > For example some devices exist that have NUMA nodes with no cores. > With these new platforms the limitations of the Lustre's SMP code > came to light so a lot of work was needed. This resulted in this > patch set which has been tested on these platforms. I'll wait for v2 of this patchset based on Dan's review before applying them. thanks, greg k-h From gregkh at linuxfoundation.org Mon Apr 23 13:03:17 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 15:03:17 +0200 Subject: [lustre-devel] [PATCH 1/6] staging: lustre: move stack-check macros to libcfs_debug.h In-Reply-To: <87a7u1s1fi.fsf@notabene.neil.brown.name> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935730.23409.6748888065027051683.stgit@noble> <87a7u1s1fi.fsf@notabene.neil.brown.name> Message-ID: <20180423130317.GA17153@kroah.com> On Wed, Apr 18, 2018 at 12:17:37PM +1000, NeilBrown wrote: > On Mon, Apr 16 2018, James Simmons wrote: > > >> CDEBUG_STACK() and CHECK_STACK() are macros to help with > >> debugging, so move them from > >> drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h > >> to > >> drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h > >> > >> This seems a more fitting location, and is a step towards > >> removing linux/libcfs.h and simplifying the include file structure. > > > > Nak. Currently the lustre client always enables debugging but that > > shouldn't be the case. What we do need is the able to turn off the > > crazy debugging stuff. In the development branch of lustre it is > > done with CDEBUG_ENABLED. We need something like that in Kconfig > > much like we have CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK. Since we like > > to be able to turn that off this should be moved to just after > > LIBCFS_DEBUG_MSG_DATA_DECL. Then from CHECK_STACK down to CWARN() > > it can be build out. When CDEBUG_ENABLED is disabled CDEBUG_LIMIT > > would be empty. > > So why, exactly, is this an argument to justify a NAK? > Are you just saying that the code I moved into libcfs_debug.h should be > moved to somewhere a bit later in the file? > That can easily be done when it is needed. It isn't needed now so why > insist on it? > > Each patch should do one thing and make clear forward progress. This > patch gets rid of an unnecessary file and brings related code together. > I think that qualifies. I agree, this just deletes an unused file, it changes no functionality at all. Now applied. greg k-h From gregkh at linuxfoundation.org Mon Apr 23 13:03:47 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 15:03:47 +0200 Subject: [lustre-devel] [PATCH 2/6] staging: lustre: remove libcfs/linux/libcfs.h In-Reply-To: <874lk9s0ri.fsf@notabene.neil.brown.name> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935734.23409.11654775387996961581.stgit@noble> <874lk9s0ri.fsf@notabene.neil.brown.name> Message-ID: <20180423130347.GB17153@kroah.com> On Wed, Apr 18, 2018 at 12:32:01PM +1000, NeilBrown wrote: > On Mon, Apr 16 2018, James Simmons wrote: > > >> This include file is only included in one place, > >> and only contains a list of other include directives. > >> So just move all those to the place where this file > >> is included, and discard the file. > >> > >> One include directive uses a local name ("linux-cpu.h"), so > >> that needs to be given a proper path. > >> > >> Probably many of these should be remove from here, and moved to > >> just the files that need them. > > > > Nak. Dumping all the extra headers from linux/libcfs.h to libcfs.h is > > the wrong approach. The one header, libcfs.h, to be the only header > > in all lustre files is the wrong approach. I have been looking to > > unroll that mess. I have patch that I need to polish you that I can > > submit. > > I think we both have the same goal - maybe just different paths to get > there. If you have something nearly ready to submit, I'm happy to wait > for it, then proceed on top of it. I've taken this patch as it doesn't make anything worse than the total mess we have now :) thanks, greg k-h From gregkh at linuxfoundation.org Mon Apr 23 13:08:37 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 15:08:37 +0200 Subject: [lustre-devel] [PATCH 00/20] staging: lustre: convert to rhashtable In-Reply-To: <152348312863.12394.11915752362061083241.stgit@noble> References: <152348312863.12394.11915752362061083241.stgit@noble> Message-ID: <20180423130837.GA25183@kroah.com> On Thu, Apr 12, 2018 at 07:54:48AM +1000, NeilBrown wrote: > libcfs in lustre has a resizeable hashtable. > Linux already has a resizeable hashtable, rhashtable, which is better > is most metrics. See https://lwn.net/Articles/751374/ in a few days > for an introduction to rhashtable. > > This series converts lustre to use rhashtable. This affects several > different tables, and each is different is various ways. > > There are two outstanding issues. One is that a bug in rhashtable > means that we cannot enable auto-shrinking in one of the tables. That > is documented as appropriate and should be fixed soon. > > The other is that rhashtable has an atomic_t which counts the elements > in a hash table. At least one table in lustre went to some trouble to > avoid any table-wide atomics, so that could lead to a regression. > I'm hoping that rhashtable can be enhanced with the option of a > per-cpu counter, or similar. > > > I have enabled automatic shrinking on all tables where it makes sense > and doesn't trigger the bug. I have also removed all hints concerning > min/max size - I cannot see how these could be useful. > > The dump_pgcache debugfs file provided some interesting challenges. I > think I have cleaned it up enough so that it all makes sense. An > extra pair of eyes examining that code in particular would be > appreciated. > > This series passes all the same tests that pass before the patches are > applied. I've taken the first 4 patches of this series, as they were "obviously correct". I'll let you and James argue about the rest. Feel free to resend when there's some sort of agreement. thanks, greg k-h From gregkh at linuxfoundation.org Mon Apr 23 13:12:27 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 15:12:27 +0200 Subject: [lustre-devel] [PATCH 5/6] staging: lustre: move misc-device registration closer to related code. In-Reply-To: <152383935745.23409.17743342143483291145.stgit@noble> References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935745.23409.17743342143483291145.stgit@noble> Message-ID: <20180423131227.GA7401@kroah.com> On Mon, Apr 16, 2018 at 10:42:37AM +1000, NeilBrown wrote: > The ioctl handler for the misc device is in lnet/libcfs/module.c > but is it registered in lnet/libcfs/linux/linux-module.c. > > Keeping related code together make maintenance easier, so move the > code. > > Signed-off-by: NeilBrown This and patch 6/6 did not apply due to something else changing these files before these were sent in. Can you rebase and resend? thanks, greg k-h From gregkh at linuxfoundation.org Mon Apr 23 13:13:59 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 15:13:59 +0200 Subject: [lustre-devel] [PATCH 3/6] staging: lustre: remove include/linux/libcfs/linux/linux-cpu.h In-Reply-To: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935737.23409.2271901486597092772.stgit@noble> Message-ID: <20180423131359.GA11836@kroah.com> On Mon, Apr 16, 2018 at 04:52:55AM +0100, James Simmons wrote: > > > This include file contains definitions used when CONFIG_SMP > > is in effect. Other includes contain corresponding definitions > > for when it isn't. > > This can be hard to follow, so move the definitions to the one place. > > > > As HAVE_LIBCFS_CPT is defined precisely when CONFIG_SMP, we discard > > that macro and just use CONFIG_SMP when needed. > > Nak. The lustre SMP is broken and needed to badly be reworked. I have it > ready and can push it. I was waiting to see if I had to rebase it once > the rc1 stuff but since their is a push to get everything out their I will > push it. A NAK on some future code that might show up someday is not how we work at all, sorry. That has caused other open source projects to die. First patch submitted "wins". And these are good patches. Nothing wrong with them, they clean stuff up, remove more lines than they added and that's the proper thing to do here. So I've applied the first 4, the last two didn't apply due to changes from you that were accepted. See, you benifit also from this :) thanks, greg k-h From gregkh at linuxfoundation.org Mon Apr 23 13:16:48 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 23 Apr 2018 15:16:48 +0200 Subject: [lustre-devel] [PATCH 08/17] staging: lustre: add container_of_safe() In-Reply-To: <152229760847.27689.4969508646445147289.stgit@noble> References: <152229732768.27689.4800156943561963977.stgit@noble> <152229760847.27689.4969508646445147289.stgit@noble> Message-ID: <20180423131648.GA13997@kroah.com> On Thu, Mar 29, 2018 at 03:26:48PM +1100, NeilBrown wrote: > Luster has a container_of0() function which is similar to > container_of() but passes an IS_ERR_OR_NULL() pointer through > unchanged. > This could be generally useful: bcache at last has a similar function. > > Naming is hard, but the precedent set by hlist_entry_safe() suggests > a _safe suffix might be most consistent. > > So add container_of_safe() to kernel.h, and replace all occurrences of > container_of0() with one of > - list_first_entry, list_next_entry, when that is a better fit, > - container_of(), when the pointer is used as a validpointer in > surrounding code, > - container_of_safe() when there is no obviously better alternative. I'm loath to add a kernel.h define for a staging driver, but this does seem sane. Nice work. greg k-h From jrdr.linux at gmail.com Sat Apr 21 22:17:24 2018 From: jrdr.linux at gmail.com (Souptick Joarder) Date: Sun, 22 Apr 2018 03:47:24 +0530 Subject: [lustre-devel] [PATCH] staging: lustre: Change return type to vm_fault_t Message-ID: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder --- drivers/staging/lustre/lustre/llite/llite_mmap.c | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index c0533bd..6aafe7c 100644 --- a/drivers/staging/lustre/lustre/llite/llite_mmap.c +++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c @@ -231,7 +231,7 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage, return result; } -static inline int to_fault_error(int result) +static inline vm_fault_t to_fault_error(int result) { switch (result) { case 0: @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) * \retval VM_FAULT_ERROR on general error * \retval NOPAGE_OOM not have memory for allocate new page */ -static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) +static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) { struct lu_env *env; struct cl_io *io; @@ -269,7 +269,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) struct page *vmpage; unsigned long ra_flags; int result = 0; - int fault_ret = 0; + vm_fault_t fault_ret = 0; u16 refcheck; env = cl_env_get(&refcheck); @@ -278,7 +278,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) io = ll_fault_io_init(env, vma, vmf->pgoff, &ra_flags); if (IS_ERR(io)) { - result = to_fault_error(PTR_ERR(io)); + fault_ret = to_fault_error(PTR_ERR(io)); goto out; } @@ -319,7 +319,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) if (result != 0 && !(fault_ret & VM_FAULT_RETRY)) fault_ret |= to_fault_error(result); - CDEBUG(D_MMAP, "%s fault %d/%d\n", current->comm, fault_ret, result); + CDEBUG(D_MMAP, "%s fault %x/%d\n", current->comm, fault_ret, result); return fault_ret; } @@ -327,7 +327,7 @@ static int ll_fault(struct vm_fault *vmf) { int count = 0; bool printed = false; - int result; + vm_fault_t result; sigset_t set; /* Only SIGKILL and SIGTERM are allowed for fault/nopage/mkwrite @@ -370,12 +370,13 @@ static int ll_page_mkwrite(struct vm_fault *vmf) int count = 0; bool printed = false; bool retry; - int result; + int err; + vm_fault_t ret; file_update_time(vma->vm_file); do { retry = false; - result = ll_page_mkwrite0(vma, vmf->page, &retry); + err = ll_page_mkwrite0(vma, vmf->page, &retry); if (!printed && ++count > 16) { const struct dentry *de = vma->vm_file->f_path.dentry; @@ -387,25 +388,25 @@ static int ll_page_mkwrite(struct vm_fault *vmf) } } while (retry); - switch (result) { + switch (err) { case 0: LASSERT(PageLocked(vmf->page)); - result = VM_FAULT_LOCKED; + ret = VM_FAULT_LOCKED; break; case -ENODATA: case -EAGAIN: case -EFAULT: - result = VM_FAULT_NOPAGE; + ret = VM_FAULT_NOPAGE; break; case -ENOMEM: - result = VM_FAULT_OOM; + ret = VM_FAULT_OOM; break; default: - result = VM_FAULT_SIGBUS; + ret = VM_FAULT_SIGBUS; break; } - return result; + return ret; } /** -- 1.9.1 From willy at infradead.org Sun Apr 22 03:20:52 2018 From: willy at infradead.org (Matthew Wilcox) Date: Sat, 21 Apr 2018 20:20:52 -0700 Subject: [lustre-devel] [PATCH] staging: lustre: Change return type to vm_fault_t In-Reply-To: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> References: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> Message-ID: <20180422032052.GH14610@bombadil.infradead.org> On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: > @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) > * \retval VM_FAULT_ERROR on general error > * \retval NOPAGE_OOM not have memory for allocate new page > */ > -static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) > +static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) > { > struct lu_env *env; > struct cl_io *io; Did you compile-test this with the sparse changes? Because I can see a problem here: env = cl_env_get(&refcheck); if (IS_ERR(env)) return PTR_ERR(env); > @@ -269,7 +269,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) > struct page *vmpage; > unsigned long ra_flags; > int result = 0; > - int fault_ret = 0; > + vm_fault_t fault_ret = 0; What odd indentation ... From dan.carpenter at oracle.com Thu Apr 26 05:58:27 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Thu, 26 Apr 2018 08:58:27 +0300 Subject: [lustre-devel] [PATCH] staging: kernel.h: Prevent macro expantion bug in container_of_safe() Message-ID: <20180426055827.GA18346@mwanda> There aren't many users of this so it doesn't cause a problem, but we obviously want to use "__mptr" here instead of "ptr" to prevent the parameter from being executed twice. Signed-off-by: Dan Carpenter diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b5a8e78c6c75..593fb8d250a2 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -978,7 +978,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ !__same_type(*(ptr), void), \ "pointer type mismatch in container_of()"); \ - IS_ERR_OR_NULL(ptr) ? ERR_CAST(ptr) : \ + IS_ERR_OR_NULL(__mptr) ? ERR_CAST(__mptr) : \ ((type *)(__mptr - offsetof(type, member))); }) /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ From neilb at suse.com Thu Apr 26 06:14:10 2018 From: neilb at suse.com (NeilBrown) Date: Thu, 26 Apr 2018 16:14:10 +1000 Subject: [lustre-devel] [PATCH] staging: kernel.h: Prevent macro expantion bug in container_of_safe() In-Reply-To: <20180426055827.GA18346@mwanda> References: <20180426055827.GA18346@mwanda> Message-ID: <87bme6mr4d.fsf@notabene.neil.brown.name> On Thu, Apr 26 2018, Dan Carpenter wrote: > There aren't many users of this so it doesn't cause a problem, but we > obviously want to use "__mptr" here instead of "ptr" to prevent the > parameter from being executed twice. > > Signed-off-by: Dan Carpenter > > diff --git a/include/linux/kernel.h b/include/linux/kernel.h > index b5a8e78c6c75..593fb8d250a2 100644 > --- a/include/linux/kernel.h > +++ b/include/linux/kernel.h > @@ -978,7 +978,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } > BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ > !__same_type(*(ptr), void), \ > "pointer type mismatch in container_of()"); \ > - IS_ERR_OR_NULL(ptr) ? ERR_CAST(ptr) : \ > + IS_ERR_OR_NULL(__mptr) ? ERR_CAST(__mptr) : \ > ((type *)(__mptr - offsetof(type, member))); }) > > /* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */ Arg, of course. Thanks. Acked-by: NeilBrown Thanks, NeilBrown -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From jrdr.linux at gmail.com Mon Apr 23 18:08:17 2018 From: jrdr.linux at gmail.com (Souptick Joarder) Date: Mon, 23 Apr 2018 23:38:17 +0530 Subject: [lustre-devel] [PATCH] staging: lustre: Change return type to vm_fault_t In-Reply-To: <20180423173547.GB13383@bombadil.infradead.org> References: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> <20180422032052.GH14610@bombadil.infradead.org> <20180423173547.GB13383@bombadil.infradead.org> Message-ID: On Mon, Apr 23, 2018 at 11:05 PM, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 10:12:30PM +0530, Souptick Joarder wrote: >> On Sun, Apr 22, 2018 at 8:50 AM, Matthew Wilcox wrote: >> > On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: >> >> @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) >> >> * \retval VM_FAULT_ERROR on general error >> >> * \retval NOPAGE_OOM not have memory for allocate new page >> >> */ >> >> -static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) >> >> +static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) >> >> { >> >> struct lu_env *env; >> >> struct cl_io *io; >> > >> > Did you compile-test this with the sparse changes? Because I can see >> > a problem here: >> >> Yes, compile-tested. Sparse didn't throw any warning/error. > > I think you need to check your setup ... I get this: > > drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: warning: incorrect type in return expression (different base types) > drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: expected restricted vm_fault_t > drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: got long What I am trying is - after applying the patch in 4.17-rc1, enable the configuration for this driver and do "make c=1/2 -j8" Let me verify again. From willy at infradead.org Mon Apr 23 17:35:47 2018 From: willy at infradead.org (Matthew Wilcox) Date: Mon, 23 Apr 2018 10:35:47 -0700 Subject: [lustre-devel] [PATCH] staging: lustre: Change return type to vm_fault_t In-Reply-To: References: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> <20180422032052.GH14610@bombadil.infradead.org> Message-ID: <20180423173547.GB13383@bombadil.infradead.org> On Mon, Apr 23, 2018 at 10:12:30PM +0530, Souptick Joarder wrote: > On Sun, Apr 22, 2018 at 8:50 AM, Matthew Wilcox wrote: > > On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: > >> @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) > >> * \retval VM_FAULT_ERROR on general error > >> * \retval NOPAGE_OOM not have memory for allocate new page > >> */ > >> -static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) > >> +static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) > >> { > >> struct lu_env *env; > >> struct cl_io *io; > > > > Did you compile-test this with the sparse changes? Because I can see > > a problem here: > > Yes, compile-tested. Sparse didn't throw any warning/error. I think you need to check your setup ... I get this: drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: warning: incorrect type in return expression (different base types) drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: expected restricted vm_fault_t drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: got long From willy at infradead.org Mon Apr 23 19:15:31 2018 From: willy at infradead.org (Matthew Wilcox) Date: Mon, 23 Apr 2018 12:15:31 -0700 Subject: [lustre-devel] [PATCH] staging: lustre: Change return type to vm_fault_t In-Reply-To: References: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> <20180422032052.GH14610@bombadil.infradead.org> <20180423173547.GB13383@bombadil.infradead.org> Message-ID: <20180423191531.GD13383@bombadil.infradead.org> On Mon, Apr 23, 2018 at 11:38:17PM +0530, Souptick Joarder wrote: > On Mon, Apr 23, 2018 at 11:05 PM, Matthew Wilcox wrote: > > I think you need to check your setup ... I get this: > > > > drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: warning: incorrect type in return expression (different base types) > > drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: expected restricted vm_fault_t > > drivers/staging/lustre/lustre/llite/llite_mmap.c:277:31: got long > > What I am trying is - > after applying the patch in 4.17-rc1, enable the configuration > for this driver and do "make c=1/2 -j8" > > Let me verify again. Yep, but you need to add the sparse annotations to make vm_fault_t a separate type. In case you've lost that patch ... diff --git a/include/linux/mm.h b/include/linux/mm.h index ad06d42adb1a..9ac6d2eb633f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1174,52 +1175,6 @@ static inline void clear_page_pfmemalloc(struct page *page) page->index = 0; } -/* - * Different kinds of faults, as returned by handle_mm_fault(). - * Used to decide whether a process gets delivered SIGBUS or - * just gets major/minor fault counters bumped up. - */ - -#define VM_FAULT_OOM 0x0001 -#define VM_FAULT_SIGBUS 0x0002 -#define VM_FAULT_MAJOR 0x0004 -#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ -#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ -#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ -#define VM_FAULT_SIGSEGV 0x0040 - -#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ -#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ -#define VM_FAULT_RETRY 0x0400 /* ->fault blocked, must retry */ -#define VM_FAULT_FALLBACK 0x0800 /* huge page fault failed, fall back to small */ -#define VM_FAULT_DONE_COW 0x1000 /* ->fault has fully handled COW */ -#define VM_FAULT_NEEDDSYNC 0x2000 /* ->fault did not modify page tables - * and needs fsync() to complete (for - * synchronous page faults in DAX) */ - -#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \ - VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \ - VM_FAULT_FALLBACK) - -#define VM_FAULT_RESULT_TRACE \ - { VM_FAULT_OOM, "OOM" }, \ - { VM_FAULT_SIGBUS, "SIGBUS" }, \ - { VM_FAULT_MAJOR, "MAJOR" }, \ - { VM_FAULT_WRITE, "WRITE" }, \ - { VM_FAULT_HWPOISON, "HWPOISON" }, \ - { VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \ - { VM_FAULT_SIGSEGV, "SIGSEGV" }, \ - { VM_FAULT_NOPAGE, "NOPAGE" }, \ - { VM_FAULT_LOCKED, "LOCKED" }, \ - { VM_FAULT_RETRY, "RETRY" }, \ - { VM_FAULT_FALLBACK, "FALLBACK" }, \ - { VM_FAULT_DONE_COW, "DONE_COW" }, \ - { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" } - -/* Encode hstate index for a hwpoisoned large page */ -#define VM_FAULT_SET_HINDEX(x) ((x) << 12) -#define VM_FAULT_GET_HINDEX(x) (((x) >> 12) & 0xf) - /* * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. */ diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index fd1af6b9591d..5265f425fe88 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -610,6 +610,54 @@ static inline bool mm_tlb_flush_nested(struct mm_struct *mm) struct vm_fault; +/* + * Different kinds of faults, as returned from fault handlers. + * Used to decide whether a process gets delivered SIGBUS or + * just gets major/minor fault counters bumped up. + */ +typedef __bitwise unsigned int vm_fault_t; +enum { + VM_FAULT_OOM = (__force vm_fault_t)0x000001, /* Out Of Memory */ + VM_FAULT_SIGBUS = (__force vm_fault_t)0x000002, /* Bad access */ + VM_FAULT_MAJOR = (__force vm_fault_t)0x000004, /* Page read from storage */ + VM_FAULT_WRITE = (__force vm_fault_t)0x000008, /* Special case for get_user_pages */ + VM_FAULT_HWPOISON = (__force vm_fault_t)0x000010, /* Hit poisoned small page */ + VM_FAULT_HWPOISON_LARGE = (__force vm_fault_t)0x000020, /* Hit poisoned large page. Index encoded in upper bits */ + VM_FAULT_SIGSEGV = (__force vm_fault_t)0x000040, + VM_FAULT_NOPAGE = (__force vm_fault_t)0x000100, /* ->fault installed the pte, not return page */ + VM_FAULT_LOCKED = (__force vm_fault_t)0x000200, /* ->fault locked the returned page */ + VM_FAULT_RETRY = (__force vm_fault_t)0x000400, /* ->fault blocked, must retry */ + VM_FAULT_FALLBACK = (__force vm_fault_t)0x000800, /* huge page fault failed, fall back to small */ + VM_FAULT_DONE_COW = (__force vm_fault_t)0x001000, /* ->fault has fully handled COW */ + VM_FAULT_NEEDDSYNC = (__force vm_fault_t)0x002000, /* ->fault did not modify page tables + * and needs fsync() to complete (for + * synchronous page faults in DAX) */ + VM_FAULT_HINDEX_MASK = (__force vm_fault_t)0x0f0000, +}; + +/* Encode hstate index for a hwpoisoned large page */ +#define VM_FAULT_SET_HINDEX(x) ((x) << 16) +#define VM_FAULT_GET_HINDEX(x) (((x) >> 16) & 0xf) + +#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \ + VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \ + VM_FAULT_FALLBACK) + +#define VM_FAULT_RESULT_TRACE \ + { VM_FAULT_OOM, "OOM" }, \ + { VM_FAULT_SIGBUS, "SIGBUS" }, \ + { VM_FAULT_MAJOR, "MAJOR" }, \ + { VM_FAULT_WRITE, "WRITE" }, \ + { VM_FAULT_HWPOISON, "HWPOISON" }, \ + { VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \ + { VM_FAULT_SIGSEGV, "SIGSEGV" }, \ + { VM_FAULT_NOPAGE, "NOPAGE" }, \ + { VM_FAULT_LOCKED, "LOCKED" }, \ + { VM_FAULT_RETRY, "RETRY" }, \ + { VM_FAULT_FALLBACK, "FALLBACK" }, \ + { VM_FAULT_DONE_COW, "DONE_COW" }, \ + { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" } + struct vm_special_mapping { const char *name; /* The name, e.g. "[vdso]". */ From jrdr.linux at gmail.com Mon Apr 23 16:42:30 2018 From: jrdr.linux at gmail.com (Souptick Joarder) Date: Mon, 23 Apr 2018 22:12:30 +0530 Subject: [lustre-devel] [PATCH] staging: lustre: Change return type to vm_fault_t In-Reply-To: <20180422032052.GH14610@bombadil.infradead.org> References: <20180421221723.GA3054@jordon-HP-15-Notebook-PC> <20180422032052.GH14610@bombadil.infradead.org> Message-ID: On Sun, Apr 22, 2018 at 8:50 AM, Matthew Wilcox wrote: > On Sun, Apr 22, 2018 at 03:47:24AM +0530, Souptick Joarder wrote: >> @@ -261,7 +261,7 @@ static inline int to_fault_error(int result) >> * \retval VM_FAULT_ERROR on general error >> * \retval NOPAGE_OOM not have memory for allocate new page >> */ >> -static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) >> +static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) >> { >> struct lu_env *env; >> struct cl_io *io; > > Did you compile-test this with the sparse changes? Because I can see > a problem here: Yes, compile-tested. Sparse didn't throw any warning/error. > > env = cl_env_get(&refcheck); > if (IS_ERR(env)) > return PTR_ERR(env); > >> @@ -269,7 +269,7 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) >> struct page *vmpage; >> unsigned long ra_flags; >> int result = 0; >> - int fault_ret = 0; >> + vm_fault_t fault_ret = 0; > > What odd indentation ... Sorry, will correct it. > From mail at gmelikov.ru Sat Apr 28 08:13:49 2018 From: mail at gmelikov.ru (George Melikov) Date: Sat, 28 Apr 2018 11:13:49 +0300 Subject: [lustre-devel] `lfs check` misleading documentation Message-ID: <1466991524903229@web24g.yandex.ru> Hello, I've found that `lfs check` command documentation and arguments are misleading, it is used to check targets, not servers, as documentation states (or am I wrong?). I didn't found the better place for patches or discussions (can't find how to register in Jira), so I propose a patch here. I'll be glad if someone can give me the right direction for such cases. >From 2aaf4fa4a12ce38d283725410f4f7d0f3b1488ab Mon Sep 17 00:00:00 2001 From: George Melikov Date: Fri, 20 Apr 2018 15:27:00 +0300 Subject: [PATCH] Fix `lfs check` documentation and arguments --- lustre/doc/lfs.1 | 8 +++++--- lustre/utils/lfs.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lustre/doc/lfs.1 b/lustre/doc/lfs.1 index 29cd139519..714785fa63 100644 --- a/lustre/doc/lfs.1 +++ b/lustre/doc/lfs.1 @@ -7,7 +7,7 @@ lfs \- client utility for Lustre-specific file layout and other attributes .br .B lfs changelog_clear .br -.B lfs check +.B lfs check .br .B lfs data_version [-n] \fB\fR .br @@ -151,8 +151,10 @@ interest to a particular consumer , potentially allowing the MDT to free up disk space. An of 0 indicates the current last record. Changelog consumers must be registered on the MDT node using \fBlctl\fR. .TP -.B check -Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs) +.B check +Check and display the status of MDTs or OSTs (as specified in the command) +or all (MDTs and OSTs). \fBmds\fR and \fBservers\fR arguments are equal to +\fBmdts\fR and \fBall\fR, respectively, and remain for backward compatibility only. .TP .B data_version [-n] Display current version of file data. If -n is specified, data version is read diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 4dcb8f31a1..a7a9de9e73 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -5152,9 +5152,9 @@ static int lfs_check(int argc, char **argv) if (strcmp(argv[1], "osts") == 0) { strcpy(obd_types[0], "osc"); - } else if (strcmp(argv[1], "mds") == 0) { + } else if (strcmp(argv[1], "mds") == 0 || strcmp(argv[1], "mdts") == 0) { strcpy(obd_types[0], "mdc"); - } else if (strcmp(argv[1], "servers") == 0) { + } else if (strcmp(argv[1], "servers") == 0 || strcmp(argv[1], "all") == 0) { num_types = 2; strcpy(obd_types[0], "osc"); strcpy(obd_types[1], "mdc"); -- 2.14.2 ____________________________________ Sincerely, George Melikov, Tel. 7-915-278-39-36 Skype: georgemelikov From peter.a.jones at intel.com Sat Apr 28 14:11:25 2018 From: peter.a.jones at intel.com (Jones, Peter A) Date: Sat, 28 Apr 2018 14:11:25 +0000 Subject: [lustre-devel] `lfs check` misleading documentation In-Reply-To: <1466991524903229@web24g.yandex.ru> References: <1466991524903229@web24g.yandex.ru> Message-ID: <754C609F-837B-4A01-ADA0-50346D85D67F@intel.com> George If you find apparent errors in the manual the place to register this is the Lustre Documentation project - https://jira.hpdd.intel.com/projects/LUDOC . I have set you up with a JIRA account - you should have received an automated email with login credentials. Unfortunately we have removed the self registration option recently after the site was targeted by spammers and instead there are detailed of an alias to send a request for an account. Peter On 2018-04-28, 1:13 AM, "lustre-devel on behalf of George Melikov" wrote: >Hello, > >I've found that `lfs check` command documentation and arguments are misleading, >it is used to check targets, not servers, as documentation states (or am I wrong?). > >I didn't found the better place for patches or discussions (can't find how to register in Jira), >so I propose a patch here. > >I'll be glad if someone can give me the right direction for such cases. > >From 2aaf4fa4a12ce38d283725410f4f7d0f3b1488ab Mon Sep 17 00:00:00 2001 >From: George Melikov >Date: Fri, 20 Apr 2018 15:27:00 +0300 >Subject: [PATCH] Fix `lfs check` documentation and arguments > >--- > lustre/doc/lfs.1 | 8 +++++--- > lustre/utils/lfs.c | 4 ++-- > 2 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/lustre/doc/lfs.1 b/lustre/doc/lfs.1 >index 29cd139519..714785fa63 100644 >--- a/lustre/doc/lfs.1 >+++ b/lustre/doc/lfs.1 >@@ -7,7 +7,7 @@ lfs \- client utility for Lustre-specific file layout and other attributes > .br > .B lfs changelog_clear > .br >-.B lfs check >+.B lfs check > .br > .B lfs data_version [-n] \fB\fR > .br >@@ -151,8 +151,10 @@ interest to a particular consumer , potentially allowing the MDT to > free up disk space. An of 0 indicates the current last record. > Changelog consumers must be registered on the MDT node using \fBlctl\fR. > .TP >-.B check >-Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs) >+.B check >+Check and display the status of MDTs or OSTs (as specified in the command) >+or all (MDTs and OSTs). \fBmds\fR and \fBservers\fR arguments are equal to >+\fBmdts\fR and \fBall\fR, respectively, and remain for backward compatibility only. > .TP > .B data_version [-n] > Display current version of file data. If -n is specified, data version is read >diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c >index 4dcb8f31a1..a7a9de9e73 100644 >--- a/lustre/utils/lfs.c >+++ b/lustre/utils/lfs.c >@@ -5152,9 +5152,9 @@ static int lfs_check(int argc, char **argv) > > if (strcmp(argv[1], "osts") == 0) { > strcpy(obd_types[0], "osc"); >- } else if (strcmp(argv[1], "mds") == 0) { >+ } else if (strcmp(argv[1], "mds") == 0 || strcmp(argv[1], "mdts") == 0) { > strcpy(obd_types[0], "mdc"); >- } else if (strcmp(argv[1], "servers") == 0) { >+ } else if (strcmp(argv[1], "servers") == 0 || strcmp(argv[1], "all") == 0) { > num_types = 2; > strcpy(obd_types[0], "osc"); > strcpy(obd_types[1], "mdc"); >-- >2.14.2 > >____________________________________ >Sincerely, >George Melikov, >Tel. 7-915-278-39-36 >Skype: georgemelikov >_______________________________________________ >lustre-devel mailing list >lustre-devel at lists.lustre.org >http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From andreas.dilger at intel.com Sat Apr 28 16:04:25 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Sat, 28 Apr 2018 16:04:25 +0000 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv In-Reply-To: <1524872704-13391-1-git-send-email-wang6495@umn.edu> References: <1524872704-13391-1-git-send-email-wang6495@umn.edu> Message-ID: <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> On Apr 27, 2018, at 17:45, Wenwen Wang wrote: > [PATCH] staging: luster: llite: fix potential missing-check bug when copying lumv (typo) s/luster/lustre/ > In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space > using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is > LOV_USER_MAGIV_V3, lumv3 will be modified by the second copy from the user (typo) s/MAGIV/MAGIC/ > space. The second copy is necessary, because the two versions (i.e., > lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. > However, given that the user data resides in the user space, a malicious > user-space process can race to change the data between the two copies. By > doing so, the attacker can provide a data with an inconsistent version, > e.g., v1 version + v3 data. This can lead to logical errors in the > following execution in ll_dir_setstripe(), which performs different actions > according to the version specified by the field lmm_magic. This isn't a serious bug in the end. The LOV_USER_MAGIC_V3 check just copies a bit more data from userspace (the lmm_pool field). It would be more of a problem if the reverse was possible (copy smaller V1 buffer, but change the magic to LOV_USER_MAGIC_V3 afterward), but this isn't possible since the second copy is not done if there is a V1 magic. If the user changes from V3 magic to V1 in a racy manner it means less data will be used than copied, which is harmless. > This patch rechecks the version field lmm_magic in the second copy. If the > version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be > returned: -EINVAL. This isn't a bad idea in any case, since it verifies the data copied from userspace is still valid. Cheers, Andreas > Signed-off-by: Wenwen Wang > --- > drivers/staging/lustre/lustre/llite/dir.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c > index d10d272..80d44ca 100644 > --- a/drivers/staging/lustre/lustre/llite/dir.c > +++ b/drivers/staging/lustre/lustre/llite/dir.c > @@ -1185,6 +1185,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) > if (lumv1->lmm_magic == LOV_USER_MAGIC_V3) { > if (copy_from_user(&lumv3, lumv3p, sizeof(lumv3))) > return -EFAULT; > + if (lumv3.lmm_magic != LOV_USER_MAGIC_V3) > + return -EINVAL; > } > > if (is_root_inode(inode)) > -- > 2.7.4 > Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From andreas.dilger at intel.com Sat Apr 28 22:18:21 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Sat, 28 Apr 2018 22:18:21 +0000 Subject: [lustre-devel] `lfs check` misleading documentation In-Reply-To: <1466991524903229@web24g.yandex.ru> References: <1466991524903229@web24g.yandex.ru> Message-ID: George, thanks for the patches. Note that despite Peter's comments, the right place for this ticket is in the Lustre (LU) project, because it is a change that needs to be applied to the Lustre source tree. For issues with the Lustre User Manual the right project is indeed LUDOC as Peter suggested. If you are feeling particularly adventurous, you could split off the "lfs check" command into its own "lfs-check.1" man page, as is being done with other commands such as "lfs-setstripe.1", etc. This allows more space to describe each command and all the arguments, as well as provide examples. Cheers, Andreas > On Apr 28, 2018, at 02:13, George Melikov wrote: > > Hello, > > I've found that `lfs check` command documentation and arguments are misleading, > it is used to check targets, not servers, as documentation states (or am I wrong?). > > I didn't found the better place for patches or discussions (can't find how to register in Jira), > so I propose a patch here. > > I'll be glad if someone can give me the right direction for such cases. > > From 2aaf4fa4a12ce38d283725410f4f7d0f3b1488ab Mon Sep 17 00:00:00 2001 > From: George Melikov > Date: Fri, 20 Apr 2018 15:27:00 +0300 > Subject: [PATCH] Fix `lfs check` documentation and arguments > > --- > lustre/doc/lfs.1 | 8 +++++--- > lustre/utils/lfs.c | 4 ++-- > 2 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/lustre/doc/lfs.1 b/lustre/doc/lfs.1 > index 29cd139519..714785fa63 100644 > --- a/lustre/doc/lfs.1 > +++ b/lustre/doc/lfs.1 > @@ -7,7 +7,7 @@ lfs \- client utility for Lustre-specific file layout and other attributes > .br > .B lfs changelog_clear > .br > -.B lfs check > +.B lfs check > .br > .B lfs data_version [-n] \fB\fR > .br > @@ -151,8 +151,10 @@ interest to a particular consumer , potentially allowing the MDT to > free up disk space. An of 0 indicates the current last record. > Changelog consumers must be registered on the MDT node using \fBlctl\fR. > .TP > -.B check > -Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs) > +.B check > +Check and display the status of MDTs or OSTs (as specified in the command) > +or all (MDTs and OSTs). \fBmds\fR and \fBservers\fR arguments are equal to > +\fBmdts\fR and \fBall\fR, respectively, and remain for backward compatibility only. > .TP > .B data_version [-n] > Display current version of file data. If -n is specified, data version is read > diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c > index 4dcb8f31a1..a7a9de9e73 100644 > --- a/lustre/utils/lfs.c > +++ b/lustre/utils/lfs.c > @@ -5152,9 +5152,9 @@ static int lfs_check(int argc, char **argv) > > if (strcmp(argv[1], "osts") == 0) { > strcpy(obd_types[0], "osc"); > - } else if (strcmp(argv[1], "mds") == 0) { > + } else if (strcmp(argv[1], "mds") == 0 || strcmp(argv[1], "mdts") == 0) { > strcpy(obd_types[0], "mdc"); > - } else if (strcmp(argv[1], "servers") == 0) { > + } else if (strcmp(argv[1], "servers") == 0 || strcmp(argv[1], "all") == 0) { > num_types = 2; > strcpy(obd_types[0], "osc"); > strcpy(obd_types[1], "mdc"); > -- > 2.14.2 > > ____________________________________ > Sincerely, > George Melikov, > Tel. 7-915-278-39-36 > Skype: georgemelikov > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From gregkh at linuxfoundation.org Sun Apr 29 13:20:58 2018 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Sun, 29 Apr 2018 15:20:58 +0200 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv In-Reply-To: <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> References: <1524872704-13391-1-git-send-email-wang6495@umn.edu> <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> Message-ID: <20180429132058.GB5972@kroah.com> On Sat, Apr 28, 2018 at 04:04:25PM +0000, Dilger, Andreas wrote: > On Apr 27, 2018, at 17:45, Wenwen Wang wrote: > > [PATCH] staging: luster: llite: fix potential missing-check bug when copying lumv > > (typo) s/luster/lustre/ > > > In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space > > using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is > > LOV_USER_MAGIV_V3, lumv3 will be modified by the second copy from the user > > (typo) s/MAGIV/MAGIC/ > > > space. The second copy is necessary, because the two versions (i.e., > > lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. > > However, given that the user data resides in the user space, a malicious > > user-space process can race to change the data between the two copies. By > > doing so, the attacker can provide a data with an inconsistent version, > > e.g., v1 version + v3 data. This can lead to logical errors in the > > following execution in ll_dir_setstripe(), which performs different actions > > according to the version specified by the field lmm_magic. > > This isn't a serious bug in the end. The LOV_USER_MAGIC_V3 check just copies > a bit more data from userspace (the lmm_pool field). It would be more of a > problem if the reverse was possible (copy smaller V1 buffer, but change the > magic to LOV_USER_MAGIC_V3 afterward), but this isn't possible since the second > copy is not done if there is a V1 magic. If the user changes from V3 magic > to V1 in a racy manner it means less data will be used than copied, which > is harmless. > > > This patch rechecks the version field lmm_magic in the second copy. If the > > version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be > > returned: -EINVAL. > > This isn't a bad idea in any case, since it verifies the data copied from > userspace is still valid. So you agree with this patch? Or do not? confused, greg k-h From dan.carpenter at oracle.com Mon Apr 30 11:15:35 2018 From: dan.carpenter at oracle.com (Dan Carpenter) Date: Mon, 30 Apr 2018 14:15:35 +0300 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv In-Reply-To: References: <1524872704-13391-1-git-send-email-wang6495@umn.edu> <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> <20180429132058.GB5972@kroah.com> Message-ID: <20180430111535.gnycdzkok7cgi3ue@mwanda> On Sun, Apr 29, 2018 at 03:58:55PM -0500, Wenwen Wang wrote: > It is worth fixing this bug, since it offers an opportunity for adversaries > to provide inconsistent user data. In addition to the unwanted version > LOV_USER_MAGIC_V1, a malicious user can also use the version > LMV_USER_MAGIC, which is also unexpected but allowed in the function > ll_dir_setstripe(). These inconsistent data can cause potential logical > errors in the following execution. Hence it is necessary to re-verify the > data copied from userspace. > This change doesn't really prevent any bugs in current kernels since LMV_USER_MAGIC is the same thing as LOV_USER_MAGIC_V1 and the users are allowed to use LOV_USER_MAGIC_V1 if they want. But we should probably verify it just to make the code easier to read and because there are static analysis tools which will warn about read verify re-read type bugs. regards, dan carpenter From wang6495 at umn.edu Sun Apr 29 20:58:55 2018 From: wang6495 at umn.edu (Wenwen Wang) Date: Sun, 29 Apr 2018 15:58:55 -0500 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv In-Reply-To: <20180429132058.GB5972@kroah.com> References: <1524872704-13391-1-git-send-email-wang6495@umn.edu> <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> <20180429132058.GB5972@kroah.com> Message-ID: On Sun, Apr 29, 2018 at 8:20 AM, Greg Kroah-Hartman wrote: > On Sat, Apr 28, 2018 at 04:04:25PM +0000, Dilger, Andreas wrote: >> On Apr 27, 2018, at 17:45, Wenwen Wang wrote: >> > [PATCH] staging: luster: llite: fix potential missing-check bug when copying lumv >> >> (typo) s/luster/lustre/ >> >> > In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space >> > using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is >> > LOV_USER_MAGIV_V3, lumv3 will be modified by the second copy from the user >> >> (typo) s/MAGIV/MAGIC/ >> >> > space. The second copy is necessary, because the two versions (i.e., >> > lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. >> > However, given that the user data resides in the user space, a malicious >> > user-space process can race to change the data between the two copies. By >> > doing so, the attacker can provide a data with an inconsistent version, >> > e.g., v1 version + v3 data. This can lead to logical errors in the >> > following execution in ll_dir_setstripe(), which performs different actions >> > according to the version specified by the field lmm_magic. >> >> This isn't a serious bug in the end. The LOV_USER_MAGIC_V3 check just copies >> a bit more data from userspace (the lmm_pool field). It would be more of a >> problem if the reverse was possible (copy smaller V1 buffer, but change the >> magic to LOV_USER_MAGIC_V3 afterward), but this isn't possible since the second >> copy is not done if there is a V1 magic. If the user changes from V3 magic >> to V1 in a racy manner it means less data will be used than copied, which >> is harmless. >> >> > This patch rechecks the version field lmm_magic in the second copy. If the >> > version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be >> > returned: -EINVAL. >> >> This isn't a bad idea in any case, since it verifies the data copied from >> userspace is still valid. > > So you agree with this patch? Or do not? > > confused, > > greg k-h It is worth fixing this bug, since it offers an opportunity for adversaries to provide inconsistent user data. In addition to the unwanted version LOV_USER_MAGIC_V1, a malicious user can also use the version LMV_USER_MAGIC, which is also unexpected but allowed in the function ll_dir_setstripe(). These inconsistent data can cause potential logical errors in the following execution. Hence it is necessary to re-verify the data copied from userspace. Thanks! Wenwen From wang6495 at umn.edu Fri Apr 27 23:45:02 2018 From: wang6495 at umn.edu (Wenwen Wang) Date: Fri, 27 Apr 2018 18:45:02 -0500 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv Message-ID: <1524872704-13391-1-git-send-email-wang6495@umn.edu> In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is LOV_USER_MAGIV_V3, lumv3 will be modified by the second copy from the user space. The second copy is necessary, because the two versions (i.e., lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. However, given that the user data resides in the user space, a malicious user-space process can race to change the data between the two copies. By doing so, the attacker can provide a data with an inconsistent version, e.g., v1 version + v3 data. This can lead to logical errors in the following execution in ll_dir_setstripe(), which performs different actions according to the version specified by the field lmm_magic. This patch rechecks the version field lmm_magic in the second copy. If the version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be returned: -EINVAL. Signed-off-by: Wenwen Wang --- drivers/staging/lustre/lustre/llite/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index d10d272..80d44ca 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1185,6 +1185,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (lumv1->lmm_magic == LOV_USER_MAGIC_V3) { if (copy_from_user(&lumv3, lumv3p, sizeof(lumv3))) return -EFAULT; + if (lumv3.lmm_magic != LOV_USER_MAGIC_V3) + return -EINVAL; } if (is_root_inode(inode)) -- 2.7.4 From andreas.dilger at intel.com Mon Apr 30 22:38:30 2018 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Mon, 30 Apr 2018 22:38:30 +0000 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv In-Reply-To: <20180429132058.GB5972@kroah.com> References: <1524872704-13391-1-git-send-email-wang6495@umn.edu> <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> <20180429132058.GB5972@kroah.com> Message-ID: <69A8B9D9-9330-4750-BAAC-94480A1072D5@intel.com> On Apr 29, 2018, at 07:20, Greg Kroah-Hartman wrote: > > On Sat, Apr 28, 2018 at 04:04:25PM +0000, Dilger, Andreas wrote: >> On Apr 27, 2018, at 17:45, Wenwen Wang wrote: >>> [PATCH] staging: luster: llite: fix potential missing-check bug when copying lumv >> >> (typo) s/luster/lustre/ >> >>> In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space >>> using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is >>> LOV_USER_MAGIV_V3, lumv3 will be modified by the second copy from the user >> >> (typo) s/MAGIV/MAGIC/ >> >>> space. The second copy is necessary, because the two versions (i.e., >>> lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. >>> However, given that the user data resides in the user space, a malicious >>> user-space process can race to change the data between the two copies. By >>> doing so, the attacker can provide a data with an inconsistent version, >>> e.g., v1 version + v3 data. This can lead to logical errors in the >>> following execution in ll_dir_setstripe(), which performs different actions >>> according to the version specified by the field lmm_magic. >> >> This isn't a serious bug in the end. The LOV_USER_MAGIC_V3 check just copies >> a bit more data from userspace (the lmm_pool field). It would be more of a >> problem if the reverse was possible (copy smaller V1 buffer, but change the >> magic to LOV_USER_MAGIC_V3 afterward), but this isn't possible since the second >> copy is not done if there is a V1 magic. If the user changes from V3 magic >> to V1 in a racy manner it means less data will be used than copied, which >> is harmless. >> >>> This patch rechecks the version field lmm_magic in the second copy. If the >>> version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be >>> returned: -EINVAL. >> >> This isn't a bad idea in any case, since it verifies the data copied from >> userspace is still valid. > > So you agree with this patch? Or do not? > > confused, I don't think it fixes a real bug, but it makes the code a bit more clear, so I'm OK to land it (with minor corrections to commit message per above). Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation From wang6495 at umn.edu Mon Apr 30 22:43:43 2018 From: wang6495 at umn.edu (Wenwen Wang) Date: Mon, 30 Apr 2018 17:43:43 -0500 Subject: [lustre-devel] [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv In-Reply-To: <69A8B9D9-9330-4750-BAAC-94480A1072D5@intel.com> References: <1524872704-13391-1-git-send-email-wang6495@umn.edu> <8E6ADED8-592E-4794-8CAB-913A325B1971@intel.com> <20180429132058.GB5972@kroah.com> <69A8B9D9-9330-4750-BAAC-94480A1072D5@intel.com> Message-ID: On Mon, Apr 30, 2018 at 5:38 PM, Dilger, Andreas wrote: > On Apr 29, 2018, at 07:20, Greg Kroah-Hartman wrote: >> >> On Sat, Apr 28, 2018 at 04:04:25PM +0000, Dilger, Andreas wrote: >>> On Apr 27, 2018, at 17:45, Wenwen Wang wrote: >>>> [PATCH] staging: luster: llite: fix potential missing-check bug when copying lumv >>> >>> (typo) s/luster/lustre/ >>> >>>> In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space >>>> using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is >>>> LOV_USER_MAGIV_V3, lumv3 will be modified by the second copy from the user >>> >>> (typo) s/MAGIV/MAGIC/ >>> >>>> space. The second copy is necessary, because the two versions (i.e., >>>> lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. >>>> However, given that the user data resides in the user space, a malicious >>>> user-space process can race to change the data between the two copies. By >>>> doing so, the attacker can provide a data with an inconsistent version, >>>> e.g., v1 version + v3 data. This can lead to logical errors in the >>>> following execution in ll_dir_setstripe(), which performs different actions >>>> according to the version specified by the field lmm_magic. >>> >>> This isn't a serious bug in the end. The LOV_USER_MAGIC_V3 check just copies >>> a bit more data from userspace (the lmm_pool field). It would be more of a >>> problem if the reverse was possible (copy smaller V1 buffer, but change the >>> magic to LOV_USER_MAGIC_V3 afterward), but this isn't possible since the second >>> copy is not done if there is a V1 magic. If the user changes from V3 magic >>> to V1 in a racy manner it means less data will be used than copied, which >>> is harmless. >>> >>>> This patch rechecks the version field lmm_magic in the second copy. If the >>>> version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be >>>> returned: -EINVAL. >>> >>> This isn't a bad idea in any case, since it verifies the data copied from >>> userspace is still valid. >> >> So you agree with this patch? Or do not? >> >> confused, > > I don't think it fixes a real bug, but it makes the code a bit more clear, > so I'm OK to land it (with minor corrections to commit message per above). > > Cheers, Andreas > -- > Andreas Dilger > Lustre Principal Architect > Intel Corporation > Thanks! I will re-submit the patch with the corrected commit message. Wenwen From wang6495 at umn.edu Mon Apr 30 22:56:10 2018 From: wang6495 at umn.edu (Wenwen Wang) Date: Mon, 30 Apr 2018 17:56:10 -0500 Subject: [lustre-devel] [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv Message-ID: <1525128971-8946-1-git-send-email-wang6495@umn.edu> In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space using Its address, i.e., lumv1 = &lumv3. If the lmm_magic field of lumv3 is LOV_USER_MAGIC_V3, lumv3 will be modified by the second copy from the user space. The second copy is necessary, because the two versions (i.e., lov_user_md_v1 and lov_user_md_v3) have different data formats and lengths. However, given that the user data resides in the user space, a malicious user-space process can race to change the data between the two copies. By doing so, the attacker can provide a data with an inconsistent version, e.g., v1 version + v3 data. This can lead to logical errors in the following execution in ll_dir_setstripe(), which performs different actions according to the version specified by the field lmm_magic. This patch rechecks the version field lmm_magic in the second copy. If the version is not as expected, i.e., LOV_USER_MAGIC_V3, an error code will be returned: -EINVAL. Signed-off-by: Wenwen Wang --- drivers/staging/lustre/lustre/llite/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index d10d272..80d44ca 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1185,6 +1185,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (lumv1->lmm_magic == LOV_USER_MAGIC_V3) { if (copy_from_user(&lumv3, lumv3p, sizeof(lumv3))) return -EFAULT; + if (lumv3.lmm_magic != LOV_USER_MAGIC_V3) + return -EINVAL; } if (is_root_inode(inode)) -- 2.7.4