All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: Maarten Maathuis <madman2003@gmail.com>
Cc: "dri-devel@lists.sf.net" <dri-devel@lists.sf.net>
Subject: Re: [PATCH] drm/ttm: handle OOM in ttm_tt_swapout
Date: Tue, 23 Feb 2010 14:26:39 +0100	[thread overview]
Message-ID: <4B83D78F.8050106@vmware.com> (raw)
In-Reply-To: <6d4bc9fc1002230039s6f0a83c9ve5f1313f2ed9db6f@mail.gmail.com>

Maarten Maathuis wrote:
> On Tue, Feb 23, 2010 at 6:59 AM, Dave Airlie <airlied@gmail.com> wrote:
>   
>> On Sat, Feb 20, 2010 at 12:22 PM, Maarten Maathuis <madman2003@gmail.com> wrote:
>>     
>>> - Without this change I get a general protection fault.
>>> - Also use PTR_ERR where applicable.
>>>       
>> I just want to make sure I understand, but really the only bit of this
>> patch that matters is:
>>
>>     
>>> @@ -556,9 +559,10 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
>>>                if (unlikely(from_page == NULL))
>>>                        continue;
>>>                to_page = read_mapping_page(swap_space, i, NULL);
>>> -               if (unlikely(to_page == NULL))
>>> +               if (unlikely(IS_ERR(to_page))) {
>>>       
>> ^^ these two lines where we are testing for NULL but should be
>> checking for an error?
>>     
>
> Yes, that's the critical bit. As you can see we were already doing
> this for ttm_tt_swapin.
>
>   
>>> +                       ret = PTR_ERR(to_page);
>>>                        goto out_err;
>>> -
>>> +               }
>>>       
>> If that is true and the rest is just nice cleanups then I'm okay with it,.
>>
>> Reviewed-by: Dave Airlie <airlied@redhat.com>
>>
>> I'll need Thomas's ack on this also.
>>
>> Dave.
>>     
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>

/Thomas


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

      reply	other threads:[~2010-02-23 13:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-20  2:22 [PATCH] drm/ttm: handle OOM in ttm_tt_swapout Maarten Maathuis
2010-02-23  5:59 ` Dave Airlie
2010-02-23  8:39   ` Maarten Maathuis
2010-02-23 13:26     ` 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=4B83D78F.8050106@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=dri-devel@lists.sf.net \
    --cc=madman2003@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 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.