diff options
author | Björn Töpel <bjorn.topel@intel.com> | 2020-11-30 19:51:57 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-12-01 00:09:25 +0100 |
commit | 7c951cafc0cb2e575f1d58677b95ac387ac0a5bd (patch) | |
tree | 1d47f6c2fb6e3734d52c96a1f0abcf38e2c08cf5 /fs/eventpoll.c | |
parent | net: Introduce preferred busy-polling (diff) | |
download | linux-7c951cafc0cb2e575f1d58677b95ac387ac0a5bd.tar.xz linux-7c951cafc0cb2e575f1d58677b95ac387ac0a5bd.zip |
net: Add SO_BUSY_POLL_BUDGET socket option
This option lets a user set a per socket NAPI budget for
busy-polling. If the options is not set, it will use the default of 8.
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/bpf/20201130185205.196029-3-bjorn.topel@gmail.com
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r-- | fs/eventpoll.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index e11fab3a0b9e..73c346e503d7 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -397,7 +397,8 @@ static void ep_busy_loop(struct eventpoll *ep, int nonblock) unsigned int napi_id = READ_ONCE(ep->napi_id); if ((napi_id >= MIN_NAPI_ID) && net_busy_loop_on()) - napi_busy_loop(napi_id, nonblock ? NULL : ep_busy_loop_end, ep, false); + napi_busy_loop(napi_id, nonblock ? NULL : ep_busy_loop_end, ep, false, + BUSY_POLL_BUDGET); } static inline void ep_reset_busy_poll_napi_id(struct eventpoll *ep) |