From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f41.google.com ([209.85.218.41]:34515 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751991AbcENOWa (ORCPT ); Sat, 14 May 2016 10:22:30 -0400 Received: by mail-oi0-f41.google.com with SMTP id k142so211306589oib.1 for ; Sat, 14 May 2016 07:22:30 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1463184168-3381-4-git-send-email-jonathan.derrick@intel.com> References: <1463184168-3381-1-git-send-email-jonathan.derrick@intel.com> <1463184168-3381-4-git-send-email-jonathan.derrick@intel.com> Date: Sat, 14 May 2016 07:22:29 -0700 Message-ID: Subject: Re: [RFCv2 3/3] block: Introduce S_HIPRI inode flag From: Dan Williams To: Jon Derrick Cc: linux-block@vger.kernel.org, Jens Axboe , Alexander Viro , linux-fsdevel , Jeff Moyer , Stephen Bates , Keith Busch , linux-nvme@lists.infradead.org, Christoph Hellwig , "Martin K. Petersen" Content-Type: text/plain; charset=UTF-8 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: [ adding Martin, given his hint infrastructure that is in the works... ] On Fri, May 13, 2016 at 5:02 PM, Jon Derrick wrote: > S_HIPRI is a hint that indicates the file (currently only block devices) > is a high priority file. This hint allows direct-io to the block device > to poll for completions if polling is available to the block device. > > The motivation for this patch comes from tiered caching solutions. A > user may wish to have low-latency block devices act as a cache for > higher-latency storage media. > > With the introduction of block polling, polling could be enabled on a > queue of a block device. The preadv2/pwritev2 sets allowed a user to > specify per-io polling, but removed the ability to poll per-queue. > > Instead of having a user modify their software to use preadv2/pwritev2, > this patch allows a user to set S_HIPRI on a block device file to request > all direct-io for this file to be polled. Setting aside whether this should be a per-task ioprio hint vs a block device inode hint, this single flag loses the granularity of whether reads or writes are polled. Low latency reads with posted writes seems a valid configuration.