From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom Subject: Re: [PATCH] drm/ttm: remove unneeded preempt_disable/enable Date: Wed, 14 Nov 2012 09:54:06 +0100 Message-ID: <50A35C2E.6010602@vmware.com> References: <1352463043-9408-1-git-send-email-akinobu.mita@gmail.com> <1352463043-9408-3-git-send-email-akinobu.mita@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1352463043-9408-3-git-send-email-akinobu.mita@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On 11/09/2012 01:10 PM, Akinobu Mita wrote: > It is unnecessary to disable preemption explicitly while calling > copy_highpage(). Because copy_highpage() will do it again through > kmap_atomic/kunmap_atomic. > > Signed-off-by: Akinobu Mita > Cc: dri-devel@lists.freedesktop.org > Cc: David Airlie > --- > drivers/gpu/drm/ttm/ttm_tt.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c > index bf82601..7d759a4 100644 > --- a/drivers/gpu/drm/ttm/ttm_tt.c > +++ b/drivers/gpu/drm/ttm/ttm_tt.c > @@ -308,9 +308,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) > if (unlikely(to_page == NULL)) > goto out_err; > > - preempt_disable(); > copy_highpage(to_page, from_page); > - preempt_enable(); > page_cache_release(from_page); > } > > @@ -358,9 +356,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) > ret = PTR_ERR(to_page); > goto out_err; > } > - preempt_disable(); > copy_highpage(to_page, from_page); > - preempt_enable(); > set_page_dirty(to_page); > mark_page_accessed(to_page); > page_cache_release(to_page); Reviewed-by: Thomas Hellstrom