[<prev] [next>] [day] [month] [year] [list]
Message-ID: <a8f16e2b0703201434w39108ed0m6d1b50f3b8cd6c42@mail.gmail.com>
Date: Wed, 21 Mar 2007 00:34:08 +0300
From: "Dan Kruchinin" <dubalom@...il.com>
To: "Chris Friesen" <cfriesen@...tel.com>, linux-kernel@...r.kernel.org
Subject: Re: how to purposfully fragment memory?
On 3/20/07, Chris Friesen <cfriesen@...tel.com> wrote:
> Asgard wrote:
>
> > btw, can you describe your aim in details?
>
> I'm doing some work on a network device driver. We were having jumbo
> frame issues after being up for a month or so because it couldn't
> allocate enough contiguous memory.
>
> We've got a new code path now that doesn't need large contiguous
> allocations, so I'd like to demonstrate it by forcing the system to
> become severely fragmented.
>
> Chris
>
and by the way, you can try to use void split_page(struct page *page,
unsigned int order) function, but keep in mind, that it's not
recommended to use it in drivers:
/*
* split_page takes a non-compound higher-order page, and splits it into
* n (1<<order) sub-pages: page[0..n]
* Each sub-page must be freed individually.
*
* Note: this is probably too low level an operation for use in drivers.
* Please consult with lkml before using this in your driver.
*/
void split_page(struct page *page, unsigned int order)
Good luck.
Dan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists