linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Nitin Gupta <ngupta@vflare.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	linux-mm <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] zsmalloc: use U suffix for negative literals being shifted
Date: Wed, 10 Jan 2018 14:53:38 +0900	[thread overview]
Message-ID: <20180110055338.h3cs5hw7mzsdtcad@eng-minchan1.roam.corp.google.com> (raw)
In-Reply-To: <CAH7mPvj449dgjeLmWHHN9xTmM+4qXXrxM_2uQoBhcPPGgnhrSw@mail.gmail.com>

Hi Nick,

On Mon, Jan 08, 2018 at 08:35:19PM -0800, Nick Desaulniers wrote:
> On Sun, Jan 7, 2018 at 7:04 AM, Minchan Kim <minchan@kernel.org> wrote:
> > Sorry for the delay. I have missed this until now. ;-(
> 
> No worries, figured patches would need a post holiday bump for review.
> 
> >
> > On Sun, Dec 24, 2017 at 11:33 AM, Nick Desaulniers
> > <nick.desaulniers@gmail.com> wrote:
> >> -                       link->next = -1 << OBJ_TAG_BITS;
> >> +                       link->next = -1U << OBJ_TAG_BITS;
> >
> > -1UL?
> 
> Oops, good catch.
> 
> > Please, resend it with including Andrew Morton
> > <akpm@linux-foundation.org> who merges zsmalloc patch into his tree.
> 
> Will do.
> 
> On Sun, Jan 7, 2018 at 3:02 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > Oh, boy, shouldn't be rather GENMASK() / GENMASK_ULL() in a way how
> 
> Thanks for the suggestion. `GENMASK(BITS_PER_LONG - 1, OBJ_TAG_BITS);`
> is equivalent.  Whether that is more readable, I'll wait for Minchan
> to decide.  If that's preferred, I'll make sure to credit you with the
> Suggested-By tag in the commit message.

I don't see any benefit with GENMASK in our usecase.
If it's not a good justfication, I'd like to use just -1UL which
would be more readable without effort to understand new API.

Thanks.

--
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:[~2018-01-10  5:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24  2:33 [PATCH] zsmalloc: use U suffix for negative literals being shifted Nick Desaulniers
2017-12-24  3:24 ` Matthew Wilcox
2017-12-24  3:28   ` Nick Desaulniers
2018-01-06 20:40     ` Nick Desaulniers
2018-01-07 15:04 ` Minchan Kim
2018-01-07 23:02   ` Andy Shevchenko
2018-01-09  4:35     ` Nick Desaulniers
2018-01-10  5:53       ` Minchan Kim [this message]
2018-01-11  3:41         ` [PATCH v2] " Nick Desaulniers
2018-01-11  7:06           ` Sergey Senozhatsky

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=20180110055338.h3cs5hw7mzsdtcad@eng-minchan1.roam.corp.google.com \
    --to=minchan@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=nick.desaulniers@gmail.com \
    --cc=sergey.senozhatsky.work@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;
as well as URLs for NNTP newsgroup(s).