* [PATCH] mm: trivial comment cleanup in slab.c
@ 2014-07-22 7:24 Wang Sheng-Hui
2014-07-22 21:57 ` David Rientjes
0 siblings, 1 reply; 3+ messages in thread
From: Wang Sheng-Hui @ 2014-07-22 7:24 UTC (permalink / raw)
To: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
Andrew Morton, linux-mm
Current struct kmem_cache has no 'lock' field, and slab page is
managed by struct kmem_cache_node, which has 'list_lock' field.
Clean up the related comment.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
mm/slab.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index 3070b92..8f7170f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1724,7 +1724,8 @@ slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
}
/*
- * Interface to system's page allocator. No need to hold the cache-lock.
+ * Interface to system's page allocator. No need to hold the
+ * kmem_cache_node ->list_lock.
*
* If we requested dmaable memory, we will get it. Even if we
* did not request dmaable memory, we might get it, but that
@@ -2026,9 +2027,9 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep,
* @cachep: cache pointer being destroyed
* @page: page pointer being destroyed
*
- * Destroy all the objs in a slab, and release the mem back to the system.
- * Before calling the slab must have been unlinked from the cache. The
- * cache-lock is not held/needed.
+ * Destroy all the objs in a slab page, and release the mem back to the system.
+ * Before calling the slab page must have been unlinked from the cache. The
+ * kmem_cache_node ->list_lock is not held/needed.
*/
static void slab_destroy(struct kmem_cache *cachep, struct page *page)
{
--
1.8.3.2
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: trivial comment cleanup in slab.c
2014-07-22 7:24 [PATCH] mm: trivial comment cleanup in slab.c Wang Sheng-Hui
@ 2014-07-22 21:57 ` David Rientjes
2014-07-25 0:51 ` Wang Sheng-Hui
0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2014-07-22 21:57 UTC (permalink / raw)
To: Wang Sheng-Hui
Cc: Christoph Lameter, Pekka Enberg, Joonsoo Kim, Andrew Morton,
linux-mm
On Tue, 22 Jul 2014, Wang Sheng-Hui wrote:
>
> Current struct kmem_cache has no 'lock' field, and slab page is
> managed by struct kmem_cache_node, which has 'list_lock' field.
>
> Clean up the related comment.
>
I think this is fine, but not sure if the s/slab/slab page/ change makes
anything clearer and is unmentioned in the changelog.
> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
> ---
> mm/slab.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 3070b92..8f7170f 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -1724,7 +1724,8 @@ slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
> }
>
> /*
> - * Interface to system's page allocator. No need to hold the cache-lock.
> + * Interface to system's page allocator. No need to hold the
> + * kmem_cache_node ->list_lock.
> *
> * If we requested dmaable memory, we will get it. Even if we
> * did not request dmaable memory, we might get it, but that
> @@ -2026,9 +2027,9 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep,
> * @cachep: cache pointer being destroyed
> * @page: page pointer being destroyed
> *
> - * Destroy all the objs in a slab, and release the mem back to the system.
> - * Before calling the slab must have been unlinked from the cache. The
> - * cache-lock is not held/needed.
> + * Destroy all the objs in a slab page, and release the mem back to the system.
> + * Before calling the slab page must have been unlinked from the cache. The
> + * kmem_cache_node ->list_lock is not held/needed.
> */
> static void slab_destroy(struct kmem_cache *cachep, struct page *page)
> {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: trivial comment cleanup in slab.c
2014-07-22 21:57 ` David Rientjes
@ 2014-07-25 0:51 ` Wang Sheng-Hui
0 siblings, 0 replies; 3+ messages in thread
From: Wang Sheng-Hui @ 2014-07-25 0:51 UTC (permalink / raw)
To: David Rientjes
Cc: Christoph Lameter, Pekka Enberg, Joonsoo Kim, Andrew Morton,
linux-mm
On 2014a1'07ae??23ae?JPY 05:57, David Rientjes wrote:
> On Tue, 22 Jul 2014, Wang Sheng-Hui wrote:
>
>>
>> Current struct kmem_cache has no 'lock' field, and slab page is
>> managed by struct kmem_cache_node, which has 'list_lock' field.
>>
>> Clean up the related comment.
>>
>
> I think this is fine, but not sure if the s/slab/slab page/ change makes
> anything clearer and is unmentioned in the changelog.
>
David,
I used "slab page" to mention the pages used for slab.
Hope that won't introduce any confusion/misunderstanding.
Regards,
Sheng-Hui
>> Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
>> ---
>> mm/slab.c | 9 +++++----
>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/mm/slab.c b/mm/slab.c
>> index 3070b92..8f7170f 100644
>> --- a/mm/slab.c
>> +++ b/mm/slab.c
>> @@ -1724,7 +1724,8 @@ slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
>> }
>>
>> /*
>> - * Interface to system's page allocator. No need to hold the cache-lock.
>> + * Interface to system's page allocator. No need to hold the
>> + * kmem_cache_node ->list_lock.
>> *
>> * If we requested dmaable memory, we will get it. Even if we
>> * did not request dmaable memory, we might get it, but that
>> @@ -2026,9 +2027,9 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep,
>> * @cachep: cache pointer being destroyed
>> * @page: page pointer being destroyed
>> *
>> - * Destroy all the objs in a slab, and release the mem back to the system.
>> - * Before calling the slab must have been unlinked from the cache. The
>> - * cache-lock is not held/needed.
>> + * Destroy all the objs in a slab page, and release the mem back to the system.
>> + * Before calling the slab page must have been unlinked from the cache. The
>> + * kmem_cache_node ->list_lock is not held/needed.
>> */
>> static void slab_destroy(struct kmem_cache *cachep, struct page *page)
>> {
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-25 0:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-22 7:24 [PATCH] mm: trivial comment cleanup in slab.c Wang Sheng-Hui
2014-07-22 21:57 ` David Rientjes
2014-07-25 0:51 ` Wang Sheng-Hui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).