Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1402836imj; Fri, 8 Feb 2019 00:32:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IaFg8nJn0mGHYcCeia5XIxmmp7NmWJMaCfbr4VuW8A/mv9eE5niofhtlEkxOt+6V+mEdpuO X-Received: by 2002:a17:902:8f98:: with SMTP id z24mr21098772plo.40.1549614753434; Fri, 08 Feb 2019 00:32:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549614753; cv=none; d=google.com; s=arc-20160816; b=yc4vqPCX0BnvT9i5hRAIbFp/AWI4PU8ugfHRsgO/BF7RQdPnKXgHv2FArPCNgKd0FG eZjj/smssX4SnAY6teTQZn5PtJO2DVxSkCPjdPet3pjcUywqTqwuPvTpynea+NjtirNd xwgE3glCukjYkoz9yU87IGNzYrCr2Dsz7xEyIZnWrtB8tSJh8EuCFke9EVDG0bXe2ezM Md0MXTvBTiuauQAg15nVzMC8W4SVdL4G+mD5s7S9Nr7rGVMkpkjyF79PpjTQFM0pQEy8 37wDYIZtsj3talP+dA0kmW2PVigmgV4RaE1jR0UYOs82SH1lffCTUAZpWNU40+iHH5q+ DklA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=e9o0xEZeVxGkGRYq+FrqLeZRYKbVYwBBNVU1Vhi1O7c=; b=E36YRbp9Ami4V4/dnzbO0O7zwHPdorCQZy4HMcGGqoHeLZ4sYp1CTHew2vBYe0LrC/ 1bEvhNsqi9JeMRv+/fSK/V6V+M+iU2WEP6Vav+To3pxByh8qT7njCPwfg+c8uLAyz2Ip M08xeWa2o0Ks5JODitJmMnA9rYXKdVxUeSUuLZuABrd6bn5oQ7V9DJb0K3yAsM1hptao yswUg+sqJIKG7VfYQbrSTtl/xgqPHycfULR49Bj3IWpg1kD6pt3uyksVwYlADvdZWd+H kQUqzCiuO5S2xGbg6++HDYHpUCukY50UYY4mAscwPUzyjPDCy8yiAsU7bAomAcLJNf2p 0QgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b="d4jlx/3n"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si1559183pfi.184.2019.02.08.00.32.17; Fri, 08 Feb 2019 00:32:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b="d4jlx/3n"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727273AbfBHIb0 (ORCPT + 99 others); Fri, 8 Feb 2019 03:31:26 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46130 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfBHIbZ (ORCPT ); Fri, 8 Feb 2019 03:31:25 -0500 Received: by mail-lf1-f65.google.com with SMTP id f5so1873334lfc.13 for ; Fri, 08 Feb 2019 00:31:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=e9o0xEZeVxGkGRYq+FrqLeZRYKbVYwBBNVU1Vhi1O7c=; b=d4jlx/3nA/a5G7syHqg2prvdxFpGgbBoY21yMrmJkBeBq03jK/tjjyC3ad2yAifFhc cPqTUdPHzxs6WThF95eB9FAe9zclG3k1aJ6TbaJQfqbbDhbOwpGG9CT08esoy9vCiZLE +/mPVCXFiYcAHBKiBrj+1FxDmKNJkHjCJJejVnz5i4b7PkKqVIrfU+pinba2vLJTbN6g SETyheeaOhPNNm5rbtFCOdNTVLQvlzpQ/iuWf2nvSRt6SB04KW/OwluWcPTRQTXlpzsw JuhdbPvzy9BLv5fNtao3neUBWc3QWFsTFa7+e7xQpCTB9dvD7ykGqkh6EfBwWGQr+WE5 jYAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=e9o0xEZeVxGkGRYq+FrqLeZRYKbVYwBBNVU1Vhi1O7c=; b=h5wUnB9VtDIzGyxpOd25PU3BPa14yoYdDsahBimitkAmr3JwbNGgkusfUenH7pfEqG nMDtjJ+JF2zF/4bJYJKymsQahKowudl0+tRaz/ULd2XN4bLSaj+T05a5S9rEzlm62J5x l3jWnNuBD6NDjZrxuEAnd/klxboJljFBm+6HFXvGmp2pX8P/27oMphXxb0XEJlwA8HmS pMba3P4womacU4qZzbL+uOHXElHiNLPjpVxnNyCIg1g9yM9Em/5r2susSez8VKVPv4Ui HUqxj5bWrBdGgBjp/HICkcrytTI/l9Wlo7c2L49ypKK2Vr7stYTrJo2UrJnmLZ4GOHW5 zNCw== X-Gm-Message-State: AHQUAuYEMrcYaRY12O9q8ySQ0LtrIsKJkMjV8OsNKSHXapTIFMQ/V3FI L6L7uFs3eKXhDFbbQnkCvYyB9Q== X-Received: by 2002:a19:9508:: with SMTP id x8mr12577498lfd.112.1549614683327; Fri, 08 Feb 2019 00:31:23 -0800 (PST) Received: from [192.168.0.36] (2-111-91-225-cable.dk.customer.tdc.net. [2.111.91.225]) by smtp.googlemail.com with ESMTPSA id q10-v6sm239573ljj.3.2019.02.08.00.31.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 00:31:22 -0800 (PST) Subject: Re: [LSF/MM TOPIC] BPF for Block Devices To: Stephen Bates , Jens Axboe , linux-fsdevel , linux-mm , "linux-block@vger.kernel.org" , IDE/ATA development list , linux-scsi , "linux-nvme@lists.infradead.org" , Logan Gunthorpe Cc: "linux-kernel@vger.kernel.org" , "lsf-pc@lists.linux-foundation.org" , "bpf@vger.kernel.org" , "ast@kernel.org" References: <40D2EB06-6BF2-4233-9196-7A26AC43C64E@raithlin.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: Date: Fri, 8 Feb 2019 09:31:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <40D2EB06-6BF2-4233-9196-7A26AC43C64E@raithlin.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/7/19 6:12 PM, Stephen Bates wrote: > Hi All > >> A BPF track will join the annual LSF/MM Summit this year! Please read the updated description and CFP information below. > > Well if we are adding BPF to LSF/MM I have to submit a request to discuss BPF for block devices please! > > There has been quite a bit of activity around the concept of Computational Storage in the past 12 months. SNIA recently formed a Technical Working Group (TWG) and it is expected that this TWG will be making proposals to standards like NVM Express to add APIs for computation elements that reside on or near block devices. > > While some of these Computational Storage accelerators will provide fixed functions (e.g. a RAID, encryption or compression), others will be more flexible. Some of these flexible accelerators will be capable of running BPF code on them (something that certain Linux drivers for SmartNICs support today [1]). I would like to discuss what such a framework could look like for the storage layer and the file-system layer. I'd like to discuss how devices could advertise this capability (a special type of NVMe namespace or SCSI LUN perhaps?) and how the BPF engine could be programmed and then used against block IO. Ideally I'd like to discuss doing this in a vendor-neutral way and develop ideas I can take back to NVMe and the SNIA TWG to help shape how these standard evolve. > > To provide an example use-case one could consider a BPF capable accelerator being used to perform a filtering function and then using p2pdma to scan data on a number of adjacent NVMe SSDs, filtering said data and then only providing filter-matched LBAs to the host. Many other potential applications apply. > > Also, I am interested in the "The end of the DAX Experiment" topic proposed by Dan and the " Zoned Block Devices" from Matias and Damien. > > Cheers > > Stephen > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/netronome/nfp/bpf/offload.c?h=v5.0-rc5 > > > If we're going down that road, we can also look at the block I/O path itself. Now that Jens' has shown that io_uring can beat SPDK. Let's take it a step further, and create an API, such that we can bypass the boilerplate checking in kernel block I/O path, and go straight to issuing the I/O in the block layer. For example, we could provide an API that allows applications to register a fast path through the kernel — one where checks, such as generic_make_request_checks(), already has been validated. The user-space application registers a BFP program with the kernel, the kernel prechecks the possible I/O patterns and then green-lights all I/Os that goes through that unit. In that way, the checks only have to be done once, instead of every I/O. This approach could work beautifully with direct io and raw devices, and with a bit more work, we can do more complex use-cases as well.