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