From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition Date: Thu, 14 Jun 2018 12:12:16 -0700 Message-ID: <1889d389-a741-aa7b-c2b1-14530fb44ba8@gmail.com> References: <20180614005309.17357-1-saeedm@mellanox.com> <82f89ebc-713c-1b97-0d0a-e455094e2638@gmail.com> <9a8f7e1b2b51320178f671c2ae57d7d54be5af5a.camel@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , "edumazet@google.com" To: Saeed Mahameed , "eric.dumazet@gmail.com" , "kafai@fb.com" , Tariq Toukan Return-path: Received: from mail-pl0-f45.google.com ([209.85.160.45]:41324 "EHLO mail-pl0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755378AbeFNTMS (ORCPT ); Thu, 14 Jun 2018 15:12:18 -0400 Received: by mail-pl0-f45.google.com with SMTP id w8-v6so2536569ply.8 for ; Thu, 14 Jun 2018 12:12:18 -0700 (PDT) In-Reply-To: <9a8f7e1b2b51320178f671c2ae57d7d54be5af5a.camel@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/14/2018 11:56 AM, Saeed Mahameed wrote: > Interestingly for this exact frag_stride we don't have an issue :) > since it goes through a different condition branch > (the page flipping thing): > > if (frag_info->frag_stride == PAGE_SIZE / 2) { > frags->page_offset ^= PAGE_SIZE / 2; > release = page_count(page) != 1 || > page_is_pfmemalloc(page) || > page_to_nid(page) != numa_mem_id(); > I guess you forgot to test on PowerPC where PAGE_SIZE=65536 ? On PowerPC, the first branch is never taken.