From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 3.mo3.mail-out.ovh.net ([46.105.44.175]:57729 "EHLO 3.mo3.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732373AbeGLPSU (ORCPT ); Thu, 12 Jul 2018 11:18:20 -0400 Received: from player756.ha.ovh.net (unknown [10.109.120.93]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id 1CEDE1BA9AD for ; Thu, 12 Jul 2018 16:59:27 +0200 (CEST) Date: Thu, 12 Jul 2018 16:59:14 +0200 From: Greg Kurz To: Dominique Martinet Cc: Matthew Wilcox , Latchesar Ionkov , Eric Van Hensbergen , linux-kernel@vger.kernel.org, Ron Minnich , linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net Subject: Re: [V9fs-developer] [PATCH v2 4/6] 9p: Embed wait_queue_head into p9_req_t Message-ID: <20180712165914.7d1f949f@bahia.lan> In-Reply-To: <20180712144012.GA21574@nautica> References: <20180711210225.19730-1-willy@infradead.org> <20180711210225.19730-5-willy@infradead.org> <20180712163649.36057b6e@bahia.lan> <20180712144012.GA21574@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 12 Jul 2018 16:40:12 +0200 Dominique Martinet wrote: > Greg Kurz wrote on Thu, Jul 12, 2018: > > This is true when all tags have been used at least once. But the current code > > lazily allocates the wait_queue_head_t, ie, only when a tag is used for the > > first time. Your patch causes a full row of wait_quest_head_t to be pre-allocated. > > > > ie, P9_ROW_MAXTAG * 24 = 255 * 24 = 6120 > > > > instead of (P9_ROW_MAXTAG * 8) + 24 = 255 * 8 + 24 = 2064 > > > > This is nearly a page of allocated memory that might be never used. > > > > Not sure if this is a problem though... > > I thought the exact same, but the next patch in the serie removes that > array and allocates even more lazily with a slab, so this was a > no-brainer :) > Ah ? I haven't started looking at that *big* other patch yet... :)