diff options
author | Mandeep Singh Baines <msb@chromium.org> | 2012-07-30 17:43:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:22 -0400 |
commit | e04f228335bde305d2833e40382ed37fc36f9efe (patch) | |
tree | b942a4540c99d44bba5e0950c92f089a2f621ebf /lib | |
parent | c24aa64d169b7224f1a5bc6a4b1365da37ce861b (diff) |
lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
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 <msb@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <rob.clark@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Sonny Rao <sonnyrao@chromium.org>
Cc: Olof Johansson <olofj@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scatterlist.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 6096e89bee55..d09bdd8b40ce 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
@@ -279,14 +279,6 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents, | |||
279 | if (!left) | 279 | if (!left) |
280 | sg_mark_end(&sg[sg_size - 1]); | 280 | sg_mark_end(&sg[sg_size - 1]); |
281 | 281 | ||
282 | /* | ||
283 | * only really needed for mempool backed sg allocations (like | ||
284 | * SCSI), a possible improvement here would be to pass the | ||
285 | * table pointer into the allocator and let that clear these | ||
286 | * flags | ||
287 | */ | ||
288 | gfp_mask &= ~__GFP_WAIT; | ||
289 | gfp_mask |= __GFP_HIGH; | ||
290 | prv = sg; | 282 | prv = sg; |
291 | } while (left); | 283 | } while (left); |
292 | 284 | ||