From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbbCYF3P (ORCPT ); Wed, 25 Mar 2015 01:29:15 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35622 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752465AbbCYF3N (ORCPT ); Wed, 25 Mar 2015 01:29:13 -0400 Date: Wed, 25 Mar 2015 14:29:22 +0900 From: Sergey Senozhatsky To: Andrew Morton , Heesub Shin Cc: Sergey Senozhatsky , Minchan Kim , Nitin Gupta , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , sunae.seo@samsung.com, cmlaika.kim@samsung.com Subject: Re: [PATCH 1/2] zsmalloc: do not remap dst page while prepare next src page Message-ID: <20150325052922.GA1675@swordfish> References: <1427210687-6634-1-git-send-email-sergey.senozhatsky@gmail.com> <1427210687-6634-2-git-send-email-sergey.senozhatsky@gmail.com> <5512421D.4000603@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5512421D.4000603@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > --- > > 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