linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Wool <vitalywool@gmail.com>
To: Dan Streetman <ddstreet@ieee.org>
Cc: Linux-MM <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH/RESEND 2/5] mm/z3fold.c: extend compaction function
Date: Tue, 10 Jan 2017 21:49:26 +0100	[thread overview]
Message-ID: <CAMJBoFMDp2gbJ+CcX4T8nYcTZ-s4E4jAGsE46qfqUB1J9N2NtQ@mail.gmail.com> (raw)
In-Reply-To: <CALZtONAOgKLfRQbXR+xxhRWW2QyQghoLA_ownxK7_RZ8D5wOYw@mail.gmail.com>

On Wed, Jan 4, 2017 at 4:43 PM, Dan Streetman <ddstreet@ieee.org> wrote:

<snip>
>>  static int z3fold_compact_page(struct z3fold_header *zhdr)
>>  {
>>         struct page *page = virt_to_page(zhdr);
>> -       void *beg = zhdr;
>> +       int ret = 0;
>
> I still don't understand why you're adding ret and using goto.  Just
> use return for each failure case.

I guess it's a matter of taste, I prefer having single function exit
elsewhere so I do it here too.

>> +
>> +       if (test_bit(MIDDLE_CHUNK_MAPPED, &page->private))
>> +               goto out;
>>
>> +       if (zhdr->middle_chunks != 0) {
>
> you appear to have just re-sent all your patches without addressing
> comments; in patch 4 you invert the check and return, which is what
> you should have done here in the first place, as that change is
> unrelated to that patch.

Not quite, I just thought we'd agreed on the patch 4 being separate. I
folded the locking fixes but not header size fixes.

~vitaly

--
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>

  reply	other threads:[~2017-01-10 20:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-26  0:30 [PATCH/RESEND 0/5] z3fold optimizations and fixes Vitaly Wool
2016-12-26  0:33 ` [PATCH/RESEND 1/5] mm/z3fold.c: make pages_nr atomic Vitaly Wool
2016-12-26  0:34 ` [PATCH/RESEND 2/5] mm/z3fold.c: extend compaction function Vitaly Wool
2017-01-04 15:43   ` Dan Streetman
2017-01-10 20:49     ` Vitaly Wool [this message]
2016-12-26  0:36 ` Vitaly Wool
2016-12-26  0:37 ` [PATCH/RESEND 3/5] z3fold: use per-page spinlock Vitaly Wool
2017-01-04 16:08   ` Dan Streetman
2016-12-26  0:39 ` [PATCH/RESEND 4/5] z3fold: fix header size related issues Vitaly Wool
2017-01-04 16:31   ` Dan Streetman
2016-12-26  0:40 ` [PATCH/RESEND 5/5] z3fold: add kref refcounting Vitaly Wool
2017-01-04 18:42   ` Dan Streetman
2017-01-11 10:52     ` Vitaly Wool
2017-01-11 16:58       ` Dan Streetman
2017-01-11 17:08         ` Vitaly Wool

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=CAMJBoFMDp2gbJ+CcX4T8nYcTZ-s4E4jAGsE46qfqUB1J9N2NtQ@mail.gmail.com \
    --to=vitalywool@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ddstreet@ieee.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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