From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, cl@linux.com,
mm-commits@vger.kernel.org, penberg@kernel.org,
rientjes@google.com, sunnyddayss@gmail.com
Subject: Re: + mm-slabc-remove-duplicated-check-of-colour_next.patch added to -mm tree
Date: Wed, 4 Apr 2018 09:40:27 +0900 [thread overview]
Message-ID: <20180404004027.GB6628@js1304-desktop> (raw)
In-Reply-To: <20180312221333.aYPvPxhxp%akpm@linux-foundation.org>
On Mon, Mar 12, 2018 at 03:13:33PM -0700, akpm@linux-foundation.org wrote:
>
> The patch titled
> Subject: mm/slab.c: remove duplicated check of colour_next
> has been added to the -mm tree. Its filename is
> mm-slabc-remove-duplicated-check-of-colour_next.patch
>
> This patch should soon appear at
> http://ozlabs.org/~akpm/mmots/broken-out/mm-slabc-remove-duplicated-check-of-colour_next.patch
> and later at
> http://ozlabs.org/~akpm/mmotm/broken-out/mm-slabc-remove-duplicated-check-of-colour_next.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
>
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
>
> ------------------------------------------------------
> From: Roman Lakeev <sunnyddayss@gmail.com>
> Subject: mm/slab.c: remove duplicated check of colour_next
>
> Remove check that offset greater than cachep->colour bacause this is
> already checked in previous lines.
>
> Link: http://lkml.kernel.org/r/877eqilr71.fsf@gmail.com
> Signed-off-by: Roman Lakeev <sunnyddayss@gmail.com>
> Acked-by: Christoph Lameter <cl@linux.com>
> Acked-by: David Rientjes <rientjes@google.com>
> Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
> Cc: Pekka Enberg <penberg@kernel.org>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> mm/slab.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff -puN mm/slab.c~mm-slabc-remove-duplicated-check-of-colour_next mm/slab.c
> --- a/mm/slab.c~mm-slabc-remove-duplicated-check-of-colour_next
> +++ a/mm/slab.c
> @@ -2674,11 +2674,7 @@ static struct page *cache_grow_begin(str
> if (n->colour_next >= cachep->colour)
> n->colour_next = 0;
>
> - offset = n->colour_next;
> - if (offset >= cachep->colour)
> - offset = 0;
> -
> - offset *= cachep->colour_off;
> + offset = n->colour_next * cachep->colour_off;
>
> /* Get slab management. */
> freelist = alloc_slabmgmt(cachep, page, offset,
Hello, all.
This n->colour_next can be update at the other cpu since
there is no lock to protect it. So, removing this one
another check can make the offset overflow.
Andrew, could you drop this patch?
Thanks.
parent reply other threads:[~2018-04-04 0:40 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20180312221333.aYPvPxhxp%akpm@linux-foundation.org>]
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=20180404004027.GB6628@js1304-desktop \
--to=iamjoonsoo.kim@lge.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=sunnyddayss@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
all inboxes | Powered by JetHome®