From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1ED2ECAAD5 for ; Tue, 6 Sep 2022 18:27:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0204B8D0002; Tue, 6 Sep 2022 14:27:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EEAE46B0074; Tue, 6 Sep 2022 14:27:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8B4C8D0002; Tue, 6 Sep 2022 14:27:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C3BAB6B0073 for ; Tue, 6 Sep 2022 14:27:31 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9EF3D1A0409 for ; Tue, 6 Sep 2022 18:27:31 +0000 (UTC) X-FDA: 79882493502.30.95D902F Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by imf16.hostedemail.com (Postfix) with ESMTP id 38EAD180078 for ; Tue, 6 Sep 2022 18:27:31 +0000 (UTC) Received: by mail-lf1-f54.google.com with SMTP id bq23so18673414lfb.7 for ; Tue, 06 Sep 2022 11:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date; bh=ZUpzMHvchnbWsqxJeFoXp/P2C7rf8MP7y5MO8R3SUlg=; b=evVapLaaGlVqqY/j8Gbn/X1kndSZrQhs5Lna2QWGqYVrzb2qwk3oWh03Zfl3RstmE8 mD5KYILVb8zBPNZlpkRj/PfH09eLqiLeQyUxd5GE1F9JaTeWg/9G27i9JQTxsNdaFRsF U0/C0ZOzeMa46PtXqc2g2GN8Dhr8IzFsmqHwsmOZcb16mc15wdAOOrAkJQ00ADf/0NfW R78camhq2XuD5rJnuHKbIE6kXICzs76RqtVlOyBbuyRrWaMUvjlLGeuSk2nhtTxCO0z0 MLyybXhPfk38/XNYb+oW428CP3UVHYjTvKL3VrIUY9PI0dGDV/3Xn9WJ9pdGJNBQenf+ UD3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date; bh=ZUpzMHvchnbWsqxJeFoXp/P2C7rf8MP7y5MO8R3SUlg=; b=PC1agRLzFCDaO60oauTBLt7RGesFq7MGbshbBvLHzn8Z/2zlcgCg3Qie5K1kp3ziXk DfgJo0dJ84gZQnB3KoNaKxZBqAXb6hJuLLFP5fUspzs8FSFzkZ4bSlqxwko+y3spCOuV w4udXZruLwF2a6IG+IsALoeI28R6TvbnCxy8IOMxJuUq04RahoUIMvB65ZQnhWJVZlZa q64Sc1xRygAWSHyxEv6TWTqONPIlzcPh6geLxlDCxUD/NRL9h7VnCFhbdxR49BZblOV8 CCmMij2bNtfdKK3u4wMTNKwXpbUX3H9QGgr/VIT9CE418gzVdumESD+h1Gc7NDVdZGPQ Lpsw== X-Gm-Message-State: ACgBeo2DAxfa/XSI3IPOiNQV++csM9h+zUkJTTAazrKDH6udwvl0Bao3 9GLib5EvlvWFb0g9bnr08vs= X-Google-Smtp-Source: AA6agR41sXkcrlFUvaDZz3CT3CfJxkJn7FWtdUKQQVWcjNmsBlr/xcVF925VCaBcqDb1oIFYUQN74Q== X-Received: by 2002:a05:6512:158b:b0:48b:38:cff8 with SMTP id bp11-20020a056512158b00b0048b0038cff8mr17134954lfb.100.1662488849452; Tue, 06 Sep 2022 11:27:29 -0700 (PDT) Received: from pc636 ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id a3-20020a056512200300b0049306939413sm1888852lfb.211.2022.09.06.11.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 11:27:28 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Tue, 6 Sep 2022 20:27:26 +0200 To: Song Liu Cc: Song Liu , Linux-MM , "linux-kernel@vger.kernel.org" , Uladzislau Rezki , Baoquan He , Andrew Morton Subject: Re: [PATCH v2] mm/vmalloc: Extend find_vmap_lowest_match_check with extra arguments Message-ID: References: <20220906060548.1127396-1-song@kernel.org> <75CD7F46-F419-4D93-B59D-A8C0F942BB91@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75CD7F46-F419-4D93-B59D-A8C0F942BB91@fb.com> ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=evVapLaa; spf=pass (imf16.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662488851; a=rsa-sha256; cv=none; b=8WCSGYtb2anOGdi2HZZ7kr1dAfDp7pTmZPYQaSrQYq4YNw2JRjOGHSt0m55fhR5KXclOok Wxreo3gmecWszmYDT0xq96HSZO++3K/CmCjujmwe07wfv6whdi40CXKvG9MLUgDWcQ17aL tErt/VRqKKNZNkkhV2rHaCcr8pDlDas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662488851; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZUpzMHvchnbWsqxJeFoXp/P2C7rf8MP7y5MO8R3SUlg=; b=ePJ/gmVgje/V/JCQTdM6MIRE+TNx+mkfXCsZbhHy/G9SDj1aC2k0d5XrWdPj0cWf1h32Q0 9QjCmmvI+b2Ziar2oTfXISk3zPaGk/doEiZfPt3PBGhNXLz0QTDq8hnmCiXA3pNUmrvvJ9 9OqFOPwCd4DJWC0d8/vd2OmA35UMnQA= Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=evVapLaa; spf=pass (imf16.hostedemail.com: domain of urezki@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: cy8xqaii8ays63af6an8uxpna8cathph X-Rspamd-Queue-Id: 38EAD180078 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1662488851-351602 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > > > > On Sep 5, 2022, at 11:05 PM, Song Liu wrote: > > > > find_vmap_lowest_match() is now able to handle different roots. With > > DEBUG_AUGMENT_LOWEST_MATCH_CHECK enabled as: > > > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > > index e68c0081e861..7552f1f8350e 100644 > > --- a/mm/vmalloc.c > > +++ b/mm/vmalloc.c > > @@ -713,7 +713,7 @@ EXPORT_SYMBOL(vmalloc_to_pfn); > > /*** Global kva allocator ***/ > > > > -#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 0 > > +#define DEBUG_AUGMENT_LOWEST_MATCH_CHECK 1 > > > > compilation failed as: > > > > mm/vmalloc.c: In function 'find_vmap_lowest_match_check': > > mm/vmalloc.c:1328:32: warning: passing argument 1 of 'find_vmap_lowest_match' makes pointer from integer without a cast [-Wint-conversion] > > 1328 | va_1 = find_vmap_lowest_match(size, align, vstart, false); > > | ^~~~ > > | | > > | long unsigned int > > mm/vmalloc.c:1236:40: note: expected 'struct rb_root *' but argument is of type 'long unsigned int' > > 1236 | find_vmap_lowest_match(struct rb_root *root, unsigned long size, > > | ~~~~~~~~~~~~~~~~^~~~ > > mm/vmalloc.c:1328:9: error: too few arguments to function 'find_vmap_lowest_match' > > 1328 | va_1 = find_vmap_lowest_match(size, align, vstart, false); > > | ^~~~~~~~~~~~~~~~~~~~~~ > > mm/vmalloc.c:1236:1: note: declared here > > 1236 | find_vmap_lowest_match(struct rb_root *root, unsigned long size, > > | ^~~~~~~~~~~~~~~~~~~~~~ > > > > Extend find_vmap_lowest_match_check() and find_vmap_lowest_linear_match() > > with extra arguments to fix this. > > > > Fixes: f9863be49312 ("mm/vmalloc: extend __alloc_vmap_area() with extra arguments") > > Cc: Uladzislau Rezki (Sony) > > Cc: Baoquan He > > Cc: Andrew Morton > > Signed-off-by: Song Liu > > Forgot to add the following from v1: > > Reviewed-by: Baoquan He > Reviewed-by: Uladzislau Rezki (Sony) > Works great to me. Appreciate it! -- Uladzislau Rezki