From: Thomas Hellstrom <thellstrom@vmware.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: remove unneeded preempt_disable/enable
Date: Wed, 14 Nov 2012 09:54:06 +0100 [thread overview]
Message-ID: <50A35C2E.6010602@vmware.com> (raw)
In-Reply-To: <1352463043-9408-3-git-send-email-akinobu.mita@gmail.com>
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 <akinobu.mita@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: David Airlie <airlied@linux.ie>
> ---
> 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 <thellstrom@vmware.com>
prev parent reply other threads:[~2012-11-14 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 12:10 [PATCH] drm/radeon: Use hweight32 Akinobu Mita
2012-11-09 12:10 ` [PATCH] drm: use memchr_inv() Akinobu Mita
2012-11-09 12:10 ` [PATCH] drm/ttm: remove unneeded preempt_disable/enable Akinobu Mita
2012-11-14 8:54 ` Thomas Hellstrom [this message]
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=50A35C2E.6010602@vmware.com \
--to=thellstrom@vmware.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.