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 03A1BC433EF for ; Mon, 6 Jun 2022 20:50:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 476FC6B0082; Mon, 6 Jun 2022 16:50:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 427166B0083; Mon, 6 Jun 2022 16:50:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C7936B0085; Mon, 6 Jun 2022 16:50:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1EDE96B0082 for ; Mon, 6 Jun 2022 16:50:26 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id EDDB3351D5 for ; Mon, 6 Jun 2022 20:50:25 +0000 (UTC) X-FDA: 79549004010.29.3645C3E Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by imf31.hostedemail.com (Postfix) with ESMTP id B47E220053 for ; Mon, 6 Jun 2022 20:49:39 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id l18so9722035lje.13 for ; Mon, 06 Jun 2022 13:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZjAv5aFwvGTLPhlpRw2+o5abMQEEmcSWSknk+L4bkY4=; b=f+kdRpZJxlwjyWP/saEwhC4acrcVKRuqglnbg8a3oSgvgDhOzmJk829LokCpxgeou5 zqAjGqYyl5eUvOXCsCiHkr88wk+vqokAYMkz9GqwJV9VLq+hQAdVqHmoeD8E1FNnM951 99ABBYcSx1+mIlZ5it+GwOa2RVq8+mW2uKEqAkRvRdf7AmN/Wfe4q6CA3259wLz0FeKH 2peT+Ptqqy7xKBQ3T7w19ryQeHs9nM5LKC8ojH411kymIEa1+ZJbCA7XyL6/UJ2vGNSS 8PNWsHM4m4nrvSZp948KuICdjFZb7rHnc13tU3vTYZFNzOLn2FP7PEruHTS2AW1rhYpZ rJFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZjAv5aFwvGTLPhlpRw2+o5abMQEEmcSWSknk+L4bkY4=; b=4tbBZ38LnyDioDlBO9wPCnBATOu/A4d3KbSXU0HWlkRh52HjuLaMAj7mIcLGfIZ9Fy OffqcQaS8HzZk03DzdEuF9P/yNCcbScHi2dzlSOiZS3txE9Z1F2xCyArXYVZqtB5EpUu 81SrHzpi/SqbLAG5c/Csi/rBWYIbyU4jaRi/hj1HQYwbLFeOtyO4SOh9atEgExwOoV+T bwmRYOp2TZUvZaOd0gfAd75xqEcS7Q+6WnCqa6eK3UsFhvuodyjzHczlTlQ9ke5Uq1zx C2UMpYScJ5w8aUeDBJOSq/w+9E8597T1xmbnLOYBMGTpZLaroyNOmavKgDcQSv8SiePn Dknw== X-Gm-Message-State: AOAM530JOh0fVBPMWUIdZ5LXGHjDno7MmKJFAsIiziwd8ZDRXRU8nEVD ajl0401moZU29IV7bReSHV0= X-Google-Smtp-Source: ABdhPJwJ3KllByNHOzNQfQeXSPKuKbmKZEO6YEk/D2I6ouGdP01uD322ewDAmJ7Yi3z550NeQ4LhjQ== X-Received: by 2002:a05:651c:160b:b0:247:f955:1b18 with SMTP id f11-20020a05651c160b00b00247f9551b18mr53514803ljq.427.1654548623775; Mon, 06 Jun 2022 13:50:23 -0700 (PDT) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id bp17-20020a056512159100b0047255d21186sm2990692lfb.181.2022.06.06.13.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 13:50:23 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 6 Jun 2022 22:50:21 +0200 To: Baoquan He Cc: akpm@linux-foundation.org, npiggin@gmail.com, urezki@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] mm/vmalloc: Add code comment for find_vmap_area_exceed_addr() Message-ID: References: <20220606083909.363350-1-bhe@redhat.com> <20220606083909.363350-5-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220606083909.363350-5-bhe@redhat.com> X-Stat-Signature: nge41x89i3yx8triyek1azgsii8ko6b7 X-Rspam-User: Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=f+kdRpZJ; spf=pass (imf31.hostedemail.com: domain of urezki@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=urezki@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: B47E220053 X-HE-Tag: 1654548579-664740 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 Mon, Jun 06, 2022 at 04:39:08PM +0800, Baoquan He wrote: > Its behaviour is like find_vma() which finds an area above the specified > address, add comment to make it easier to understand. > > And also fix two places of grammer mistake/typo. > > Signed-off-by: Baoquan He > --- > mm/vmalloc.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 11dfc897de40..860ed9986775 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -790,6 +790,7 @@ unsigned long vmalloc_nr_pages(void) > return atomic_long_read(&nr_vmalloc_pages); > } > > +/* Look up the first VA which satisfies addr < va_end, NULL if none. */ > static struct vmap_area *find_vmap_area_exceed_addr(unsigned long addr) > { > struct vmap_area *va = NULL; > @@ -929,7 +930,7 @@ link_va(struct vmap_area *va, struct rb_root *root, > * Some explanation here. Just perform simple insertion > * to the tree. We do not set va->subtree_max_size to > * its current size before calling rb_insert_augmented(). > - * It is because of we populate the tree from the bottom > + * It is because we populate the tree from the bottom > * to parent levels when the node _is_ in the tree. > * > * Therefore we set subtree_max_size to zero after insertion, > @@ -1659,7 +1660,7 @@ static atomic_long_t vmap_lazy_nr = ATOMIC_LONG_INIT(0); > > /* > * Serialize vmap purging. There is no actual critical section protected > - * by this look, but we want to avoid concurrent calls for performance > + * by this lock, but we want to avoid concurrent calls for performance > * reasons and to make the pcpu_get_vm_areas more deterministic. > */ > static DEFINE_MUTEX(vmap_purge_lock); > -- > 2.34.1 > Reviewed-by: Uladzislau Rezki (Sony) -- Uladzislau Rezki