Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1125585imm; Wed, 25 Jul 2018 11:57:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfZ4Na01piUbAWPVnQlCmOgrpUkfOIr3wQ5H78cLnBSE9wJOfrSDC83TQK2cxXzKUZEYICb X-Received: by 2002:a62:1b07:: with SMTP id b7-v6mr23386476pfb.70.1532545060247; Wed, 25 Jul 2018 11:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532545060; cv=none; d=google.com; s=arc-20160816; b=lQCuvcC1ku8Z6YuLqhIT5bhmZreiZW253nc2pfDkfmiYTKSfqiSxlgwuEEx70BNa5f gfosM+GiSKubkjIVbKay/1JZEwepRmZjXi9s+SVcifNIAY26DgxV5ZHbVVNgeD5DimpB 4TRANKL0x0StlgHUn61XrHjcFDHxjNDB7QS1JvdrXK+eKuZvA9AXdwmj+M6lny7IB7aN g6tdoIvvaI837CeUMydw7aR63pW/M5a91ibw9FZY7qo0iL21em5fY+pQBjjWAKmad8kb GYu8hRr9h6eSVefR4GeEeScgb7Ah21cjKqRRS7oGJfInW1LHliYM451/mhECRuwIcZf4 F2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=v4gnd0+XJiSn58tLAzFqIfbxglqntAIFHUPn/Hn6h0s=; b=bgMHrbsBMk7KWvxktle+dUIK0kDhyXIAHTm/NWjWNMG0/s6sG2Z+ViA9hLrl+871Cz iUjN0Zd4058crlbMvAtX0aHZiYt/iMHOflRQFDXevCexlWHXgH8uh8ARoyI9CBGz7o+k mBqdsZNKBp0cNb3A4cRLFTz0/jUGl5f3sjjP3m9d1gCtCsYZmPR13QRZAhlhwvPERKQ3 5dlKSVjsQDkFkYMUVPALfV6hs6DUUrNK5KRSsnjx+WDp4OmeF7T2J5ODqo22mk9BRHEK W3QjPxJP/LjmPHwJXbHU1qIZW+fFeRPJhzmiceRPlohZaXVv9liGrZKP1UIVZ92NA3Wv W45A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si13431089pgi.463.2018.07.25.11.57.24; Wed, 25 Jul 2018 11:57:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730051AbeGYUJa (ORCPT + 99 others); Wed, 25 Jul 2018 16:09:30 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:50946 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbeGYUJa (ORCPT ); Wed, 25 Jul 2018 16:09:30 -0400 Received: from linux-r8p5.suse.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (TLS encrypted); Wed, 25 Jul 2018 12:56:27 -0600 From: Davidlohr Bueso To: akpm@linux-foundation.org Cc: jbaron@akamai.com, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, dave@stgolabs.net, Davidlohr Bueso Subject: [PATCH -next] fs/epoll: simply CONFIG_NET_RX_BUSY_POLL ifdefery Date: Wed, 25 Jul 2018 11:56:20 -0700 Message-Id: <20180725185620.11020-1-dave@stgolabs.net> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... 'tis easier on the eye. Signed-off-by: Davidlohr Bueso --- fs/eventpoll.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 1b1abc461fc0..0ab82d0d4e02 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -391,7 +391,6 @@ static bool ep_busy_loop_end(void *p, unsigned long start_time) return ep_events_available(ep) || busy_loop_timeout(start_time); } -#endif /* CONFIG_NET_RX_BUSY_POLL */ /* * Busy poll if globally on and supporting sockets found && no events, @@ -401,20 +400,16 @@ static bool ep_busy_loop_end(void *p, unsigned long start_time) */ static void ep_busy_loop(struct eventpoll *ep, int nonblock) { -#ifdef CONFIG_NET_RX_BUSY_POLL 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); -#endif } static inline void ep_reset_busy_poll_napi_id(struct eventpoll *ep) { -#ifdef CONFIG_NET_RX_BUSY_POLL if (ep->napi_id) ep->napi_id = 0; -#endif } /* @@ -422,7 +417,6 @@ static inline void ep_reset_busy_poll_napi_id(struct eventpoll *ep) */ static inline void ep_set_busy_poll_napi_id(struct epitem *epi) { -#ifdef CONFIG_NET_RX_BUSY_POLL struct eventpoll *ep; unsigned int napi_id; struct socket *sock; @@ -452,9 +446,15 @@ static inline void ep_set_busy_poll_napi_id(struct epitem *epi) /* record NAPI ID for use in next busy poll */ ep->napi_id = napi_id; -#endif } +#else +#define ep_busy_loop(ep, nonblock) do { } while (0) +#define ep_reset_busy_poll_napi_id(ep) do { } while (0) +#define ep_set_busy_poll_napi_id(epi) do { } while (0) + +#endif /* CONFIG_NET_RX_BUSY_POLL */ + /** * ep_call_nested - Perform a bound (possibly) nested call, by checking * that the recursion limit is not exceeded, and that -- 2.16.4