All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] lib/scatterlist: Small SGL tidy
@ 2018-03-07 12:47 Tvrtko Ursulin
  2018-03-07 12:47 ` [PATCH 1/6] lib/scatterlist: Tidy types and fix overflow checking in sgl_alloc_order Tvrtko Ursulin
                   ` (6 more replies)
  0 siblings, 7 replies; 33+ messages in thread
From: Tvrtko Ursulin @ 2018-03-07 12:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tvrtko Ursulin, Bart Van Assche, Hannes Reinecke,
	Johannes Thumshirn, Jens Axboe

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

I spotted a few small issues in the recent added SGL code so am sending some
patches to tidy this.

My motivation was looking at sgl_alloc_order to potentially use from the i915
driver, with a small addition to support fall-back to smaller order allocation
if so was requested.

But then I realized scatterlist table allocated with sgl_alloc_order is not
compatible with being put into the sg_table container due different allocator
being used.

If it had used the standard chained scatterlist allocation, it would benefit
from less memory pressure for small-order large length allocations (in other
words large nent - as it stands it can request really large kmalloc allocations
for those cases), but to convert it to use that looks to would require some
refactoring of the SGL API users. So I wasn't sure how feasible would that be.

There were some other unclear bits to me in the SGL API, like why so much API
some of which is unused, so I tried to trim that as well.

So don't know - comments are welcome.

Tvrtko Ursulin (6):
  lib/scatterlist: Tidy types and fix overflow checking in
    sgl_alloc_order
  lib/scatterlist: Skip requesting zeroed allocations in sgl_alloc_order
  lib/scatterlist: Do not leak pages when high-order allocation fails
  lib/scatterlist: Unexport some trivial wrappers
  lib/scatterlist: Drop unused sgl_free_order
  lib/scatterlist: Drop order argument from sgl_free_n_order

 drivers/target/target_core_transport.c |  2 +-
 include/linux/scatterlist.h            | 36 +++++++++++---
 lib/scatterlist.c                      | 91 +++++++++++-----------------------
 3 files changed, 57 insertions(+), 72 deletions(-)

---
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>

-- 
2.14.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2018-03-09 14:05 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 12:47 [PATCH 0/6] lib/scatterlist: Small SGL tidy Tvrtko Ursulin
2018-03-07 12:47 ` [PATCH 1/6] lib/scatterlist: Tidy types and fix overflow checking in sgl_alloc_order Tvrtko Ursulin
2018-03-07 16:10   ` Bart Van Assche
2018-03-07 17:06     ` Tvrtko Ursulin
2018-03-09 14:04       ` Tvrtko Ursulin
2018-03-07 12:47 ` [PATCH 2/6] lib/scatterlist: Skip requesting zeroed allocations " Tvrtko Ursulin
2018-03-07 15:35   ` Andy Shevchenko
2018-03-07 17:31     ` Tvrtko Ursulin
2018-03-07 12:47 ` [PATCH 3/6] lib/scatterlist: Do not leak pages when high-order allocation fails Tvrtko Ursulin
2018-03-07 16:16   ` Bart Van Assche
2018-03-07 17:06     ` Tvrtko Ursulin
2018-03-07 12:47 ` [PATCH 4/6] lib/scatterlist: Unexport some trivial wrappers Tvrtko Ursulin
2018-03-07 16:19   ` Bart Van Assche
2018-03-07 17:10     ` Tvrtko Ursulin
2018-03-07 12:47 ` [PATCH 5/6] lib/scatterlist: Drop unused sgl_free_order Tvrtko Ursulin
2018-03-07 12:47 ` [PATCH 6/6] lib/scatterlist: Drop order argument from sgl_free_n_order Tvrtko Ursulin
2018-03-07 12:47   ` Tvrtko Ursulin
2018-03-07 16:23   ` Bart Van Assche
2018-03-07 16:23     ` Bart Van Assche
2018-03-07 17:23     ` Tvrtko Ursulin
2018-03-07 17:23       ` Tvrtko Ursulin
2018-03-07 17:33       ` Bart Van Assche
2018-03-07 17:33         ` Bart Van Assche
2018-03-07 18:30   ` James Bottomley
2018-03-07 18:30     ` James Bottomley
2018-03-08  7:59     ` Tvrtko Ursulin
2018-03-08  7:59       ` Tvrtko Ursulin
2018-03-08 15:56       ` Bart Van Assche
2018-03-08 15:56         ` Bart Van Assche
2018-03-08 17:06         ` Tvrtko Ursulin
2018-03-08 17:06           ` Tvrtko Ursulin
2018-03-07 18:38 ` [PATCH 0/6] lib/scatterlist: Small SGL tidy Bart Van Assche
2018-03-08  8:04   ` Tvrtko Ursulin

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.