[LU-8130] Migrate from libcfs hash to rhashtable Created: 12/May/16  Updated: 05/Dec/23

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: Upstream

Type: Improvement Priority: Minor
Reporter: James A Simmons Assignee: James A Simmons
Resolution: Unresolved Votes: 0
Labels: None

Attachments: Text File make.log     File rhashtable.h    
Issue Links:
Blocker
is blocking LU-14535 add option for LFS to get all quota i... Open
Related
is related to LU-9859 libcfs simplification Open
is related to LU-14698 sanityn test_77b scheduling in_atomic() Open
is related to LU-16365 cached 'ls -l' is slow Open
is related to LU-6800 Significant performance regression wi... Resolved
is related to LU-11624 BUG: unable to handle kernel NULL po... Resolved
is related to LU-14752 LustreError: 3594004:0:(lu_object.c:2... Resolved
is related to LU-10401 sanity test_133g: timeout during MDT ... Resolved
is related to LU-16253 sanityn: ASSERTION( orro->oo_ref == 0... Resolved
is related to LU-17191 sanity-quota test_1b, 1d, 1f, 1i: FAI... Resolved
is related to LU-17329 Relaxed POSIX Consistency for Lustre Open
is related to LU-12511 Prepare lustre for adoption into the ... Open
Rank (Obsolete): 9223372036854775807

 Description   

The linux kernel has its own resizable hashtable which can be used in place of libcfs hash code. The linux rhashtable was developed for the networking layer and that layer has very high requirements for performance. Some of the benefits are low latency as well as lockless lookups. Migrating Lustre to rhashtable should mean HUGE PERFORMANCE gains!!!!!



 Comments   
Comment by Peter Jones [ 12/May/16 ]

I've copied Liang so he is aware of this activity in the upstream client

Comment by Gerrit Updater [ 07/Jul/17 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/27967
Subject: LU-8130 libcfs: improve hash handling
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ed9f0eef1b663c7deea0c55397703d76a93c714a

Comment by Gerrit Updater [ 17/Apr/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32036
Subject: LU-8130 ptlrpc: convert conn_hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 815f5ee910a43ee7d9742dd7287b62e5acb16f1a

Comment by Gerrit Updater [ 17/Apr/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32038
Subject: LU-8130 osc: convert osc_quota hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 178b746066dfa53a2b58e9ccfa5ce9340db9f900

Comment by Gerrit Updater [ 20/Apr/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32102
Subject: LU-8130 libcfs: add rhashtable support
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e02b4501bc5648ae51efefda7299336b58c7562d

Comment by Gerrit Updater [ 21/Apr/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32111
Subject: LU-8130 lov: convert lov_pool to use rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 96d01db1689afa5aa2c7eb11271b5c8c85a62d8b

Comment by Gerrit Updater [ 15/May/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32408
Subject: LU-8130 ldlm: store name directly in namespace.
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c5be2189469cfca37100892e8435444bc275c369

Comment by Gerrit Updater [ 29/May/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/32408/
Subject: LU-8130 ldlm: store name directly in namespace.
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 520c2959244ee366444dbc0b0d82bc05f4f9f5d6

Comment by Gerrit Updater [ 07/Jun/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/32662
Subject: LU-8130 lov: convert lov_pool to use rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cf30ce9a8293d80ac1c5e3cab6dbd6bd78c3f4cf

Comment by Gerrit Updater [ 04/Sep/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32102/
Subject: LU-8130 libcfs: prepare rhashtable support
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: bef1069506c38e6d8ebdb4393cccb5a33978a61e

Comment by Gerrit Updater [ 01/Oct/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32036/
Subject: LU-8130 ptlrpc: convert conn_hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7b3f9e5d6c509fabcec3cbd71e541a84987db2ff

Comment by Gerrit Updater [ 25/Oct/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/33485
Subject: LU-8130 nrs: convert NRS crr to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9f98d556c0a75e681517046d1136b89d870f851b

Comment by Gerrit Updater [ 30/Oct/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/33518
Subject: LU-8130 obd: convert obd_nid_hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7520485fe431f844c1269907b2f1ae8fa9ddc37a

Comment by Gerrit Updater [ 06/Nov/18 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33595
Subject: Revert "LU-8130 ptlrpc: convert conn_hash to rhashtable"
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2479fdefff231b9144f07e5b327f8918859a8a47

Comment by Gerrit Updater [ 10/Nov/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33595/
Subject: Revert "LU-8130 ptlrpc: convert conn_hash to rhashtable"
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8dec4efe47fa8772ded8d6816638703dbbe04379

Comment by Gerrit Updater [ 05/Dec/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/33789
Subject: LU-8130 libcfs: support latest rhashtable and hash API
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c831343618d934c48d7f755243a9f03167f2a117

Comment by Gerrit Updater [ 14/Dec/18 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33873
Subject: LU-8130 libcfs: don't include rhashtable if unavailable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 63e1e630f5f8ce6fa3119795ef109d01ee26bd0d

Comment by Gerrit Updater [ 13/Jan/19 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34020
Subject: LU-8130 libcfs: don't include rhashtable if unavailable
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: e616db3c0b6e78ab1a4fbdee8d8791bec574e7e0

Comment by Gerrit Updater [ 15/Jan/19 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/34036
Subject: LU-8130 libcfs: support latest rhashtable API
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 430f9fe1c2de9aeec992746d79bc40d46b8ab577

Comment by Gerrit Updater [ 11/Feb/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33789/
Subject: LU-8130 libcfs: port working hash from upstream
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1658ae30a0e97e7f4018d8cba67e459078470d1a

Comment by Gerrit Updater [ 27/Feb/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34036/
Subject: LU-8130 libcfs: support latest rhashtable API
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8de7221201c0707245c9ee2ef7cdd1d54207b3ee

Comment by Gerrit Updater [ 15/Mar/19 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/34429
Subject: LU-8130 obd: convert obd uuid hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9977b8882a943e64f62200be32dd202491b9a038

Comment by Gerrit Updater [ 19/Mar/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34020/
Subject: LU-8130 libcfs: don't include rhashtable if unavailable
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 29d627f860bc1963f2103ea441577dbd18d71344

Comment by Gerrit Updater [ 01/Apr/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33485/
Subject: LU-8130 nrs: convert NRS CRR to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9df933d9b4a63e06d93d2d07cf5e670fcc10c8fc

Comment by Gerrit Updater [ 10/Jun/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35143
Subject: LU-8130 libcfs: support latest rhashtable API
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: b45863f7d65a8d0a65742d20cf63928ec7cab74b

Comment by Gerrit Updater [ 11/Jun/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35179
Subject: LU-8130 libcfs: port working hash from upstream
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 7b0c6d2f3ddd40f51d663b4e381b64a1cf55dd22

Comment by Gerrit Updater [ 20/Jun/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35143/
Subject: LU-8130 libcfs: support latest rhashtable API
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: ac8d93c9f6f96d4b343a6888f90bc588ea1ab1b0

Comment by Gerrit Updater [ 18/Jul/19 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35565
Subject: LU-8130 libcfs: don't include rhashtable if unavailable
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 5ed35622502dbfece2b1e956b30ccd9819537ca2

Comment by Gerrit Updater [ 04/Sep/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35565/
Subject: LU-8130 libcfs: don't include rhashtable if unavailable
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: f28d7ed454d6abcd776aed1c84013fbf3055651e

Comment by Gerrit Updater [ 17/Sep/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36216
Subject: LU-8130 lu_object: factor out extra per-bucket data
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 130e6db7b777497a5b4304e9c470c51cad8cde3a

Comment by Gerrit Updater [ 17/Sep/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36218
Subject: LU-8130 ldlm: separate buckets from ldlm hash table
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d19d12114c0acc0682d2b6b4a03b60bfbdecdcf2

Comment by Gerrit Updater [ 17/Sep/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36219
Subject: LU-8130 ldlm: add a counter to the per-namespace data
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 31ff85c526e70d0b8aa1a5673c08a795eee150df

Comment by Gerrit Updater [ 17/Sep/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36220
Subject: LU-8130 ldlm: simplify ldlm_ns_hash_defs[]
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: dd4d5c5d1be06783898b67025076982fdcf4c7fa

Comment by Gerrit Updater [ 23/Sep/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35179/
Subject: LU-8130 libcfs: port working hash from upstream
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 15db0a3070ec42228d0ac666b4ff089c645f9a46

Comment by Gerrit Updater [ 11/Oct/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36432
Subject: LU-8130 obd: remove used HASH_CL_ENV_[BKT]_BITS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e8e12d73bad4ba9809ef6fd9cf676ac2fdc58fc9

Comment by Gerrit Updater [ 07/Nov/19 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/36707
Subject: LU-8130 lu_object: convert lu_object cache to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7ec36418fc77b8803c01e1f6ea36a4902b64d4ec

Comment by James A Simmons [ 27/Nov/19 ]

I just gather some performance numbers  for the lu_object cache with a single MDS server. Without this work I get:

Operation Max Min Mean Std Dev
--------- — --- ---- -------
Directory creation: 3206199.336 5254.046 5802.473 375.173
Directory stat : 33705.331 19990.084 24055.134 5191.633
Directory removal : 6574.092 4983.478 6028.141 561.790
File creation : 14538.167 14125.797 14398.448 143.081
File stat : 46441.048 40937.383 43133.248 2223.355
File read : 22429.094 21230.384 21899.047 467.894
File removal : 11246.008 10773.246 10999.512 153.015
Tree creation : 140.564 53.583 93.303 37.284
Tree removal : 60.962 42.381 48.522 6.706

With the lu_object rhashtable patches I get:

Operation Max Min Mean Std Dev
--------- — --- ---- -------
Directory creation: 7561.995 6424.013 6811.299 397.400
Directory stat : 44986.490 25812.764 33376.039 7310.581
Directory removal : 7702.135 5550.633 6278.318 788.811
File creation : 15871.038 13575.319 15249.266 850.982
File stat : 113588.704 50862.965 70728.833 22659.169
File read : 31272.666 28991.341 30024.974 828.311
File removal : 12205.639 11399.966 11866.223 262.320
Tree creation : 90.461 68.164 73.028 8.736
Tree removal : 61.626 40.385 51.510 7.180

This is with a single MDS but I expect similar scaling with a DNE setup. 

It will be interesting to see the impact of moving the ldlm locks to rhashtables.

Comment by Gerrit Updater [ 06/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36432/
Subject: LU-8130 obd: remove used HASH_CL_ENV_[BKT]_BITS
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d2dc1749dde1a4a471a111de633f4c53a4b22a83

Comment by Gerrit Updater [ 14/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36218/
Subject: LU-8130 ldlm: separate buckets from ldlm hash table
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d234e2cf5f557eadd4b65758ca76f783fb6ed9a1

Comment by Gerrit Updater [ 20/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34429/
Subject: LU-8130 obd: convert obd uuid hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e40b008e8877c3345347500d10af07abd8651d56

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36219/
Subject: LU-8130 ldlm: add a counter to the per-namespace data
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f9314d6e9259e6c7683ed614931ab2506356ba88

Comment by Gerrit Updater [ 10/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36220/
Subject: LU-8130 ldlm: simplify ldlm_ns_hash_defs[]
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 416142145c9dc66f9692907c6dcea96c82c35bdd

Comment by Gerrit Updater [ 18/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36216/
Subject: LU-8130 lu_object: factor out extra per-bucket data
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e6f7f8a7b349d69d49d2cb883798fd5c679c48c3

Comment by Gerrit Updater [ 14/Feb/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32662/
Subject: LU-8130 lov: convert lo[v|d]_pool to use rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 2124e07ddde7789ebf0e8ec5600f2aff31788123

Comment by Gerrit Updater [ 18/Mar/20 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/37965
Subject: LU-8130 lu_object: use RCU to free lu_object_header
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d33fc68cf25ac8be14bc04ce92b733b5f65ec9d4

Comment by Gerrit Updater [ 31/Mar/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37965/
Subject: LU-8130 lu_object: use RCU to free lu_object_header
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b25e8a4bc86ee245be19dc05c085a2b0f4fe4a43

Comment by Shuichi Ihara [ 03/Jun/20 ]

patch https://review.whamcloud.com/#/c/36707 (patchset 27) has a regression and mdtest failed on DoM configuration.

# lfs setstripe -L mdt -E 1M /ai400/dom/
# salloc -p 40n --nodes=40 --ntasks-per-node=16 mpirun --allow-run-as-root /work/tools/bin/mdtest -t -F -P -w 3901 -e 3901 -d /ai400/dom/mdt_hard -n 10000 -a POSIX -N 1 -i 3 -p 10 

-- started at 06/03/2020 13:24:08 --

mdtest-3.3.0+dev was launched with 640 total task(s) on 40 node(s)
Command line used: /work/tools/bin/mdtest '-t' '-F' '-P' '-w' '3901' '-e' '3901' '-d' '/ai400/dom/mdt_hard' '-n' '10000' '-a' 'POSIX' '-N' '1' '-i' '3' '-p' '10'
Path: /ai400/dom
FS: 47.4 TiB   Used FS: 0.1%   Inodes: 371.8 Mi   Used Inodes: 0.0%

Nodemap: 1111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
V-0: Rank   0 Line  2137 Shifting ranks by 16 for each phase.
640 tasks, 6400000 files
[ec01:08604] 639 more processes have sent help message help-mpi-btl-openib.txt / error in device init
[ec01:08604] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
ior ERROR: open64("/ai400/dom/mdt_hard/test-dir.1-0/mdtest_tree.0/file.mdtest.24.9377", 66, 0664) failed, errno 16, Device or resource busy (aiori-POSIX.c:413)
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 24 in communicator MPI_COMM_WORLD
with errorcode -1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
An MPI communication peer process has unexpectedly disconnected.  This
usually indicates a failure in the peer process (e.g., a crash or
otherwise exiting without calling MPI_FINALIZE first).

Although this local MPI process will likely now behave unpredictably
(it may even hang or crash), the root cause of this problem is the
failure of the peer -- that is what you need to investigate.  For
example, there may be a core file that you can examine.  More
generally: such peer hangups are frequently caused by application bugs
or other external events.

  Local host: ec40
  Local PID:  4108
  Peer host:  ec02
--------------------------------------------------------------------------
[ec01:08604] 47 more processes have sent help message help-mpi-btl-tcp.txt / peer hung up
salloc: Relinquishing job allocation 4561
Comment by Gerrit Updater [ 16/Jun/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33518/
Subject: LU-8130 obd: convert obd_nid_hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 580ef453d1d6f901c3227a037137a7db9e600009

Comment by Gerrit Updater [ 28/Jun/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33616/
Subject: LU-8130 ptlrpc: convert conn_hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 37b29a8f709aa4bd2e22cbb3549257b28cd85610

Comment by Gerrit Updater [ 28/Jun/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36707/
Subject: LU-8130 lu_object: convert lu_object cache to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: aff14dbc522e140945f9207d4e9bbd27d0326819

Comment by Jian Yu [ 01/Jul/20 ]

Hi James,

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/34036
Subject: LU-8130 libcfs: support latest rhashtable API

In old kernel (like kernel-3.10.0-327.36.1.el7), the codes in linux/rhashtable.h (rhashtable.h) are quite different from those in the new kernel. E.g., "struct rhashtable_compare_arg" is not defined. The differences are causing build failures with old kernel as follows:

  CC [M]  /root/lustre-release/libcfs/libcfs/linux/linux-hash.o
In file included from /root/lustre-release/libcfs/libcfs/linux/linux-hash.c:33:0:
/root/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:71:13: error: ‘struct rhashtable_iter’ declared inside parameter list [-Werror]
      struct rhashtable_iter *iter)
             ^
/root/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:71:13: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
/root/lustre-release/libcfs/include/libcfs/linux/linux-hash.h: In function ‘rhashtable_walk_enter’:
/root/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:76:2: error: implicit declaration of function ‘rhashtable_walk_init’ [-Werror=implicit-function-declaration]
  return rhashtable_walk_init(ht, iter);
  ^
/root/lustre-release/libcfs/include/libcfs/linux/linux-hash.h: In function ‘rhltable_init’:
/root/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:98:2: error: passing argument 2 of ‘rhashtable_init’ discards ‘const’ qualifier from pointer target type [-Werror]
  return rhashtable_init(&hlt->ht, params);
<~snip~>

Here is a log that contains all of the build failures: make.log

Is there a proper way to fix the codes to make them compatible with old kernel?

Comment by Jian Yu [ 06/Jul/20 ]

Is there a proper way to fix the codes to make them compatible with old kernel?

This can be resolved by using HAVE_SERVER_SUPPORT to disable the rhashtable codes while building client. The rhashtable codes are only used by lu_env in lustre/obdclass/lu_object.c on server.

Comment by James A Simmons [ 06/Jul/20 ]

That RHEL7.2 correct? Do we even test RHEL7.2 client. I know for 2.13.X you can't even build server rpms for RHEL7.2. Is this a 2.12 issue?

Comment by Jian Yu [ 06/Jul/20 ]

Yes, James. That's a 2.12 issue on RHEL 7.2 client. After adding HAVE_SERVER_SUPPORT check for rhashtable codes in libcfs/include/libcfs/linux/linux-hash.h, the issue is resolved.

Comment by James A Simmons [ 06/Jul/20 ]

Ah, that makes sense. rhashtable is barely uses in 2.12 so it should be a easy fix.

Comment by Gerrit Updater [ 01/Oct/20 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/40113
Subject: LU-8130 nrs: convert NRS ORR / TRR to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4b29db0c73802bb9ab32a39a25ca93cbad9f36be

Comment by Gerrit Updater [ 26/Dec/20 ]

James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/41092
Subject: LU-8130 obdclass: convert nid_stats to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9aa6d2d5f5f7deac7b0fb596524ff9ea991b6e24

Comment by Gerrit Updater [ 17/Dec/21 ]

"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/45882
Subject: LU-8130 ldlm: convert ldlm_resource hash to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: df3f27db84994843a9908ced17e7000410267e11

Comment by Gerrit Updater [ 01/Aug/23 ]

"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51840
Subject: LU-8130 libcfs: free xa_node instead of radix_tree_node
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7553c5aa770d0e8c61630e9cc1deff4a13e02b4c

Comment by Gerrit Updater [ 19/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51840/
Subject: LU-8130 libcfs: don't use radix tree for xarray
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 778791dd7da107710c2311935a24cfd7e7a5fd85

Comment by Gerrit Updater [ 19/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/40113/
Subject: LU-8130 nrs: convert NRS ORR/TRR to rhashtable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 42bf5f78ba23ed5a7a908c921a5d8ded7544a315

Comment by Gerrit Updater [ 06/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/32038/
Subject: LU-8130 osc: convert osc_quota hash to xarray
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ac8c28f959d87c1ae852d9daccce3c2a3f7a6f39

Generated at Sat Feb 10 02:14:54 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.