Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1776984imm; Thu, 12 Jul 2018 07:41:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcRUBH2TnVbRHHAwRdSzPHXp7n8KiJgGJ/fgqpKtoWNZyZDPwUwHhTMXPktVVgiCJWJkyBY X-Received: by 2002:a17:902:e3:: with SMTP id a90-v6mr2493822pla.227.1531406489424; Thu, 12 Jul 2018 07:41:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531406489; cv=none; d=google.com; s=arc-20160816; b=xp1gAKDOQsrXgleoOf5+qzP95ShGat5aw1vSWLJ1Uf7A/0qxNd74GQ7ub4QtrMA7iS Tiu5p0LYVYkFErqKlha8yg0wYLS5uktuWhmobPzffpnywpuA1iOEGnCIQRLvt/xsrqZa WFKopbMKF61UYracESDTZMEIASMZlRtckmEjVXbX2APDLUuljyBt1UgmVlJOlwT2F7AV zps7P4Z66gUaexHT8CudDGVJjAtG6yF9mYKjOao96umoYd0AEUP1zBQpEK6SwKIS1pp0 Gi3axYloQUXF25Z88z7as3vDbPY/tGdE7eouvqJKpywJa4SAVoIBBQpyOjrzNZIJP/Ep wTZw== 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:arc-authentication-results; bh=7B9u9YQExfz4H0mwx3gtnKV24e4FnLj/Kp1QlZfzGVk=; b=TvOwmwKHro4dt9uvyoYrPYdXWeYnlSl7YlGiqv4MXSh/uKUNxgaXXRrDYdU5xTAM8u PLMFnWvigumwW0OvI6DYrC4jwe0ZBPLPI1rsKYsuMWp5iemv+4Ya8pbODX9yjA5apHe2 FP4O/Yopx2I1xKLSdmPMxGjOWK2tHPdvSrAbAbGHqk8K1ovkaZaZ0cuj++MhRqlQReBq OzBkHf7UAbI0w9JCg4A27U/Vfnlugb3c00ZGtrlXhzYZRFb7UlfpZs7HQI0Zip9qHd/k j0WLBB1LCPrV5mTU/zlnimY+c+0vFCCofVIv8GnD997spxbzt1mPcaslvPzW4lbWRT/F 6o2w== 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 31-v6si20928103pli.45.2018.07.12.07.41.08; Thu, 12 Jul 2018 07:41:29 -0700 (PDT) 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 S1732482AbeGLOuT (ORCPT + 99 others); Thu, 12 Jul 2018 10:50:19 -0400 Received: from nautica.notk.org ([91.121.71.147]:44673 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727667AbeGLOuT (ORCPT ); Thu, 12 Jul 2018 10:50:19 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 4D021C009; Thu, 12 Jul 2018 16:40:27 +0200 (CEST) Date: Thu, 12 Jul 2018 16:40:12 +0200 From: Dominique Martinet To: Greg Kurz 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: <20180712144012.GA21574@nautica> References: <20180711210225.19730-1-willy@infradead.org> <20180711210225.19730-5-willy@infradead.org> <20180712163649.36057b6e@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180712163649.36057b6e@bahia.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) -- Dominique Martinet