From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:46000 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966209AbeF1OVJ (ORCPT ); Thu, 28 Jun 2018 10:21:09 -0400 From: Christoph Hellwig To: Alexander Viro Cc: Linus Torvalds , linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, lkp@01.org Subject: [RFC] replace ->get_poll_head with a waitqueue pointer in struct file Date: Thu, 28 Jun 2018 16:20:53 +0200 Message-Id: <20180628142059.10017-1-hch@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Introducing the new poll methods showed up a regression in the will-it-scale ltp tests. One reason for that is that indirect function calls are very expensive now with the spectre mitigations. I'm waiting for better numbers, but this series has shown a 5% improvements in the ops per second so far, while for the get_poll_head addition we had regressions of 3.7% or 8.8% depending on the measurement. This series removes the get_poll_head method again and instead stores an optional wait_queue_head pointer in struct file, on which the poll_mask method can be used if it is set. The only complication is the networking poll code which not only does some interesting gymnastics to get at the wait queue pointer, but also has a mode to to hardware polling before waiting for an even from poll or epoll. Because of that this series has a few net prep patches that need careful review.