Whamcloud - gitweb
LU-16830 lod: improve rr allocation 96/50996/3
authorAlexander Boyko <alexander.boyko@hpe.com>
Fri, 12 May 2023 21:32:20 +0000 (17:32 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 9 Jun 2023 05:27:30 +0000 (05:27 +0000)
commitcacdaa925172d26c19ee841dd5a2a4c30afe10ce
treee29980ce2c7d51d7cf9397d319ea16112056cd1c
parentf8f8b3c574e95cb7272310bba19f97fe68cd9b11
LU-16830 lod: improve rr allocation

Roundrobin allocation uses atomic_inc() % ost_count for
generation OST index. When some OSTs are unavailable and
many threads make object creation, it could happen that
OST idx is the same for all attempts. For example with
4 OSTs configuration when 2 OSTs do faiover, estimation
of probability is 0.5^12=0.024%. The result is ENOSPC for
user application.

Let's try one by one OSTs for a last speed loop.

HPE-bug-id: LUS-11265
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I325cf4ad706c9b0df64cf53792e77c1fad6f7739
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50996
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lod/lod_qos.c