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 BDF64C433F5 for ; Thu, 7 Apr 2022 08:53:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 43BE06B0071; Thu, 7 Apr 2022 04:53:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EBE46B0073; Thu, 7 Apr 2022 04:53:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2B3196B0074; Thu, 7 Apr 2022 04:53:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id 1975F6B0071 for ; Thu, 7 Apr 2022 04:53:45 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B87CB1840B3B8 for ; Thu, 7 Apr 2022 08:53:34 +0000 (UTC) X-FDA: 79329469548.29.291D5DC Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by imf11.hostedemail.com (Postfix) with ESMTP id 499B840009 for ; Thu, 7 Apr 2022 08:53:34 +0000 (UTC) Received: by mail-pj1-f43.google.com with SMTP id h23-20020a17090a051700b001c9c1dd3acbso5570537pjh.3 for ; Thu, 07 Apr 2022 01:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8mmueqbLnm3tk7tVIxrPw233tyq03LboORzG5ca8hgQ=; b=isj2jzKX5U7EBQ02gJe8d/pvWluEXF8nTkNftYQmporcsD388FAfJlvlYX3tYcCtc4 qBp5/z4g+8o2i0+5Y6HEYjDLAR0/0qEcfriQvVv99iwnckZ/jJDIY5Zj2cxp9ftLwly4 9nQNRYkHc2G7eRfJYD+i79S+WQFgcDKOC76KUnq3aFxZn2DxLNI5LbwfZL9HEDEJNdGf 00CWlGXTWmbDZM6o45ZbWwbcAr3MH1kT+D6yYnrWjnXIBAQM5Hhh0FIiGZfcNgguKm1g AqdAjyA+1U2H/lGHESLx2XRIY15f9zr29ejfpt/+UdaCMJTN+JorwqPvSPQzpMQfwP1+ Jn6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8mmueqbLnm3tk7tVIxrPw233tyq03LboORzG5ca8hgQ=; b=IQgku7s7lWH1G6Pcd5BClnhfgpXOfhsQNUeMrrggsd1jCjd8dt1DMfBYoYG08WltDA u1cPQEmZ+XgW6G5Tsv7QZMfjHg+EghyMiXgj7sW4U91atgm8DIMT2BC91PLavbsxTSae 1/Q4OLsPbuo9LacE5xBtnNCzgZaW/9N7y+SIHsnk+6Fa+kZ3bvZNH176TnZu9EsnEhgg WQRQNpdgQngBoum7DgUMrXEUj0xhECzIPNrJ8PE00xorJLfwemvIXYqXjL4E8MLzbH4/ Ei30gOsHmDubeNx5IRrzSSWDU1hTpHqQKQ+egpoOMNakDjEnyZVU8zGCSzRqrrJ6ZOuU y7aA== X-Gm-Message-State: AOAM532U18CyRiRjyY8FqdWgWs5jgUpIKEQ/1FmJ0REdBRqC2cZDBV0O FyNGpmatDiFT19XMZ51TGz4= X-Google-Smtp-Source: ABdhPJxF0JgZGdq0qnZLc3MZOz6/F3m9oT65Ox4sm1zdr45nDtltCTbFUB/akj11Tu0h0Y8jm+itgw== X-Received: by 2002:a17:902:aa88:b0:156:914b:dc79 with SMTP id d8-20020a170902aa8800b00156914bdc79mr12732694plr.138.1649321613071; Thu, 07 Apr 2022 01:53:33 -0700 (PDT) Received: from hyeyoo ([114.29.24.243]) by smtp.gmail.com with ESMTPSA id u10-20020a17090a890a00b001cb14240c4csm1235786pjn.1.2022.04.07.01.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 01:53:31 -0700 (PDT) Date: Thu, 7 Apr 2022 17:53:24 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Yixuan Cao Cc: akpm@linux-foundation.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/slab.c: fix comments Message-ID: References: <20220407080958.3667-1-caoyixuan2019@email.szu.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220407080958.3667-1-caoyixuan2019@email.szu.edu.cn> X-Stat-Signature: ym8q59wg574exuw9n3s87qdszjtnsnjk Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=isj2jzKX; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.216.43 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 499B840009 X-HE-Tag: 1649321614-910298 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 Thu, Apr 07, 2022 at 04:09:58PM +0800, Yixuan Cao wrote: > While reading the source code, > I noticed some language errors in the comments, so I fixed them. > > Signed-off-by: Yixuan Cao > --- > mm/slab.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/mm/slab.c b/mm/slab.c > index 90b16c7ae01a..e882657c1494 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -781,7 +781,7 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) > int slab_node = slab_nid(virt_to_slab(objp)); > int node = numa_mem_id(); > /* > - * Make sure we are not freeing a object from another node to the array > + * Make sure we are not freeing an object from another node to the array > * cache on this cpu. > */ > if (likely(node == slab_node)) > @@ -832,7 +832,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp) > > /* > * The kmem_cache_nodes don't come and go as CPUs > - * come and go. slab_mutex is sufficient > + * come and go. slab_mutex provides sufficient > * protection here. > */ > cachep->node[node] = n; > @@ -845,7 +845,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp) > * Allocates and initializes node for a node on each slab cache, used for > * either memory or cpu hotplug. If memory is being hot-added, the kmem_cache_node > * will be allocated off-node since memory is not yet online for the new node. > - * When hotplugging memory or a cpu, existing node are not replaced if > + * When hotplugging memory or a cpu, existing nodes are not replaced if > * already in use. > * > * Must hold slab_mutex. > @@ -1046,7 +1046,7 @@ int slab_prepare_cpu(unsigned int cpu) > * offline. > * > * Even if all the cpus of a node are down, we don't free the > - * kmem_cache_node of any cache. This to avoid a race between cpu_down, and > + * kmem_cache_node of any cache. This is to avoid a race between cpu_down, and > * a kmalloc allocation from another cpu for memory from the node of > * the cpu going down. The kmem_cache_node structure is usually allocated from > * kmem_cache_create() and gets destroyed at kmem_cache_destroy(). > @@ -1890,7 +1890,7 @@ static bool set_on_slab_cache(struct kmem_cache *cachep, > * @flags: SLAB flags > * > * Returns a ptr to the cache on success, NULL on failure. > - * Cannot be called within a int, but can be interrupted. > + * Cannot be called within an int, but can be interrupted. > * The @ctor is run when new pages are allocated by the cache. > * > * The flags are > @@ -3138,7 +3138,7 @@ static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) > } > > /* > - * A interface to enable slab creation on nodeid > + * An interface to enable slab creation on nodeid > */ > static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, > int nodeid) > -- > 2.17.1 > > > > Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Thanks! -- Thanks, Hyeonggon