Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1186616imm; Wed, 25 Jul 2018 13:07:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdnfjH704n7Y9cVXk4mQb5PhXfvXlwCeMc0sjSX7SBsNOR16mWgnC/McXXHiS5fZdL1arOC X-Received: by 2002:a63:a502:: with SMTP id n2-v6mr16850148pgf.263.1532549277818; Wed, 25 Jul 2018 13:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532549277; cv=none; d=google.com; s=arc-20160816; b=GwPcZM/pmUsyGj7nrheptxUYpi132RiBmPv4gU3FmqvBFysk6RJp+9Cm5NIPK1O1SO uydHAZNY5Yo1OJMX9eGeq85Ogu09mS/zIAGWCvKzvdcIUhc2fzwnL58mI6iPhwMOi4VL nId9NdaI/yQofM5ljHZh3Mrs5KeBb/sTtEDV01/N2oXj6bVZdQRbuTYgA1Ki9t2nYZu8 XjjWNxUVhRhMgTYy/mzRN3dMruxWOcIzGXESO7ybiHwl+rMa36b1wLr2Id8UrCW3cdsK GRtfxipuxUqOrVqRkq0Z385uJNnaOTgWyMyjH65rluv11Fp+gXxKjV/IWLK041n+VxLU UEkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=CfKtdmSvrZor+IFKpxzSbqCJSEsWdmp5AObtutpKreg=; b=X9yP9zGsW1r13aoylyCkCs7hTDAFL/GAK6w9Oamp5HV9Fv6Pez9K2nkW1tF+mrrWed +hRBO2sxKNA9O6Er56LJh+pnDt6aHw0DMB0U7c8IVCWQJDjX9ZKjVTlPZpWyvYFSAaQ1 i/FEsuq4I2mdKh1QrlubOFVjlXcOR9aDNnJOEqnHlxByVix7OwcvxKTokh0JjEPkz9b7 sWHaaO5HX0wir1mX0JEUYfc9FzZMd1ngt4wtdY1vmKAwTCjQAq6YEd2Br51tCirEXMmb 3aIhVI7qYYTQ7dMcPZAtqeZ7JRuR4xCZDrqxhYDdBoxoEbtlhuK5SO0uFacq7sEMbZvo dq8g== 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 g38-v6si14607926pgg.363.2018.07.25.13.07.43; Wed, 25 Jul 2018 13:07:57 -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 S1730427AbeGYVTy (ORCPT + 99 others); Wed, 25 Jul 2018 17:19:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:58824 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729529AbeGYVTy (ORCPT ); Wed, 25 Jul 2018 17:19:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2E56AACA8; Wed, 25 Jul 2018 20:06:39 +0000 (UTC) Date: Wed, 25 Jul 2018 13:06:33 -0700 From: Davidlohr Bueso To: Andrew Morton Cc: jbaron@akamai.com, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH -next] fs/epoll: simply CONFIG_NET_RX_BUSY_POLL ifdefery Message-ID: <20180725200633.c36cdaf4ymgscump@linux-r8p5> References: <20180725185620.11020-1-dave@stgolabs.net> <20180725123513.5f36a6b787d06c8066a24ade@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180725123513.5f36a6b787d06c8066a24ade@linux-foundation.org> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Jul 2018, Andrew Morton wrote: >On Wed, 25 Jul 2018 11:56:20 -0700 Davidlohr Bueso wrote: > >> ... 'tis easier on the eye. > >true, but. > >> +#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 */ > >inlines are preferred. Because macros are fugly and can cause >unused-var warnings when the stub versions are used. Fair enough. >This? Do you want me to send a v2 or will you fold in the below? Thanks, Davidlohr > >--- a/fs/eventpoll.c~fs-epoll-simply-config_net_rx_busy_poll-ifdefery-fix >+++ a/fs/eventpoll.c >@@ -449,9 +449,18 @@ static inline void ep_set_busy_poll_napi > } > > #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) >+ >+static inline void ep_busy_loop(struct eventpoll *ep, int nonblock) >+{ >+} >+ >+static inline void ep_reset_busy_poll_napi_id(struct eventpoll *ep) >+{ >+} >+ >+static inline void ep_set_busy_poll_napi_id(struct epitem *epi) >+{ >+} > > #endif /* CONFIG_NET_RX_BUSY_POLL */ > >_ >