Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758235AbcKCTpP (ORCPT ); Thu, 3 Nov 2016 15:45:15 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:40567 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754019AbcKCTpN (ORCPT ); Thu, 3 Nov 2016 15:45:13 -0400 From: Jens Axboe To: , , CC: Subject: [PATCHSET v2] block: IO polling improvements Date: Thu, 3 Nov 2016 13:45:02 -0600 Message-ID: <1478202307-1947-1-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-03_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 25 Fixed a few bugs in this, and addressed some review comments. Patches are against my 4.10 block branch, for-4.10/block. Some performance results, running random reads against a fast device, using either IRQ driven completions, classic polled, or the new hybrid polled: Method IOPS CPU% IOPS/CPU% ========================================================= IRQ 476K 48.45% 9843 Poll 897K 99.9% 8982 Hybrid 836K 68.1% 12273 Classic polling is still a bit faster, but is uses a lot more CPU. The rightmost column is an efficiency metric, and with the new hybrid scheme, we're both faster and more efficient than IRQ driven. We should be able to close the speed gap as well, so you can have your cake and eat it too. I've adjusted the default, so that classic polling is the default poll method. To enable hybrid polling for a device, you would do: # echo 0 > /sys/block//queue/io_poll_delay Also see the last patch for the other values this can be set to.