From: Nitin Gupta <ngupta@vflare.org>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Greg KH <greg@kroah.com>, Pekka Enberg <penberg@cs.helsinki.fi>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hugh.dickins@tiscali.co.uk>, Cyp <cyp561@gmail.com>,
driverdev <devel@driverdev.osuosl.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] Support generic I/O requests
Date: Tue, 01 Jun 2010 00:53:04 +0530 [thread overview]
Message-ID: <4C040C98.8000105@vflare.org> (raw)
In-Reply-To: <1275320471.15980.24.camel@barrios-desktop>
Hi Minchan,
On 05/31/2010 09:11 PM, Minchan Kim wrote:
>
> On Mon, 2010-05-24 at 19:48 +0530, Nitin Gupta wrote:
<snip>
>>
>> - Scalability: There is only one (per-device) de/compression
>> buffer stats. This can lead to significant contention, especially
>> when used for generic (non-swap) purposes.
>
> Later, we could enhance it by per-cpu counter.
>
Yes, currently we effectively use just 1 core due to a single
compression buffer. So, per-cpu buffers and counters should
really help.
>> -static int handle_zero_page(struct bio *bio)
>> +static void handle_zero_page(struct page *page, u32 index)
>
> It doesn't use index.
>
Ok, I will remove this argument.
>>
>> - /* Page is stored uncompressed since it's incompressible */
>> - if (unlikely(rzs_test_flag(rzs, index, RZS_UNCOMPRESSED)))
>> - return handle_uncompressed_page(rzs, bio);
>> + /* Requested page is not present in compressed area */
>> + if (unlikely(!rzs->table[index].page)) {
>> + pr_debug("Read before write on swap device: "
> ^^^^
> It's not ramzswap any more. It is zram. :)
>
I will correct this :)
>> + /*
>> + * Page is incompressible. Store it as-is (uncompressed)
>> + * since we do not want to return too many swap write
>> + * errors which has side effect of hanging the system.
>> + */
>> + if (unlikely(clen > max_zpage_size)) {
>> + clen = PAGE_SIZE;
>> + page_store = alloc_page(GFP_NOIO | __GFP_HIGHMEM);
>> + if (unlikely(!page_store)) {
>> + mutex_unlock(&rzs->lock);
>
> What's purpose of rzs->lock?
> Please, Document it.
>
Ok. I intentionally deferred much of the documentation for later patches
to reduce "side noise" for these patches. Anyways, I will document this
lock in "v2" patches.
> And please, take care of "swap" mentioned in comments.
>
Old habits die hard :) I will clean them up.
> I think code doesn't have big problem.
> But my feel is we can clean up some portion of codes. But it's not a big
> deal. It doesn't have any problem to work.
> So I want to add zram into linux-next, too.
>
I will be sending patch series with code commentary, cleanups and minor
fixes once this much enters linux-next.
Thanks for the review.
Nitin
next prev parent reply other threads:[~2010-05-31 19:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 14:18 [PATCH 0/3] zram: generic RAM based compressed R/W block devices Nitin Gupta
2010-05-24 14:18 ` [PATCH 1/3] Support generic I/O requests Nitin Gupta
2010-05-31 15:41 ` Minchan Kim
2010-05-31 19:23 ` Nitin Gupta [this message]
2010-05-24 14:18 ` [PATCH 2/3] Rename ramzswap to zram in code Nitin Gupta
2010-05-24 15:31 ` Arnd Bergmann
2010-05-24 18:23 ` Nitin Gupta
2010-05-24 14:18 ` [PATCH 3/3] Rename ramzswap to zram in documentation Nitin Gupta
2010-05-25 15:21 ` [PATCH 0/3] zram: generic RAM based compressed R/W block devices Minchan Kim
2010-05-28 16:08 ` Nitin Gupta
2010-05-28 16:26 ` Greg KH
2010-05-29 1:21 ` Nitin Gupta
2010-05-29 16:36 ` Greg KH
2010-06-16 2:14 ` Nitin Gupta
2010-06-16 18:43 ` Greg KH
2010-06-17 1:39 ` Nitin Gupta
2010-06-17 14:40 ` Greg KH
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=4C040C98.8000105@vflare.org \
--to=ngupta@vflare.org \
--cc=akpm@linux-foundation.org \
--cc=cyp561@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan.kim@gmail.com \
--cc=penberg@cs.helsinki.fi \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.