Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755696AbbLATsH (ORCPT ); Tue, 1 Dec 2015 14:48:07 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:56255 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751442AbbLATsF (ORCPT ); Tue, 1 Dec 2015 14:48:05 -0500 Date: Tue, 01 Dec 2015 14:48:03 -0500 (EST) Message-Id: <20151201.144803.593589376680817466.davem@davemloft.net> To: rweikusat@mobileactivedefense.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] unix: use wq_has_sleeper in unix_dgram_recvmsg From: David Miller In-Reply-To: <874mg8lg4c.fsf@doppelsaurus.mobileactivedefense.com> References: <878u5klgb8.fsf@doppelsaurus.mobileactivedefense.com> <874mg8lg4c.fsf@doppelsaurus.mobileactivedefense.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 01 Dec 2015 11:48:05 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 19 From: Rainer Weikusat Date: Thu, 26 Nov 2015 19:23:15 +0000 > The current unix_dgram_recvmsg does a wake up for every received > datagram. This seems wasteful as only SOCK_DGRAM client sockets in an > n:1 association with a server socket will ever wait because of the > associated condition. The patch below changes the function such that the > wake up only happens if wq_has_sleeper indicates that someone actually > wants to be notified. Testing with SOCK_SEQPACKET and SOCK_DGRAM socket > seems to confirm that this is an improvment. > > Signed-Off-By: Rainer Weikusat Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/