From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758827AbbA2Wcc (ORCPT ); Thu, 29 Jan 2015 17:32:32 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:42760 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758071AbbA2Wca (ORCPT ); Thu, 29 Jan 2015 17:32:30 -0500 Date: Thu, 29 Jan 2015 14:32:29 -0800 (PST) Message-Id: <20150129.143229.481822772678018170.davem@davemloft.net> To: xander.huff@ni.com Cc: gregkh@suse.de, jeff.westfahl@ni.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jaeden.amero@ni.com, ben.shelton@ni.com, brad.mouring@ni.com, rich.tollerton@ni.com Subject: Re: [PATCH 1/2] driver core: add device_poll interface From: David Miller In-Reply-To: <1422312393-61485-1-git-send-email-xander.huff@ni.com> References: <1422312393-61485-1-git-send-email-xander.huff@ni.com> X-Mailer: Mew version 6.5 on Emacs 24.1 / 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.7 (shards.monkeyblade.net [149.20.54.216]); Thu, 29 Jan 2015 14:32:30 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xander Huff Date: Mon, 26 Jan 2015 16:46:32 -0600 > From: Jeff Westfahl > > Add the device_poll interface to the driver core. This is a generic > interface that any struct device can take advantage of to dynamically > switch between using interrupts and polling. Many drivers can be easily > modified to take advantage of this feature if desired. > > This interface is most likely to be used along with the RT patch. It has > only been used thus far on Ethernet interfaces. Even with the standard > RT change to threaded interrupts for all devices, some RT applications > can be sensitive to even the minimal hardware interrupt that still occurs > with threaded interrupt handlers. The device_poll interface can be used > to completely eliminate all hardware interrupts for a device and the > associated jitter. > > This is a standalone feature that should be submitted for review and > possible inclusion in mainline, or maybe in the RT patch. > > Signed-off-by: Jeff Westfahl There is no reason any device driver needs to explicitly add support for a feature like this. Implement this at the IRQ handler level, and run the IRQ handler itself from the poll thread. No driver changes at all. Sorry, I'm not applying this series, drivers already have to implement too many things explicitly these days.