Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp784734img; Tue, 26 Feb 2019 08:32:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IYP9MLtGBX4pofhPpRV2g+UZSxuw+2ZVKKgDPZPXeI3bt64GB/7tL0EZ9x9kOn3La7KXRaL X-Received: by 2002:a63:1c02:: with SMTP id c2mr25401533pgc.351.1551198758958; Tue, 26 Feb 2019 08:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551198758; cv=none; d=google.com; s=arc-20160816; b=s2ZVAwf6ywTHA0cgFj2b6FHtHVuOKA/xxUUW4FSq7Mg3i5nsxLL/j/qEApkZiGgsC6 45ylWhKDcszsrohy54bbfSHOat3JkdC6IRt+R+ed4SmLtyvN1deNKxBJbKKu1fW+roiS NWNQ6u/Sonhacle+d+AFcfSTICzkZF9gbrPUYvdSCg4hJ4W3GCuhLUFTWInhw3BPmVzt DrNPE01BuaenkvIzo8OJHeg6o19w0Zn/Lqt4FErlkcRGNTn92kvcHOXMBLcoCncONxgn NRsc7qbwhMMX+S3yDToqcAniTFu3jGqOil3AJQSY3UjGwAdJ4HQzjyQEo88uKakheqQy GRbg== 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=eliy+LXVAm/reO1JhBaGptnuIQdxQu+wUBgKDytlVvQ=; b=KNmuANupajQ01yg4PgztBKH5pqi+eH0H/0rT5Uyr8iBN9zJ5ddiU66VxNQgxIjmZyV u3qGVE711OGoJisoUfDMBsPWnBOugySKVQIBcHE9xwrvnKLFKDeCy1Jei8va2edFcCDk uohQ3NmraJe2+evgsh7Eq/qFeF0/frwPdvsFGvT4aIXGQN5p9SvP80kxYrOCKzPxletB pTofBoOKkndDe5znaBlOKCX14GnxVnZQfrxJ0yGXB2ntowDIAhdfeEfTvJbt8VBG+RCl DXrXD4QOx4JkKQKh9k32cNvzIN+2YCe5ITqzemgG/BQOlTDoOM+xUg9YwC1aMhDkR76q 92qQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l70si12444924pgd.470.2019.02.26.08.32.22; Tue, 26 Feb 2019 08:32:38 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728165AbfBZQb4 (ORCPT + 99 others); Tue, 26 Feb 2019 11:31:56 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:38046 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbfBZQb4 (ORCPT ); Tue, 26 Feb 2019 11:31:56 -0500 Received: by mail-yw1-f65.google.com with SMTP id o184so5637413ywo.5 for ; Tue, 26 Feb 2019 08:31:55 -0800 (PST) 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=eliy+LXVAm/reO1JhBaGptnuIQdxQu+wUBgKDytlVvQ=; b=RLEEwkx/zAkzrJHU+a5h36RbqUF3wTxRBiEZ0MD76F1LnVFeHsVUnhXI+YGbwJcrmA 9zqAr9Ziqoe9PgUKi+9U6SBcD8KVvApK5/o9grb/VX2NNfDV3rtJY+24/cGt4iu0AH/T 2hZ8wBd4jmfxVwWVXDf//sCMs4gvO8t4DNSs/0urSppqDgMKU8eLu9eusaylaiJvPBez wfoYE+jbEtb4RpPAhmkOTd5xWrT2grr5ztBgnQ/MyoaKHeaXWfuAflpUX6fVf/wz6NXn dqQtnARlY1P6PjHV2IOOCeT/cJlDRhm6+pxTCtUyhgqNLD62/W/3VjbIWwdiShWZJ1Bv 4cXQ== X-Gm-Message-State: AHQUAuYXW2Ukzk6wiuxAMRVspXRr+vCDZHeOHhSqXtD9kUcbS6651n8V 1p9ydVQakGFNagmO8Zzz43I= X-Received: by 2002:a25:8882:: with SMTP id d2mr19048907ybl.381.1551198715061; Tue, 26 Feb 2019 08:31:55 -0800 (PST) Received: from dennisz-mbp.dhcp.thefacebook.com ([2620:10d:c091:200::2:7f17]) by smtp.gmail.com with ESMTPSA id f188sm4204686ywb.64.2019.02.26.08.31.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 08:31:53 -0800 (PST) Date: Tue, 26 Feb 2019 11:31:51 -0500 From: Dennis Zhou To: Christopher Lameter Cc: "dennis@kernel.org" , Peng Fan , "tj@kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "van.freenix@gmail.com" Subject: Re: [PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0] Message-ID: <20190226163151.GA47262@dennisz-mbp.dhcp.thefacebook.com> References: <20190224132518.20586-1-peng.fan@nxp.com> <20190224132518.20586-2-peng.fan@nxp.com> <20190225151616.GB49611@dennisz-mbp.dhcp.thefacebook.com> <010001692a605709-407cf476-e7b6-43be-8551-66c54059e92f-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <010001692a605709-407cf476-e7b6-43be-8551-66c54059e92f-000000@email.amazonses.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 03:15:50PM +0000, Christopher Lameter wrote: > On Mon, 25 Feb 2019, dennis@kernel.org wrote: > > > > @@ -67,7 +67,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) > > > pcpu_set_page_chunk(nth_page(pages, i), chunk); > > > > > > chunk->data = pages; > > > - chunk->base_addr = page_address(pages) - pcpu_group_offsets[0]; > > > + chunk->base_addr = page_address(pages); > > > > > > spin_lock_irqsave(&pcpu_lock, flags); > > > pcpu_chunk_populated(chunk, 0, nr_pages, false); > > > -- > > > 2.16.4 > > > > > > > While I do think you're right, creating a chunk is not a part of the > > critical path and subtracting 0 is incredibly minor overhead. So I'd > > rather keep the code as is to maintain consistency between percpu-vm.c > > and percpu-km.c. > > Well it is confusing if there the expression is there but never used. It > is clearer with the patch. > Okay. I'll apply it with your ack if that's fine. Thanks, Dennis