Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1817572imm; Thu, 12 Jul 2018 08:17:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc/5lH9Zpwx0kbpyF+fz6dqnQ8BznKTXHz49FsVxCcWE35mXr30kF2gnX4Hodd82iJqTXHe X-Received: by 2002:a17:902:d896:: with SMTP id b22-v6mr2637948plz.265.1531408642663; Thu, 12 Jul 2018 08:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531408642; cv=none; d=google.com; s=arc-20160816; b=SMEG8ICtVjgM6OY2NqJ5o6U6tLSN8gsTJ3L6In0VRPglrtqorn6lbeXtLXOEm7kafd DaH/xRckuCcS0FIFtU0sczgsaTe9KlmbxO8gPLYX8ui2aYmr64ggCXqc2jgDuhKouKmg I7z3BF+ea345SwCtWf/N4+a61fTop/ep2RcrfPwSYwK0vA+RvWePtEauBTUubrtDofXF x9opDQB0LtNZaPI9PF0/xABlAUFjcYgx4ndrRibBMmpQ52eBlJXJXtPfp67GbW32fK/2 sn8I/XDjRC/0MLGP2+7iocihtI3glx4K+5iCHUjRY4i6j39ha8Sh6d4PwP9OrjlD7wvG Aspg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=zpSvmu6TAxoRHMYZJYytLz2JYocTZ/PSKhi4eg9CAsM=; b=HIQS6mFjt0eKwDqxayUyGNRXHGJRzVNKFv/SDW90TAo8QvoAC9egk4ckUg/IvumiKO +3JvLjSSqoWLVk41rtOfxv4nygPqPkD1R/djqTX9jZedzyZRAlLQHQj0h1Va4ylXN6Od 6KeC7u8hpLqZXRaAYCvAKSwxshMqzRoa/sXiKL+yilXWKVMb9dzTwPf2mUPFnBi5mMcL vnJHQ6P0Q5MHPPAv/qBTYRes2hj21vAtsFMbt374fVq/8GB2D65kdakZt8Uc1dIV0OHW EM/RzSPSMxH01/S7/7v4wy7KWkjFO49q4x/cKrp2xFhSkZ6RhT4r5euRMs9w0Qmu4BE0 F9Gw== 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 o12-v6si21482915plg.154.2018.07.12.08.16.54; Thu, 12 Jul 2018 08:17:22 -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 S1732617AbeGLP0R (ORCPT + 99 others); Thu, 12 Jul 2018 11:26:17 -0400 Received: from 9.mo179.mail-out.ovh.net ([46.105.76.148]:39325 "EHLO 9.mo179.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732491AbeGLP0R (ORCPT ); Thu, 12 Jul 2018 11:26:17 -0400 X-Greylist: delayed 603 seconds by postgrey-1.27 at vger.kernel.org; Thu, 12 Jul 2018 11:26:16 EDT Received: from player756.ha.ovh.net (unknown [10.109.108.62]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 2CE33D805D for ; Thu, 12 Jul 2018 16:59:27 +0200 (CEST) Received: from bahia.lan (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player756.ha.ovh.net (Postfix) with ESMTPSA id CC7281200C3; Thu, 12 Jul 2018 16:59:15 +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> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 7840485479542331648 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtiedrgeekgdekfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... :)