Skip to content

Commit

Permalink
lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
Browse files Browse the repository at this point in the history
We are seeing a lot of sg_alloc_table allocation failures using the new
drm prime infrastructure.  We isolated the cause to code in
__sg_alloc_table that was re-writing the gfp_flags.

There is a comment in the code that suggest that there is an assumption
about the allocation coming from a memory pool.  This was likely true
when sg lists were primarily used for disk I/O.

Signed-off-by: Mandeep Singh Baines <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Cong Wang <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Inki Dae <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Sonny Rao <[email protected]>
Cc: Olof Johansson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mandeep Singh Baines authored and torvalds committed Jul 31, 2012
1 parent c24aa64 commit e04f228
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/scatterlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,6 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents,
if (!left)
sg_mark_end(&sg[sg_size - 1]);

/*
* only really needed for mempool backed sg allocations (like
* SCSI), a possible improvement here would be to pass the
* table pointer into the allocator and let that clear these
* flags
*/
gfp_mask &= ~__GFP_WAIT;
gfp_mask |= __GFP_HIGH;
prv = sg;
} while (left);

Expand Down

0 comments on commit e04f228

Please sign in to comment.