From patchwork Mon Nov 2 17:01:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 539060 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id F1FCD1409F8 for ; Tue, 3 Nov 2015 04:02:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bytheb_org.20150623.gappssmtp.com header.i=@bytheb_org.20150623.gappssmtp.com header.b=FscngpCw; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932131AbbKBRCN (ORCPT ); Mon, 2 Nov 2015 12:02:13 -0500 Received: from mail-qg0-f52.google.com ([209.85.192.52]:36683 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932116AbbKBRCK (ORCPT ); Mon, 2 Nov 2015 12:02:10 -0500 Received: by qgad10 with SMTP id d10so120968901qga.3 for ; Mon, 02 Nov 2015 09:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytheb_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=KE6DvqZ92QxmKkJBWLDi7HGfLB3qe1WLaLB4idJUuWc=; b=FscngpCwC55mwh6LmKp9hes6ENQczX9RKm+tSFxAaBzr+0KJjxptDXNK9pSEuQdfpf xYw6w0I41sMGHTuh6c5aLiEKxJDM75lHn9jeMJJJqD3TSAlThmnO1IStMK7YQM8C2phl e1hrdi6tOd4rxJcYc+Rr9MfBH7tB2OKaGpk9WaLTOba6EB3x+iDKwIbn44iOwjVP63E5 cbG5q8Z3zGXGlSllGlimvWdYcnvWZn4aXP66N8Ec58GF8CZXcTv5XuF1H0CTWEJaZi7P 7Vay56qTv0gtYpxJt94cbJqD+7XkeCxWRGKSUqUwS4bhm3SBXpThpnU+H66KIX+rDAut kUug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KE6DvqZ92QxmKkJBWLDi7HGfLB3qe1WLaLB4idJUuWc=; b=fKGUG7jxhvpdwiGO9voWBn3Kir2gMUjzTtKaemhVKYh4EZjmbETPvMgUPBz6AvPGZW 3g/I/8TGffQ9pYbR05jc7E59LDFThPujecST5cf2aECpcErim5c/2HfjP2lsxmMS4RLq YW7IRv32R5FFAPE5DfBTarBFEylp7isMO8dzw6SNmQJ82jnW3d0dPka4NXkfCBIjCtqR yjARKqj7DucY7U9xoNUKcUDEFoFSxgwGQwxcXFD7L8Qc4Zxqfr36HrIZea3UsAyd7H/Q VolHb+OgcBSMYmhfcciqh0nKPgCCPhhwMTm/MawrtEdCz/0lOTqQeBl+nRIR0SY2db3B j0JA== X-Gm-Message-State: ALoCoQmIkZJk2cPJxwPRBU8F06G+WBFsLLDwkFvuX7no5UwvZETEYpZ7EAYP2TPsuoAN2D0aGA6s X-Received: by 10.140.133.10 with SMTP id 10mr32368440qhf.95.1446483729551; Mon, 02 Nov 2015 09:02:09 -0800 (PST) Received: from aconole.bos.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id v66sm8234029qkv.32.2015.11.02.09.02.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 09:02:09 -0800 (PST) From: Aaron Conole To: netdev@vger.kernel.org Cc: Aaron Conole Subject: [PATCH net-next] af_unix: optimize unix_writable by inlining Date: Mon, 2 Nov 2015 12:01:59 -0500 Message-Id: <1446483719-30310-1-git-send-email-aconole@bytheb.org> X-Mailer: git-send-email 2.6.1.133.gf5b6079 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org unix_writable() originally was inlined, but was changed as part of commit 1586a5877db9 ("af_unix: do not report POLLOUT on listeners"). Re-enable the inline flag. Signed-off-by: Aaron Conole Cc: Eric Dumazet --- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index aaa0b58..f0c7f0c 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -326,7 +326,7 @@ found: return s; } -static int unix_writable(const struct sock *sk) +static inline int unix_writable(const struct sock *sk) { return sk->sk_state != TCP_LISTEN && (atomic_read(&sk->sk_wmem_alloc) << 2) <= sk->sk_sndbuf;