linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Heesub Shin <heesub.shin@samsung.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	sunae.seo@samsung.com, cmlaika.kim@samsung.com
Subject: Re: [PATCH 1/2] zsmalloc: do not remap dst page while prepare next src page
Date: Wed, 25 Mar 2015 14:29:22 +0900	[thread overview]
Message-ID: <20150325052922.GA1675@swordfish> (raw)
In-Reply-To: <5512421D.4000603@samsung.com>

On (03/25/15 14:05), Heesub Shin wrote:
> No, it's not unnecessary. We should do kunmap_atomic() in the reverse
> order of kmap_atomic(), so unfortunately it's inevitable to
> kunmap_atomic() both on d_addr and s_addr.
> 

Andrew, can you please drop this patch?


> > 
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > ---
> >  mm/zsmalloc.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> > index d920e8b..7af4456 100644
> > --- a/mm/zsmalloc.c
> > +++ b/mm/zsmalloc.c
> > @@ -1536,12 +1536,10 @@ static void zs_object_copy(unsigned long src, unsigned long dst,
> >  			break;
> >  
> >  		if (s_off + size >= PAGE_SIZE) {
> > -			kunmap_atomic(d_addr);
> >  			kunmap_atomic(s_addr);
> 
> Removing kunmap_atomic(d_addr) here may cause BUG_ON() at __kunmap_atomic().
> 
> I tried yours to see it really happens:
> > kernel BUG at arch/arm/mm/highmem.c:113!

oh, arm. tested on x86_64 only. I see why it happens there. thanks for reporting.


sorry, should have checked.

> > Internal error: Oops - BUG: 0 [#1] SMP ARM
> > Modules linked in:
> > CPU: 2 PID: 1774 Comm: bash Not tainted 4.0.0-rc2-mm1+ #105
> > Hardware name: ARM-Versatile Express
> > task: ee971300 ti: e8a26000 task.ti: e8a26000
> > PC is at __kunmap_atomic+0x144/0x14c
> > LR is at zs_object_copy+0x19c/0x2dc

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

  reply	other threads:[~2015-03-25  5:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 15:24 [PATCH 0/2] zs_object_copy() micro-optimizations Sergey Senozhatsky
2015-03-24 15:24 ` [PATCH 1/2] zsmalloc: do not remap dst page while prepare next src page Sergey Senozhatsky
2015-03-25  5:05   ` Heesub Shin
2015-03-25  5:29     ` Sergey Senozhatsky [this message]
2015-03-24 15:24 ` [PATCH 2/2] zsmalloc: micro-optimize zs_object_copy() Sergey Senozhatsky
2015-03-25 15:07   ` 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=20150325052922.GA1675@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cmlaika.kim@samsung.com \
    --cc=heesub.shin@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sunae.seo@samsung.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).