public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Retry Large Buffer Allocations
@ 2011-04-08 15:51 Grant Erickson
  2011-04-08 15:51 ` [PATCH v5 1/3] MTD: Create Function to Perform Large Allocations Grant Erickson
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Grant Erickson @ 2011-04-08 15:51 UTC (permalink / raw)
  To: linux-mtd; +Cc: Jarkko Lavinen, Artem Bityutskiy

When handling user space read or write requests via mtd_{read,write}
or JFFS2 medium scan requests, the operations can fail because the
code backing these operations frequently requests large (128 KiB),
contiguous blocks of memory using kmalloc.

Under low-memory or highly-fragmented situations, particularly on
embedded systems with no swap store, these allocations will frequently
fail with -ENOMEM.

This patch series adds a common function to handle these allocation
requests in both the MTD driver and JFFS2 file system by exponentially
backing off on the size of the requested kernel transfer buffer until
it succeeds or until the requested transfer buffer size falls below
the page size.

This helps ensure the operation can succeed under low-memory,
highly-fragmented situations albeit somewhat more slowly.

  v2: Incorporated coding style and comment feedback from Artem.
  v3: Incorporated more feedback from Artem. Retargeted patch against
      l2-mtd-2.6.
  v4: Incorporated feedback from Artem about compilation on 64-bit
      architectures.
  v5: Split the patch into a series.

Signed-off-by: Grant Erickson <marathon96@gmail.com>
Tested-by: Ben Gardiner <bengardiner at nanometrics.ca>
---

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

end of thread, other threads:[~2011-04-13  4:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 15:51 [PATCH v5 0/3] Retry Large Buffer Allocations Grant Erickson
2011-04-08 15:51 ` [PATCH v5 1/3] MTD: Create Function to Perform Large Allocations Grant Erickson
2011-04-08 15:51 ` [PATCH v5 2/3] MTD: Retry Large Buffer Allocations Grant Erickson
2011-04-08 15:51 ` [PATCH v5 3/3] JFFS2: " Grant Erickson
2011-04-09 14:38   ` Artem Bityutskiy
2011-04-09 14:28 ` [PATCH v5 0/3] " Artem Bityutskiy
2011-04-11 12:40 ` Ben Gardiner
2011-04-13  4:05   ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox