RE: Bigphysarea and mbuff

[email protected] Tue, 1 Aug 2006 18:17:18 -0600
Newsgroups gmane.linux.real-time.rtlinux.general
Message-ID <CC3927BD446D8240AE6041EA3AB77EDF01583CA8@ES20SNLNT.srn.sandia.gov>
This is a multi-part message in MIME format.

--===============0627897925==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C6B5C9.4E431A86"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6B5C9.4E431A86
Content-Type: text/plain;
 charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

I haven't used mbuff but use bigphysearea a lot to share data between =
rtl and user land.  One issue I had to work through was makeing sure =
that the memory was marked non-cached to ensure different threads were =
actually reading/writing data to memory.

________________________________

From: [email protected] on behalf of [email protected]
Sent: Tue 8/1/2006 8:45 AM
To: [email protected]
Subject: Re: [Rtl] Bigphysarea and mbuff




Well it appears to be a bug with high memory pages, somehow.  This same
weirdness doesn't happen when bootng with mem=3D768M (no high memory).  =
:/

-Calin


On Mon, 31 Jul 2006, [email protected] wrote:

>
> Hi guys,
>
> For some reason I can't get mbuffs to work in the same kernel module =
as
> bigphysareas!
>
> I have a 1GB system, reserve 200MB as bigphysarea at boot, then =
allocate
> this memory using bigphysarea_alloc() and give it to TLSF so that I =
can have
> dynamic memory in an rt-thread.  That part works OK.
>
> *However* when I create an mbuff to share with userspace (has nothing =
to do
> with the bigphysarea per se), userspace sees garbage in the mbuff. =
Kernel
> space continues to see valid data in the mbuff.
>
> I suspect either TLSF is corrupting memory or that bigphysarea itself =
is
> broken.  Does anyone know if TLSF can be compiled with MAX_FLI of 31 =
(to
> support up to 2048MB memory)?
>
>
> The weird thing is that if I disable bigphysarea and instead give TLSF =
a
> region allocated with vmalloc() everything works fine... so it might =
not be
> TLSF's fault, but rather the fact that I have a bigphysarea and an =
mbuff both
> in the same address space.
>
> It's a really weird bug.
>
> I'm on 2.4.29-rtl3.2 patched for bigphysarea.
>
> Any thoughts?  Is bigphysarea known to not work so well with the mbuff
> device?
>
> Anyone else get both bigphysarea and mbuffs working?
>
> -Calin
>
> _______________________________________________
> Rtl mailing list
> [email protected]
> http: //hq.fsmlabs.com/mailman/listinfo/rtl
> http: /www.rtlinux-gpl.org/
>
>
_______________________________________________
Rtl mailing list
[email protected]
http://hq.fsmlabs.com/mailman/listinfo/rtl
http:/www.rtlinux-gpl.org/




------_=_NextPart_001_01C6B5C9.4E431A86
Content-Type: text/html;
 charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<HTML dir=3Dltr><HEAD><TITLE>Re: [Rtl] Bigphysarea and mbuff</TITLE>=0A=
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dunicode">=0A=
<META content=3D"MSHTML 6.00.2900.2912" name=3DGENERATOR></HEAD>=0A=
<BODY>=0A=
<DIV id=3DidOWAReplyText47779 dir=3Dltr>=0A=
<DIV dir=3Dltr><FONT face=3DArial color=3D#000000 size=3D2>I haven't =
used mbuff but use bigphysearea a lot to share data between rtl and user =
land.&nbsp; One issue I had to work through was makeing sure that the =
memory was marked non-cached to ensure different threads were actually =
reading/writing data to memory.</FONT></DIV></DIV>=0A=
<DIV dir=3Dltr><BR>=0A=
<HR tabIndex=3D-1>=0A=
<FONT face=3DTahoma size=3D2><B>From:</B> [email protected] on =
behalf of [email protected]<BR><B>Sent:</B> Tue 8/1/2006 8:45 =
AM<BR><B>To:</B> [email protected]<BR><B>Subject:</B> Re: [Rtl] =
Bigphysarea and mbuff<BR></FONT><BR></DIV>=0A=
<DIV><BR>=0A=
<P><FONT size=3D2>Well it appears to be a bug with high memory pages, =
somehow.&nbsp; This same<BR>weirdness doesn't happen when bootng with =
mem=3D768M (no high memory).&nbsp; :/<BR><BR>-Calin<BR><BR><BR>On Mon, =
31 Jul 2006, [email protected] wrote:<BR><BR>&gt;<BR>&gt; Hi =
guys,<BR>&gt;<BR>&gt; For some reason I can't get mbuffs to work in the =
same kernel module as<BR>&gt; bigphysareas!<BR>&gt;<BR>&gt; I have a 1GB =
system, reserve 200MB as bigphysarea at boot, then allocate<BR>&gt; this =
memory using bigphysarea_alloc() and give it to TLSF so that I can =
have<BR>&gt; dynamic memory in an rt-thread.&nbsp; That part works =
OK.<BR>&gt;<BR>&gt; *However* when I create an mbuff to share with =
userspace (has nothing to do<BR>&gt; with the bigphysarea per se), =
userspace sees garbage in the mbuff. Kernel<BR>&gt; space continues to =
see valid data in the mbuff.<BR>&gt;<BR>&gt; I suspect either TLSF is =
corrupting memory or that bigphysarea itself is<BR>&gt; broken.&nbsp; =
Does anyone know if TLSF can be compiled with MAX_FLI of 31 (to<BR>&gt; =
support up to 2048MB memory)?<BR>&gt;<BR>&gt;<BR>&gt; The weird thing is =
that if I disable bigphysarea and instead give TLSF a<BR>&gt; region =
allocated with vmalloc() everything works fine... so it might not =
be<BR>&gt; TLSF's fault, but rather the fact that I have a bigphysarea =
and an mbuff both<BR>&gt; in the same address space.<BR>&gt;<BR>&gt; =
It's a really weird bug.<BR>&gt;<BR>&gt; I'm on 2.4.29-rtl3.2 patched =
for bigphysarea.<BR>&gt;<BR>&gt; Any thoughts?&nbsp; Is bigphysarea =
known to not work so well with the mbuff<BR>&gt; device?<BR>&gt;<BR>&gt; =
Anyone else get both bigphysarea and mbuffs working?<BR>&gt;<BR>&gt; =
-Calin<BR>&gt;<BR>&gt; =
_______________________________________________<BR>&gt; Rtl mailing =
list<BR>&gt; [email protected]<BR>&gt; http: =
//hq.fsmlabs.com/mailman/listinfo/rtl<BR>&gt; http: =
/www.rtlinux-gpl.org/<BR>&gt;<BR>&gt;<BR>________________________________=
_______________<BR>Rtl mailing list<BR>[email protected]<BR><A =
href=3D"http://hq.fsmlabs.com/mailman/listinfo/rtl">http://hq.fsmlabs.com=
/mailman/listinfo/rtl</A><BR><A =
href=3D"">http:/www.rtlinux-gpl.org/</A><BR><BR></FONT></P></DIV></BODY><=
/HTML>
------_=_NextPart_001_01C6B5C9.4E431A86--


--===============0627897925==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Rtl mailing list
[email protected]
http://hq.fsmlabs.com/mailman/listinfo/rtl
http:/www.rtlinux-gpl.org/
--===============0627897925==--