lkml.org 
[lkml]   [1996]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Module loading (2.0.24) fails with "Unable to allocate DMA memory"
   Date: Sat, 9 Nov 1996 18:40:54 +0000 (GMT)
From: Gerard Roudier <groudier@club-internet.fr>
X-Sender: groudier@localhost
cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.rutgers.edu
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


On Sat, 9 Nov 1996, Jean Francois Martinez wrote:

> The following are thoughts on DMA memory it is not based on a study of
> the source code so it is not impossible Linux kernel does some things
> I mention.
>
> When we are initializing a module we are not under time pressure so we
> can allocate with GFP_DMA|GFP_NONATOMIC. We can even swap.
>
> When starting an IO, I am not sure we can swap (the IO has still not
> started but if the DMA was claimed by the same peripheral we use for
> swapping then we need preemptable IO) we should be able to punch a
> hole in memory big enough just by discarding unmodified pages.
>
> It is not acceptable having unreliable drivers due to this issue.

Je vais repondre en Francais (sans accents ni cedilles).
Je n'ai jamais ecrit que tu avais tord. En fait, je trouve tes remarques
tres pertinentes.
J'ai simplement essayer d'expliquer ce que j'avais compris dans les sources
du noyau et qui pouvait avoir un rapport avec le probleme reporte.

Gerard Roudier has unavertely CC to linux-kernel this reply in french
to Linux-kernel so I will translate.

Par exemple:

- Je n'ai vu nulle part d'heuristique se preoccupant de recuperer des
pages contigues pour satisfaire des allocations d'ordre > 0.
A part peu-etre "shrink_mmap()" qui balaye la memoire circulairement pour
recuperer les pages qu'il a cochees au tour precedent.
Je n'ai rien vu a ce sujet dans "get_free_pages()" qui semble ne pas se
preoccuper du tout de la disponibilite de pages contigues dans sa condition
de sortie.

He has examined the memory allocation code and has not found any
heuristic trying to get contiguous space for allocations > 0. Except
shrink_mmap() who swepps xircylarly the memory to get the pages marked
at the preceeding tour. He has seen nothing in get_free_pages() who
seems not bother about having contiguous pages in its exit condition.

Au sujet des allocation GFP_ATOMIC, par exemple:

- "get_more_buffer_headers" fait un telle allocation pour eviter de se
mordre la queue. Quand il n'y arrive pas, il "schedule".
Le probleme, c'est que parfois il risque de scheduler des
centaines de milliers de fois avant d'obtenir ce qu'il demande.

About GFP_ATOMIC allocations, for instance:

- "get_more_buffer_headers" does such an allocation for avoiding
biting its tail. When it is unable to do it, it "shedules". The
problem is it can scedule hundreds of before before getting what it
needs.

Au sujet du DMA ISA j'ai deja propose quelque chose dans un autre
courrier, mais comme c'est un peu severe, je me tairai su ce point.

About the subject of DMA ISA he has already proposed something in
another mail, but because it is a bit hard he will talk no more about
this point.

Des imperfections de ce genre, j'en cru en voir des dizaines dans Linux.
Mon metier c'est de developper des logiciels. On fait ce qu'on peut,
c'est tres difficile. Il y a toujours de la place pour des ameliorations,
mais on ne doit pas tout casser. Il faut ameliorer de maniere
incrementale et pragmatique.

Linux est un noyau qui fonctionne bien et qui n'a pas a rougir devant ses
concurrents gratuits et payants. C'est le logiciel que je prefere avec X11.

Tes propositions sont tres raisonnables et tres interessantes. C'est grace
a de telles remarques que Linux pourra etre meilleur demain.

The preceeding seems to be between he and me.

On va pas se prendre la tete avec ce sujet pendant des semaines si les
gourous semblent s'en desinteresser. Pour ma part je pense que je vais
abandonner. Il y aura bien d'autre occasions pour en debattre de nouveau.

Because the gourous seem not interested in this subject he is thinking
in stopping work on the subject.

Now it is me speaking. We got Alan Cox replying so it is not a bad
start. IMO the matter is serious. It makes the Linux kernel
unreliable. Imagine a cron task in a sever failing because the module
needed canot get DMA memory. That's not the kind of things who
must perdure in Linux now it is gaining public exposure.

Salut, Jean Francois et a bientot peut-etre pour un autre sujet aussi
interessant.

> -- >
> Jean Francois Martinez

Gerard Roudier.

--

Jean Francois Martinez

-What is the operating system used by Bill Gates?
-Linux of course. Do you think stupid people become millionnaire?

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:4.367 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site