On Thu, 12 May 2011 17:21:50 -0700, Keith Packard kei...@keithp.com wrote:
On Thu, 12 May 2011 22:17:10 +0100, Chris Wilson ch...@chris-wilson.co.uk
wrote:
+ pages = kmalloc(n*sizeof(struct page *),
+ GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
+ if (pages == NULL)
On Sun, 15 May 2011 09:00:51 +0100, Chris Wilson ch...@chris-wilson.co.uk
wrote:
We're not performing the same trick as drm_malloc_ab() here though, since
this is only used for a temporary allocation we try to consume any
high-order pages, rather than building an array of order-0 pages,
Replace the three nearly identical copies of the code with a single
function. And take advantage of the opportunity to do some
micro-optimisation: avoid the vmalloc if at all possible and also avoid
dropping the lock unless we are forced to acquire the mm semaphore.
Measuring the impact of the
On Thu, 12 May 2011 22:17:10 +0100, Chris Wilson ch...@chris-wilson.co.uk
wrote:
+ pages = kmalloc(n*sizeof(struct page *),
+ GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
+ if (pages == NULL) {
+ pages = drm_malloc_ab(n, sizeof(struct page *));
+