All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Adrian McMenamin <lkmladrian@gmail.com>
Cc: Tejun Heo <htejun@gmail.com>, linux-ide@vger.kernel.org
Subject: Re: Best way to segments/requests
Date: Fri, 14 Dec 2007 10:34:45 -0500	[thread overview]
Message-ID: <4762A295.80008@rtr.ca> (raw)
In-Reply-To: <8b67d60712140722s7f579f30t978a8a8b926587f5@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

Adrian McMenamin wrote:
> On 14/12/2007, Tejun Heo <htejun@gmail.com> wrote:
>> Hello,
> 
>> There just isn't much room for maneuver w/ just one segment.  Large
>> contiguous memory region isn't too common these days.  That said, there
>> was a bug recently spotted by Mark Lord which made contiguous memory
>> regions even rarer.  Which kernel version are you using?
>>
> 
> Bang up to date latest git, ie -rc5-gitX
..

Not in -git yet, but it is in -mm.
Attached here for your convenience.

>>> Is that right? What is the best way to go here?
>> If you can spare some memory and cpu cycles, preparing a contiguous
>> buffer and staging data there might help.  It will eat up some cpu
>> cycles but it won't be too much compared to PIO cycles.
>>
> 
> OK, I'll try it
..

That's probably your best bet, even though it will mean copying
to/from your big bounce buffer with each I/O.

The code could be clever, I suppose, and only bounce when the supplied
I/O region is smaller than XXX pages.

Cheers


[-- Attachment #2: 13_fix_page_alloc_for_larger_io_segments.patch --]
[-- Type: text/x-patch, Size: 569 bytes --]

"Improved version", more similar to the 2.6.23 code:

Fix page allocator to give better chance of larger contiguous segments (again).

Signed-off-by: Mark Lord <mlord@pobox.com
---

--- old/mm/page_alloc.c	2007-12-13 19:25:15.000000000 -0500
+++ linux-2.6/mm/page_alloc.c	2007-12-13 19:43:07.000000000 -0500
@@ -760,7 +760,7 @@
 		struct page *page = __rmqueue(zone, order, migratetype);
 		if (unlikely(page == NULL))
 			break;
-		list_add(&page->lru, list);
+		list_add_tail(&page->lru, list);
 		set_page_private(page, migratetype);
 	}
 	spin_unlock(&zone->lock);

      reply	other threads:[~2007-12-14 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 22:59 Best way to segments/requests Adrian McMenamin
2007-12-14 15:05 ` Tejun Heo
2007-12-14 15:22   ` Adrian McMenamin
2007-12-14 15:34     ` Mark Lord [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4762A295.80008@rtr.ca \
    --to=liml@rtr.ca \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkmladrian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.