Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp935868img; Tue, 26 Feb 2019 11:06:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IbSF5VCyZSq87jW1GjDnoreipkB4feUfi2SWaBCwm7MdygyQ9Clvzw6CbptbzvO1237vEkU X-Received: by 2002:a17:902:5a5:: with SMTP id f34mr27870086plf.161.1551208007655; Tue, 26 Feb 2019 11:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551208007; cv=none; d=google.com; s=arc-20160816; b=iIJFHEKndloHAziAPJdfAS0LZHNkTb86KHI2c+hO0i2bXoM6VZ9PuOTp2JEx1HuU4T 0iVstx5WE4bKz6V7NZJ0kvQkZdDLcgA+qo2yZKfyCID45OvkkuuknZQqM9IFjJJMkfEI mb6xFRJX0JMCkoYf8azY9R0doDO2jtIem7x2lcOg30xJ5f7KrWH8xODqf/Iz96POctPG pyeyZ6qJNOvrzM1QfnBhwkuZ1PDBr1RIAjWkxA8TAA+m6xI+o2Jhqp24OuoL+bKRRBHr lLvetKU+8Ljs0KRzEHhv+z9HB4IuVSrylacbDAegjCHhxzNoHIrHUYKCBYgpaelwk9E2 nxiw== 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; bh=MNQeXEKtzbfRjAwArqs9hDzJulHWJXgeC1VKhPgnETY=; b=qhLJZ9zIptG06onKYN12gmPemym1uijocKkeueHRm+A4sa5aFhfVQUUBYqyyLLi1sm DYWMSM+CWa8vGkPpqKERcGpp/9PeX7uIk8HwssjCEhkYnP8WWu4VN1LNDOxysGNmTdVU u3Jpu5e+maLnKb6IpUJz4ZMDayW63gPrXRlT1G/I18CGtQIy0dj8nYNFa+nWCE1tqXBz 4epDoV5Q4v+m78P0oPaTgPh0MRsU8WvCY5QhIT3v6Bu9ROTOLIHmWzN/xajEFkOhyLRD w1XLM4AG52lW8DNCs/kjl3yxBY21KPYqnFvLR3Nsuh+Ii+84we+ws2NJCvw6vsD7bwNH DGcw== ARC-Authentication-Results: i=1; mx.google.com; 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 f30si13276053pgl.340.2019.02.26.11.06.31; Tue, 26 Feb 2019 11:06:47 -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; 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 S1728879AbfBZTEj (ORCPT + 99 others); Tue, 26 Feb 2019 14:04:39 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:37846 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728817AbfBZTEi (ORCPT ); Tue, 26 Feb 2019 14:04:38 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1gyi1o-0000Ga-C8; Tue, 26 Feb 2019 19:04:32 +0000 Date: Tue, 26 Feb 2019 19:04:32 +0000 From: Al Viro To: Eric Dumazet Cc: "David S . Miller" , linux-kernel , netdev , Eric Dumazet Subject: Re: [PATCH v2] iov_iter: optimize page_copy_sane() Message-ID: <20190226190431.GK2217@ZenIV.linux.org.uk> References: <20190226184239.49946-1-edumazet@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226184239.49946-1-edumazet@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 26, 2019 at 10:42:39AM -0800, Eric Dumazet wrote: > Avoid cache line miss dereferencing struct page if we can. > > page_copy_sane() mostly deals with order-0 pages. > > Extra cache line miss is visible on TCP recvmsg() calls dealing > with GRO packets (typically 45 page frags are attached to one skb). > > Bringing the 45 struct pages into cpu cache while copying the data > is not free, since the freeing of the skb (and associated > page frags put_page()) can happen after cache lines have been evicted. Applied.