Whamcloud - gitweb
LU-4423 libcfs: disable preempt while sampling processor id. 60/32360/3
authorNeilBrown <neilb@suse.com>
Sat, 12 May 2018 17:52:58 +0000 (13:52 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 21 May 2018 16:54:28 +0000 (16:54 +0000)
commit32c7b181371c75c5a5e79c603972be09c3deb2d4
tree4c4966a69e7af047c771a3e37114393b870cb890
parent454a5f5c5496bdea667223a1608d885024f658af
LU-4423 libcfs: disable preempt while sampling processor id.

Calling smp_processor_id() without disabling preemption
triggers a warning (if CONFIG_DEBUG_PREEMPT).
I think the result of cfs_cpt_current() is only used as a hint for
load balancing, rather than as a precise and stable indicator of
the current CPU.  So it doesn't need to be called with
preemption disabled.

So disable preemption inside cfs_cpt_current() to silence the warning.

Linux-commit : dbeccabf5294e80f7cc9ee566746c42211bed736

Change-Id: Iaa930acc7a2633c0e40bcabbe6bd309a3d767325
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32360
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/libcfs/libcfs_cpu.c