mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
drm/gem: replace misleading comment
shmem supports page-relocations during swapin since quite some time. It
was implemented in:
commit bde05d1ccd
Author: Hugh Dickins <hughd@google.com>
Date: Tue May 29 15:06:38 2012 -0700
shmem: replace page if mapping excludes its zone
The gem-comment about wrongly placed DMA32 pages is no longer valid.
Replace it with a proper comment but keep the BUG_ON() to verify correct
shmem behavior.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
89086bca67
commit
2123000b01
1 changed files with 4 additions and 15 deletions
|
@ -474,21 +474,10 @@ struct page **drm_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask)
|
|||
goto fail;
|
||||
pages[i] = p;
|
||||
|
||||
/* There is a hypothetical issue w/ drivers that require
|
||||
* buffer memory in the low 4GB.. if the pages are un-
|
||||
* pinned, and swapped out, they can end up swapped back
|
||||
* in above 4GB. If pages are already in memory, then
|
||||
* shmem_read_mapping_page_gfp will ignore the gfpmask,
|
||||
* even if the already in-memory page disobeys the mask.
|
||||
*
|
||||
* It is only a theoretical issue today, because none of
|
||||
* the devices with this limitation can be populated with
|
||||
* enough memory to trigger the issue. But this BUG_ON()
|
||||
* is here as a reminder in case the problem with
|
||||
* shmem_read_mapping_page_gfp() isn't solved by the time
|
||||
* it does become a real issue.
|
||||
*
|
||||
* See this thread: http://lkml.org/lkml/2011/7/11/238
|
||||
/* Make sure shmem keeps __GFP_DMA32 allocated pages in the
|
||||
* correct region during swapin. Note that this requires
|
||||
* __GFP_DMA32 to be set in mapping_gfp_mask(inode->i_mapping)
|
||||
* so shmem can relocate pages during swapin if required.
|
||||
*/
|
||||
BUG_ON((gfpmask & __GFP_DMA32) &&
|
||||
(page_to_pfn(p) >= 0x00100000UL));
|
||||
|
|
Loading…
Reference in a new issue