Received: by 10.213.65.68 with SMTP id h4csp871977imn; Thu, 22 Mar 2018 10:22:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELtzrSJ9e26+mjojXW7z8JYgjlEYO//NYQegVTYV50V3qsHPI8lDsU6AzJ9lklRBiFMDa1nh X-Received: by 2002:a17:902:684d:: with SMTP id f13-v6mr15805157pln.230.1521739374964; Thu, 22 Mar 2018 10:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521739374; cv=none; d=google.com; s=arc-20160816; b=pj784KaX5q0WjKBL+lUJ2wXzbZC9rWXssgepLve8b02S2MDed4VEbwle08uyDW0l5g mcf+Ny/u1DGki00kHC4gycblSTiYr8CxHz15DFXdFURmqiJb8t0pL0qOf764kUcWeigs OdNBTu3Idw7lnsU9NOtjmuL0ISAte4GT/gkZt+QfegbQ4jS9NaJGrh3ctIeG5miov3vV +/85tqR70PXfTk2Oyfcil5UwDASF2IX57GWbijGrO0YPLXl7bHEC0o73+sjO1J/3+woC 2eRpG4/9Ovi0hRk8XQW5JAcPTGDGCtDDCs1YUwnWp4CNdP73UZKzgIDpMO5e53ceeCbb BYEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=tl9BMcr88pBEHIWhKVm7anMpRIQdHu16bLj/p3cJfDI=; b=QDWV65v9WEYYxHenMgNtsCgYBFUQxqbNBBgvbRE8VzA1CDqkYbdtimTbV+Qzjm3c4J lznGBNDqoQ3uSHv48hExCguQfOK7W8J4d5hV85oCXSqGZZulh76PPvqlZo4u0T22P2M3 kLVCV/iyEvXZn8lGJRuegvF5tA1KUHawNrg3Ni/i9jaa1ePUy81jt9pWqIVr4SWKwG5z xrz8/zrWTCpAE6d2G6eg0xKSJ/sAt2c5oNQYtSNyjLUGi6I7jGfDxTkt76DptuLNZC/g fsvTjfMTymeEFZD9Zxz4N+St2bqqlQ/T8xpkBm6EGLZlZjy/7MGJDlq5C3iqvLrU/m+X VYTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QK98CJD8; dkim=fail header.i=@linux-foundation.org header.s=google header.b=bM+zzynl; 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 b9si4700916pgn.443.2018.03.22.10.22.40; Thu, 22 Mar 2018 10:22:54 -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=fail header.i=@gmail.com header.s=20161025 header.b=QK98CJD8; dkim=fail header.i=@linux-foundation.org header.s=google header.b=bM+zzynl; 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 S1751909AbeCVRQt (ORCPT + 99 others); Thu, 22 Mar 2018 13:16:49 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:35588 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbeCVRQq (ORCPT ); Thu, 22 Mar 2018 13:16:46 -0400 Received: by mail-it0-f68.google.com with SMTP id v194-v6so12074849itb.0; Thu, 22 Mar 2018 10:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tl9BMcr88pBEHIWhKVm7anMpRIQdHu16bLj/p3cJfDI=; b=QK98CJD8iKHGM0GQCepnAk2DlqqhLkQ7JAMM8AGvtQDqWhfDACj2NlOsdrmjnybLHt SdvXDcCUEoy8t8MKKwEhto36PTJUnHOP1KXImtou7NvLSqQxEnCdYrOChKQIi0zssJyq hljvs7j1Y0H20OOO+hde3z649E+ZJrqCH7PfoP8hQh56PbovlYmjr22IeBhwxJ48SYnS czdxFb9rtzA5dw0Q9Mjc/Y3Gs5atA8DyEJjyYcljVYHvuyiFEXdcjdjcKX4+tPLieZcQ a1OgOb4oLllfqOASl76+5W0NXw0hZ0K8brTp/QHvws+nEcfIwucpdHqLtetDnFkNKt0i S5dQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tl9BMcr88pBEHIWhKVm7anMpRIQdHu16bLj/p3cJfDI=; b=bM+zzynl64e0L+u+75Vh9RDhVVMRwhfEDMtAJ7sVpBipiFkiDwN3NbgOa8oJxVfMRy zAvt3jF8QLtMPxtnXlAtrAqcm5mBxgaIYB82km46iMUhc4FzSArrMRaNGO811nYz12/A GhL3VApvj0lPkEGbbwJ2sYR/EECHIzU9hxefs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=tl9BMcr88pBEHIWhKVm7anMpRIQdHu16bLj/p3cJfDI=; b=fs1nCOKAJU684fB03CM8V4pWLrt9qOz7RX7f/pa46/WQ0crVdSTR20aCKWfM5K1LAi 8EnisSJlYsvNGwDnI1/AfLXUpo874KOIb/RJ8kUQEUvmF+EHZlpit7d6S7Wd2QV3/5B9 DXHnKDHl//3g4WoG1G+00mvy94PpJYKWu+ibCFbZ2DlQSKiVToLgiPOBoeEVV0B0hU2w M2sAKodFiuSk2aBMvwX4xs0prALyXCUGS/M6FYN6bE02tm2uFzAj/HX4gY63aR1tVZOR Tkn6T5TqsCEyLmf6DaXf/AhHxWFPdj/ClEWMXRJ99WZp98klRNJ4ai5jMQH5EOkRQRmX RvRA== X-Gm-Message-State: AElRT7FDasb3s/KqFCaWsYNgS9aDn4V17Aydh7CAzTj7lsnesHIl0Nmk e7CJHeo7osbFcylQHybFpzcAJD00sMta0vTmWgs= X-Received: by 2002:a24:94cc:: with SMTP id j195-v6mr9673739ite.1.1521739005871; Thu, 22 Mar 2018 10:16:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.95.15 with HTTP; Thu, 22 Mar 2018 10:16:45 -0700 (PDT) In-Reply-To: <035ac754e54a4b14844f3300ae1432a9@AcuMS.aculab.com> References: <6ec3e7e0c70e85a804933f27bb4275d5363c044b.1521469118.git.rahul.lakkireddy@chelsio.com> <20180320133206.GB25574@chelsio.com> <035ac754e54a4b14844f3300ae1432a9@AcuMS.aculab.com> From: Linus Torvalds Date: Thu, 22 Mar 2018 10:16:45 -0700 X-Google-Sender-Auth: uigpxQIyNtnv5KZ-FW3jwYEgzjg Message-ID: Subject: Re: [RFC PATCH 2/3] x86/io: implement 256-bit IO read and write To: David Laight Cc: Alexander Duyck , Rahul Lakkireddy , Thomas Gleixner , "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" , Ganesh GR , Nirranjan Kirubaharan , Indranil Choudhury Content-Type: text/plain; charset="UTF-8" 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 3:48 AM, David Laight wrote: > From: Linus Torvalds >> >> Note that we definitely have seen hardware that *depends* on the >> regular memcpy_fromio()" not doing big reads. I don't know how >> hardware people screw it up, but it's clearly possible. [ That should have been "big writes" ] > I wonder if that hardware works with the current kernel on recent cpus? > I bet it doesn't like the byte accesses that get generated either. The one case we knew about we just fixed to use the special "16-bit word at a time" scr_memcpyw(). If I recall correctly, it was some "enterprise graphics console". If it's something I've found over the years, is that "enterprise" hardware is absolutely the dregs. It's the low-volume stuff that almost nobody uses and where the customer is used to the whole notion of boutique hardware, so they're used to having to do special things for special hardware. And I very much use the word "special" in the "my mom told me I was special" sense. It's not the *good* kind of "special". It's the "short bus" kind of special. > For x86 being able to request a copy done as 'rep movsx' (for each x) > would be useful. The portability issues are horrendous. Particularly if the memory area (source or dest) might be unaligned. The rule of thumb should be: don't use PIO, and if you *do* use PIO, don't be picky about what you get. And most *definitely* don't complain about performance to software people. Blame the hardware people. Get a competent piece of hardware, or a competent hardware designer. Let's face it, PIO is stupid. Use it for command and status words. Not for data transfer. Linus