The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: ebiederman@uswest.net (Eric W. Biederman)
To: Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
	Rik van Riel <riel@conectiva.com.br>,
	Krzysztof Rusocki <kszysiu@main.braxis.co.uk>,
	linux-xfs@oss.sgi.com, linux-kernel@vger.kernel.org,
	Alex Bligh - linux-kernel <linux-kernel@alex.org.uk>
Subject: Re: %u-order allocation failed
Date: 07 Oct 2001 12:30:20 -0600	[thread overview]
Message-ID: <m1wv27wber.fsf@frodo.biederman.org> (raw)
In-Reply-To: <Pine.LNX.3.96.1011006210743.7808D-100000@artax.karlin.mff.cuni. cz> <482450248.1002414411@[195.224.237.69]>
In-Reply-To: <482450248.1002414411@[195.224.237.69]>

Alex Bligh - linux-kernel <linux-kernel@alex.org.uk> writes:

> Mikulas,
> 
> > It uses vmalloc only when __GFP_VMALLOC flag is given - and so it is
> > expected to not use __GFP_VMALLOC flag in IRQ.
> 
> Ah OK. If your point is that people use GFP_ATOMIC when it's
> not needed, and demand physically contiguous memory when only
> virtually contiguous memory is needed, in several places in
> the kernel, then you are correct. [I am not convinced that
> vmalloc() is the best way to fix it though.]
> 
> Most of the order>0 users of __get_free_pages() don't
> 'need' to do that. For instance I was convinced that networking
> code needed this for larger than 4k packets (pre-fragmentation
> or post-prefragmentation) until someone pointed out that
> the kiovec stuff was there, waiting to be used, if someone
> made the code changes. But the code changes are non-trivial.

The zero copy stuff introduced in 2.4.4 allows for skb fragments.
I haven't seen any of the network drivers using it on their receive
path but it should be possible.

> Note also that something (not sure what) has made fragmentation
> increasingly prevalent over the years since the buddy allocator
> was originally put in. 

Actually it seems to be situations like the stack now being two pages

> (see my earlier patch for measuring
> fragmentation). There is currently /no/ intelligence in there
> to defragment stuff, and the 'light touch' patches (ideas I had
> and posted here) don't appear to work. If we want __get_free_pages
> to allocate order>0 this is possible to do reliably if we
> have some intelligent form of page out which attempts
> to defragment as it runs, or else run a defragmenter. It's also possible
> to do allocate order>0 GFP_ATOMIC far more reliably than at
> present if we had a target for defragmentation under normal
> operation, just like we retain a target for pages reserved
> for atomic allocation.
> 
> The very original buddy code (circa 94/95 which I wrote) maintained
> that there should be (from memory) at least one entry on a high
> order list (I think it was the 64k list), which gave you a few
> guaranteed 8k allocations (which was I was interested in). It's
> trivial to patch this into __get_free_pages though I haven't
> tried this (i.e. rather than just look at total free pages,
> look at the existance of a page on either the order=4, 5, 6...
> queues). Note you will use memory less efficiently if you do
> this. In times of cheaper memory costs, it might be worth
> testing this approach again.
> 
> --
> Alex Bligh
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2001-10-07 18:41 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-05 11:07 %u-order allocation failed Krzysztof Rusocki
2001-10-05 11:59 ` Rik van Riel
2001-10-05 20:18   ` Seth Mos
2001-10-05 20:22     ` Rik van Riel
2001-10-05 20:31       ` Seth Mos
2001-10-05 20:43         ` Steve Lord
2001-10-05 21:09           ` Seth Mos
2001-10-05 22:06     ` David Schwartz
2001-10-05 22:16       ` Seth Mos
2001-10-06 14:00   ` Mikulas Patocka
2001-10-06 14:03     ` Rik van Riel
2001-10-06 14:44       ` Mikulas Patocka
2001-10-06 15:31         ` Mikulas Patocka
2001-10-06 19:05           ` Mikulas Patocka
2001-10-06 16:58         ` Rik van Riel
2001-10-06 17:48           ` Mikulas Patocka
2001-10-06 18:12             ` Anton Blanchard
2001-10-06 19:07               ` Mikulas Patocka
2001-10-06 20:13                 ` Benjamin Herrenschmidt
2001-10-06 22:34                   ` Mikulas Patocka
2001-10-07  1:23                     ` Rik van Riel
2001-10-07 11:12                     ` Benjamin Herrenschmidt
2001-10-06 21:13                 ` Alan Cox
2001-10-06 22:31                   ` Mikulas Patocka
2001-10-06 22:42                     ` Alan Cox
2001-10-06 22:58                       ` Mikulas Patocka
     [not found]                         ` <Pine.LNX.3.96.1011007003803.18004D-100000@artax.karlin.mff.cuni .cz>
2001-10-06 23:36                           ` Alex Bligh - linux-kernel
     [not found]                     ` <Pine.LNX.3.96.1011007002406.18004A-100000@artax.karlin.mff.cuni .cz>
2001-10-06 23:34                       ` Alex Bligh - linux-kernel
2001-10-07  7:35             ` Pavel Machek
     [not found]         ` <Pine.LNX.3.96.1011006164044.29342B-200000@artax.karlin.mff.cuni .cz>
2001-10-06 17:59           ` Alex Bligh - linux-kernel
2001-10-06 19:13             ` Mikulas Patocka
2001-10-06 19:22               ` arjan
2001-10-06 22:36                 ` Mikulas Patocka
     [not found]               ` <Pine.LNX.3.96.1011006210743.7808D-100000@artax.karlin.mff.cuni. cz>
2001-10-06 23:26                 ` Alex Bligh - linux-kernel
2001-10-07 18:30                   ` Eric W. Biederman [this message]
2001-10-08 15:01                     ` Alex Bligh - linux-kernel
2001-10-07 18:32                   ` Eric W. Biederman
2001-10-07  9:40         ` Alan Cox
2001-10-07 12:28           ` Mikulas Patocka
2001-10-07 14:12             ` Alan Cox
2001-10-07 15:42               ` Mikulas Patocka
2001-10-07 22:01                 ` Alan Cox
2001-10-08 15:08                   ` Alex Bligh - linux-kernel
2001-10-08 16:44                   ` Pavel Machek
2001-10-08 22:21                   ` Mikulas Patocka
2001-10-08 21:16                     ` David Lang
     [not found]                     ` <Pine.LNX.3.96.1011009001720.20446A-100000@artax.karlin.mff.cuni .cz>
2001-10-08 22:53                       ` Alex Bligh - linux-kernel
2001-10-08 23:31                         ` Mikulas Patocka
2001-10-08 23:44                           ` Alan Cox
2001-10-08 23:46                             ` Mikulas Patocka
2001-10-09  9:45                               ` Pavel Machek
2001-10-08 23:48                           ` Linus Torvalds
2001-10-08 23:54                             ` Mikulas Patocka
2001-10-09 11:48                             ` Rik van Riel

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=m1wv27wber.fsf@frodo.biederman.org \
    --to=ebiederman@uswest.net \
    --cc=kszysiu@main.braxis.co.uk \
    --cc=linux-kernel@alex.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@oss.sgi.com \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=riel@conectiva.com.br \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox