linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Matthew Wilcox <willy@infradead.org>, Vlastimil Babka <vbabka@suse.cz>
Cc: linux-mm@kvack.org, Roman Gushchin <guro@fb.com>,
	Michal Hocko <mhocko@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Vijayanand Jitta <vjitta@codeaurora.org>
Subject: Re: [RFC PATCH 0/5] kmalloc-reclaimable caches
Date: Thu, 24 May 2018 11:40:59 -0700	[thread overview]
Message-ID: <cfb7c8df-2a6a-bf84-8a30-df97c58c9c47@infradead.org> (raw)
In-Reply-To: <0944e1ed-60fe-36ce-ea06-936b3f595d5f@infradead.org>

On 05/24/2018 09:18 AM, Randy Dunlap wrote:
> On 05/24/2018 04:43 AM, Matthew Wilcox wrote:
>> On Thu, May 24, 2018 at 01:00:06PM +0200, Vlastimil Babka wrote:
>>> Now for the issues a.k.a. why RFC:
>>>
>>> - I haven't find any other obvious users for reclaimable kmalloc (yet)
>>
>> Is that a problem?  This sounds like it's enough to solve Facebook's
>> problem.
>>
>>> - the name of caches kmalloc-reclaimable-X is rather long
>>
>> Yes; Christoph and I were talking about restricting slab names to 16 bytes
>> just to make /proc/slabinfo easier to read.  How about
>>
>> kmalloc-rec-128k
>> 1234567890123456
>>
>> Just makes it ;-)
>>
>> Of course, somebody needs to do the work to use k/M instead of 4194304.
>> We also need to bikeshed about when to switch; should it be:
>>
>> kmalloc-rec-512
>> kmalloc-rec-1024
>> kmalloc-rec-2048
>> kmalloc-rec-4096
>> kmalloc-rec-8192
>> kmalloc-rec-16k
>>
>> or should it be
>>
>> kmalloc-rec-512
>> kmalloc-rec-1k
>> kmalloc-rec-2k
>> kmalloc-rec-4k
>> kmalloc-rec-8k
>> kmalloc-rec-16k
>>
>> I slightly favour the latter as it'll be easier to implement.  Something like
> 
> Yes, agree, start using the suffix early.
> 
>>
>> 	static const char suffixes[3] = ' kM';
>> 	int idx = 0;
>>
>> 	while (size > 1024) {

I would use   (size >= 1024)
so that 1M is printed instead of 1024K.

>> 		size /= 1024;
>> 		idx++;
>> 	}
>>
>> 	sprintf("%d%c", size, suffices[idx]);
> 
> 	                      suffixes
>>
>> --
> 
> 


-- 
~Randy

  reply	other threads:[~2018-05-24 18:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 11:00 [RFC PATCH 0/5] kmalloc-reclaimable caches Vlastimil Babka
2018-05-24 11:00 ` [RFC PATCH 1/5] mm, slab/slub: introduce " Vlastimil Babka
2018-05-25 15:51   ` Christopher Lameter
2018-05-28  8:03     ` Vlastimil Babka
2018-05-24 11:00 ` [RFC PATCH 2/5] mm, slab: allocate off-slab freelists as reclaimable when appropriate Vlastimil Babka
2018-05-24 11:00 ` [RFC PATCH 3/5] dcache: allocate external names from reclaimable kmalloc caches Vlastimil Babka
2018-05-24 11:00 ` [RFC PATCH 4/5] mm: rename and change semantics of nr_indirectly_reclaimable_bytes Vlastimil Babka
2018-05-25 15:59   ` Christopher Lameter
2018-05-24 11:00 ` [RFC PATCH 5/5] mm, proc: add NR_RECLAIMABLE to /proc/meminfo Vlastimil Babka
2018-05-24 11:43 ` [RFC PATCH 0/5] kmalloc-reclaimable caches Matthew Wilcox
2018-05-24 16:18   ` Randy Dunlap
2018-05-24 18:40     ` Randy Dunlap [this message]
2018-05-24 18:48       ` Matthew Wilcox
2018-05-24 12:13 ` Roman Gushchin
2018-05-24 15:52   ` Vlastimil Babka
2018-05-24 17:35     ` Laura Abbott
2018-05-24 15:32 ` Johannes Weiner
2018-05-28  8:15   ` Vlastimil Babka
2018-05-29 17:58     ` Johannes Weiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cfb7c8df-2a6a-bf84-8a30-df97c58c9c47@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=cl@linux.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    --cc=vjitta@codeaurora.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).