From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH 01/11] DIO: Separate fields only used in the submission path from struct dio Date: Mon, 08 Aug 2011 13:59:08 -0400 Message-ID: References: <1312259893-4548-1-git-send-email-andi@firstfloor.org> <1312259893-4548-2-git-send-email-andi@firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, Andi Kleen To: Andi Kleen Return-path: In-Reply-To: <1312259893-4548-2-git-send-email-andi@firstfloor.org> (Andi Kleen's message of "Mon, 1 Aug 2011 21:38:03 -0700") Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Andi Kleen writes: > From: Andi Kleen > > This large, but largely mechanic, patch moves all fields in struct dio > that are only used in the submission path into a separate on stack > data structure. This has the advantage that the memory is very likely > cache hot, which is not guaranteed for memory fresh out of kmalloc. > > This also gives gcc more optimization potential because it can easier > determine that there are no external aliases for these variables. > > The sdio initialization is a initialization now instead of memset. > This allows gcc to break sdio into individual fields and optimize > away unnecessary zeroing (after all the functions are inlined) > > Signed-off-by: Andi Kleen The pages array is only used on submission. Why did it land in the struct dio? I would also think you'd want to keep it close to curr_page, head, tail. Cheers, Jeff