[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] microblaze+MMU optimization issues



Hi Steve,

Steven Hein wrote:

I've been trying to characterize what kind of performance
we'll see from our Microblaze+MMU design.   As part of this,
I've been trying to play with higher levels of optimization
in kernel and user packages.   I've noticed that I can't use
-O2 optimization in most user apps that use fork().  (I've
observed this with the busybox, sysvinit, and dropbear
packages).

I'm sure I need to provide more detail on this....but what
I have observed is when I fork() is called on an app compiled
with -O2, the child process has garbage in many of the
variables that it inherits from the parent.    When I run
with -O (or in some cases -Os), then everything works fine.
I haven't been able to reproduce the symptom with a simple
piece of test code at this point.    Is this behavior
something that you have seen?    (I see that most components
of the release are not built with -O2, but rather -Os).

Ouch. No, I've not seen this, or at least not characterised any issues down to this cause.

It's possible that this garbage is in variables that have been mapped to registers - in which case it would point to a problem in the vfork / clone task handling.

If the variables are memory-bound then we'd be looking for a problem with the MMU handling and page table twiddling duing fork.

If so, is it something that I can set -O2 and disable a
particular optimization?    Also, I saw a previous email
from you that said you were testing a new compiler/toolchain--
does this newer version resolve the problem?

We'd need to look at the assembly produced by gcc - obviously a minimal test case would help there.

Doing

$ mb-linux-objdump -S myapp > myapp.dump

on the two different versions would be the place to start.

If you can distill this down to a minimal test case it will make it much easier to track down.

Also.....are there any plans for being able to build
libraries that are optimized for a particular design
(i.e. with HW multiplication or division enabled)?
Is the source for the toolchains available  (i.e. to allow
them to be built via crosstool)?

I've got an updated toolchain I'm just testing now that has a few different glibc builds for the different optimisations.

I had hoped to merge the MMU support directly into the next PetaLinux release but it's looking like another interim -mmu test cut might be more appropriate to get some of the recent work better tested.

John

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/