From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Nitin Gupta <ngupta@vflare.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] zsmalloc: consider ZS_ALMOST_FULL as migrate source
Date: Fri, 10 Jul 2015 13:19:29 +0900 [thread overview]
Message-ID: <20150710041929.GC692@swordfish> (raw)
In-Reply-To: <20150710022910.GA18266@blaptop>
On (07/10/15 11:29), Minchan Kim wrote:
> Good question.
>
> My worry was failure of order-0 page allocation in zram-swap path
> when memory presssure is really heavy but I didn't insist to you
> from sometime. The reason I changed my mind was
>
> 1. It's almost dead system if there is no order-0 page
> 2. If old might be working well, it's not our design, just luck.
I mean I find your argument that some level of fragmentation
can be of use to be valid, to some degree.
hm... by the way,
unsigned long zs_malloc(struct zs_pool *pool, size_t size)
{
...
size += ZS_HANDLE_SIZE;
class = pool->size_class[get_size_class_index(size)];
...
if (!first_page) {
spin_unlock(&class->lock);
first_page = alloc_zspage(class, pool->flags);
if (unlikely(!first_page)) {
free_handle(pool, handle);
return 0;
}
...
I'm thinking now, does it make sense to try harder here? if we
failed to alloc_zspage(), then may be we can try any of unused
objects from a 'upper' (larger/next) class? there might be a
plenty of them.
-ss
--
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>
next prev parent reply other threads:[~2015-07-10 4:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 1:32 Minchan Kim
2015-07-10 1:58 ` Sergey Senozhatsky
2015-07-10 2:29 ` Minchan Kim
2015-07-10 4:19 ` Sergey Senozhatsky [this message]
2015-07-10 5:21 ` Minchan Kim
2015-07-10 5:34 ` Sergey Senozhatsky
2015-07-10 2:06 ` Sergey Senozhatsky
2015-07-10 2:34 ` Minchan Kim
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=20150710041929.GC692@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@gmail.com \
/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