Received: by 10.213.65.68 with SMTP id h4csp885697imn; Thu, 22 Mar 2018 10:42:00 -0700 (PDT) X-Google-Smtp-Source: AG47ELs/POUPmFYDmTCPqN/WwlYbj0FA+9aE6nv/tNmbiz9P6BBMqjLn9ClFoNGg8GpRY2AYKvsT X-Received: by 2002:a17:902:7787:: with SMTP id o7-v6mr26178789pll.75.1521740520553; Thu, 22 Mar 2018 10:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521740520; cv=none; d=google.com; s=arc-20160816; b=fKiiARIfUENE4aOyPAmqL6PonvwimJ1Ap8Kp5kgWDABK31JhML0aJ6sHkEZbyMUpMC 7k5JYsVnRWkRzMff2vpValFXP8A5tTffJ/TXdP+pwgIKru282o1iKJihfojq6fyyQxLe J7/9eT2ZVPp92FFijZDErvFHZs7WQ7whaOji1eB2B4rFCFrypc0Uh0od68YaUARj1ZS2 CR4Yn3qc8E+4EpAF5Sc5Rs5IOqGfZGIfEHLg8zx9yas6jUgg18KHO28TCKitDNDcdr6p 0DxFOzkWrMQpOObl8HIgsvYYtM9P8mQIrzIapLa6cmEcBM2f88sojwmNVG0Gj+LgQ15h ewWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=5K3V8Lqxc/uHuyrqM84KPVr4XIy+bMeUrBZMzTO8uCM=; b=mjy3wHl/VQi67M0ltbbEkvGeP2lXgkYO34DOl7TzImwE0Y0bRIsC9rQp5eGlQdZYun blDTZhD1iLyILBU2azjaR8hZrGAWBRCZhPyEJpsoAkzTwq0k/ugjr4Qeltb3NVDrQ3Hs IHNYD3mFax9jKyM0lAD+ZfEsgKTSKJC6It2qZyM0Oxu1iJzCT4FLUp0SmlZxXbDc4+Sn voR6hKUN0ZseqdvzNqWJRCsAN1k7PBKdIY/pUEA9eOAS2I5+yYsQnEvzhUUMEaB25GFp AUmt14/fLs8NsJMyNayZLLfjeH2bD9rpGZZuMvijUl1UbI2uWnp8aNJVXtmttT9WVz2o If5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pze8mRQZ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1-v6si7432482pll.57.2018.03.22.10.41.46; Thu, 22 Mar 2018 10:42:00 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=Pze8mRQZ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751921AbeCVRkk (ORCPT + 99 others); Thu, 22 Mar 2018 13:40:40 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:36998 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbeCVRka (ORCPT ); Thu, 22 Mar 2018 13:40:30 -0400 Received: by mail-pl0-f65.google.com with SMTP id w12-v6so5759213plp.4; Thu, 22 Mar 2018 10:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5K3V8Lqxc/uHuyrqM84KPVr4XIy+bMeUrBZMzTO8uCM=; b=Pze8mRQZ/mcvUHj2JmmY9NHKcDuRzmaO/6fXhAhaN02PveAewTDLzhsDoI/r1ca1gt EF0ogGbvQUlLdyF04LdcbP5mcA6picq4cIV2dF5QAD7by+QSbxcVAwqSFR0sav9SALoK V7wGSw7IrKF/TKjUWapw+9OmerHl5LNXKjfueC7kuf1KWaKOrZafRh1FROClb+lELnCT 84Y1II0FHkvpNcaOZbCLftaq9Sn2tKOTUURIPyrCZ87B3UfstN1qJBP9NKJ/raZwLaB3 ljerT7mrAz2DZ9P9/gCv7+QSVB5uy7ydmYEyx+sqF2G2xiJ+VP41c5Elst2JlW8Z/E2f xdOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5K3V8Lqxc/uHuyrqM84KPVr4XIy+bMeUrBZMzTO8uCM=; b=JfNU8roG9VCBa1Hy7q/1MgDG3ctZAmozDingnDYm1LDZzu5m2DQPg8kdhsIidVfP/6 sPsGXCv7qC9Md4FKA2LayJlJ51eJvk+IuWifNpd2Sv8jw9qGqAHRh4s9QXgADoSepGxr zhOMU2kAttgQJvyojtCwbPZ9plLcpcwTs/eNw5U1JDfaMomITWKC0fzLcSh2cabk620j E+YnAkxpQn4M44Etz1qODPIP9a0hgx342u9EEbtNEDJ1DNn/rJuxQTc/X6u/V60RrPv9 26YfBux4U5GOFBLgxzH33Z6+VLEbGZgBdu1DcVJol7s8QPSm0D4EBm1QfMfRBEsZXFmY r2nA== X-Gm-Message-State: AElRT7F1V/hjq+Q2L7bdcz5LQ2NdOoTAICoYDqfeYmhrRZArBvw0zPR2 312vCg0C+2jNL0fGwyNeXvo= X-Received: by 2002:a17:902:9009:: with SMTP id a9-v6mr25365795plp.272.1521740429761; Thu, 22 Mar 2018 10:40:29 -0700 (PDT) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:200::4:da58]) by smtp.gmail.com with ESMTPSA id d83sm9799514pfl.176.2018.03.22.10.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 10:40:28 -0700 (PDT) Date: Thu, 22 Mar 2018 10:40:25 -0700 From: Alexei Starovoitov To: Ingo Molnar Cc: Linus Torvalds , Thomas Gleixner , David Laight , Rahul Lakkireddy , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "mingo@redhat.com" , "hpa@zytor.com" , "davem@davemloft.net" , "akpm@linux-foundation.org" , "ganeshgr@chelsio.com" , "nirranjan@chelsio.com" , "indranil@chelsio.com" , Andy Lutomirski , Peter Zijlstra , Fenghua Yu , Eric Biggers , Daniel Borkmann Subject: Re: [RFC PATCH 0/3] kernel: add support for 256-bit IO access Message-ID: <20180322174024.tuillc5ojh4oadf4@ast-mbp.dhcp.thefacebook.com> References: <7f0ddb3678814c7bab180714437795e0@AcuMS.aculab.com> <7f8d811e79284a78a763f4852984eb3f@AcuMS.aculab.com> <20180320082651.jmxvvii2xvmpyr2s@gmail.com> <20180321074634.dzpyjz3ia46snodh@gmail.com> <20180322093343.aatl3prhheha4dlm@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180322093343.aatl3prhheha4dlm@gmail.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 22, 2018 at 10:33:43AM +0100, Ingo Molnar wrote: > > - I think the BPF JIT, whose byte code machine languge is used by an > increasing number of kernel subsystems, could benefit from having vector ops. > It would possibly allow the handling of floating point types. this is on our todo list already. To process certain traffic inside BPF in XDP we'd like to have access to floating point. The current workaround is to precompute the math and do bpf map lookup instead. Since XDP processing of packets is batched (typically up to napi budget of 64 packets at a time), we can, in theory, wrap the loop with kernel_fpu_begin/end and it will be cleaner and faster, but the work hasn't started yet. The microbenchmark numbers you quoted for xsave/xrestore look promising, so we probably will focus on it soon. Another use case for vector insns is to accelerate fib/lpm lookups which is likely beneficial for kernel overall regardless of bpf usage.