From patchwork Wed Jul 10 12:17:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliezer Tamir X-Patchwork-Id: 258035 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 A345A2C02C1 for ; Wed, 10 Jul 2013 22:18:05 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754427Ab3GJMRu (ORCPT ); Wed, 10 Jul 2013 08:17:50 -0400 Received: from mga02.intel.com ([134.134.136.20]:44249 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753854Ab3GJMRt (ORCPT ); Wed, 10 Jul 2013 08:17:49 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 10 Jul 2013 05:17:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,1036,1363158000"; d="scan'208";a="363103018" Received: from ladj378.jer.intel.com ([10.12.232.220]) by fmsmga001.fm.intel.com with ESMTP; 10 Jul 2013 05:18:49 -0700 From: Eliezer Tamir Subject: [PATCH] socket.7: add description for SO_BUSY_POLL To: Micahel Kerrisk Cc: linux-man@vger.kernel.org, David Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Andrew Morton , Eliezer Tamir Date: Wed, 10 Jul 2013 15:17:45 +0300 Message-ID: <20130710121745.13118.86907.stgit@ladj378.jer.intel.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add description for the SO_BUSY_POLL socket option to the socket(7) manpage. Signed-off-by: Eliezer Tamir --- man7/socket.7 | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/man7/socket.7 b/man7/socket.7 index f2213eb..27603c9 100644 --- a/man7/socket.7 +++ b/man7/socket.7 @@ -694,6 +694,31 @@ for details on control messages. Gets the socket type as an integer (e.g., .BR SOCK_STREAM ). This socket option is read-only. +.TP +.B SO_BUSY_POLL +Sets the approximate time in microseconds to busy poll on a blocking receive +when there is no data. Increasing this value requires +.BR CAP_NET_ADMIN . +The default for this option is controlled by the +.I /proc/sys/net/core/busy_read +file. + +The value in the +.I /proc/sys/net/core/busy_poll +file determines how long +.BR select (2) +and +.BR poll (2) +will busy poll when they operate on sockets with +.BR SO_BUSY_POLL +set and no events to report are found. + +In both cases busy polling will only be done when the socket last received data +from a network device that supports this option. + +While busy polling my improve latency of some application, care must be +taken when using it since this will increase both CPU utilization power usage. + .SS Signals When writing onto a connection-oriented socket that has been shut down (by the local or the remote end)