linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huang Shijie <sjhuang@iluvatar.ai>
To: Ira Weiny <ira.weiny@intel.com>
Cc: <akpm@linux-foundation.org>, <sfr@canb.auug.org.au>,
	<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/gup.c: fix the wrong comments
Date: Mon, 8 Apr 2019 09:23:21 +0800	[thread overview]
Message-ID: <20190408012320.GA11988@hsj-Precision-5520> (raw)
In-Reply-To: <20190404165046.GB1857@iweiny-DESK2.sc.intel.com>

On Thu, Apr 04, 2019 at 09:50:47AM -0700, Ira Weiny wrote:
> On Thu, Apr 04, 2019 at 03:23:47PM +0800, Huang Shijie wrote:
> > When CONFIG_HAVE_GENERIC_GUP is defined, the kernel will use its own
> > get_user_pages_fast().
> > 
> > In the following scenario, we will may meet the bug in the DMA case:
> > 	    .....................
> > 	    get_user_pages_fast(start,,, pages);
> > 	        ......
> > 	    sg_alloc_table_from_pages(, pages, ...);
> > 	    .....................
> > 
> > The root cause is that sg_alloc_table_from_pages() requires the
> > page order to keep the same as it used in the user space, but
> > get_user_pages_fast() will mess it up.
> 
> I wonder if there is something we can do to change sg_alloc_table_from_pages()
> to work?  Reading the comment for it there is no indication of this limitation.
The sg_alloc_table_from_pages() cannot work if the page order is wrong...

> So should we update that comment as well?
Okay.

I will create a DMA patch to add more comment for sg_alloc_table_from_pages().

Thanks
Huang Shijie


      reply	other threads:[~2019-04-08  1:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  7:23 Huang Shijie
2019-04-04 12:32 ` William Kucharski
2019-04-04 16:53   ` Weiny, Ira
2019-04-04 16:50 ` Ira Weiny
2019-04-08  1:23   ` Huang Shijie [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=20190408012320.GA11988@hsj-Precision-5520 \
    --to=sjhuang@iluvatar.ai \
    --cc=akpm@linux-foundation.org \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sfr@canb.auug.org.au \
    /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