All of lore.kernel.org
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Subject: Re: flush_kernel_dcache_page() not needed ?
Date: Tue, 04 Sep 2007 14:46:54 +0200	[thread overview]
Message-ID: <46DD53BE.2070004@gmail.com> (raw)
In-Reply-To: <20070904.005400.52128244.anemo@mba.ocn.ne.jp>

Atsushi Nemoto wrote:
> Indeed.  But copy_strings() is not rare case (called on each execve),
> so there might be some constraints which make us free from the
> aliasing problem.

The point is that this _generic_ function has been created so we need
to understand if MIPS architecture needs to implement it or not,
whatever its current usages. This was actually what I was trying to
understand with this thread.

Whatever the constraints, they don't seem to be intended at all since
flush_kernel_dcache_page() is called... So even if the current code is
working fine, it seems very fragile _if_ MIPS needs to implement this
cache helper.

> I'll look at it further, but any testcase are welcome.

One thing you might want to try is:

	$ echo 0 > /proc/sys/kernel/randomize_va_space

and see if your system still works fine. This command should avoid a
data cache flush when moving the stack around. See shift_arg_pages().

With this, maybe you could give this testcase a try:

	$ /bin/echo "`seq 10000`" > seq.txt

and see if seq.txt is correct. This command should pass to echo (not
the bash builtin one) a long argument that should fill your
dcache.

That said the execve syscall code is quite 'hairy' and it may not be
suprising that after this syscall the dcache has been completly
flushed and thus make the problem disappear.

		Franck

  reply	other threads:[~2007-09-04 12:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 12:25 flush_kernel_dcache_page() not needed ? Franck Bui-Huu
2007-08-31 14:50 ` Markus Gothe
2007-08-31 15:04   ` Franck Bui-Huu
2007-08-31 23:42   ` Ralf Baechle
2007-09-02 21:12     ` Markus Gothe
2007-08-31 14:54 ` Markus Gothe
2007-09-03 13:52 ` Atsushi Nemoto
2007-09-03 15:36   ` Franck Bui-Huu
2007-09-03 15:54     ` Atsushi Nemoto
2007-09-04 12:46       ` Franck Bui-Huu [this message]
2007-09-04 13:54         ` Atsushi Nemoto
2007-09-04 14:05           ` Franck Bui-Huu
2007-09-04 14:16             ` Atsushi Nemoto
2007-09-04 14:17               ` Franck Bui-Huu
2007-09-05 15:33         ` Atsushi Nemoto
2007-09-07  9:00           ` Franck Bui-Huu
2007-09-14  8:32           ` Franck Bui-Huu
2007-09-14 14:29             ` Atsushi Nemoto
2007-09-14 15:47               ` Franck Bui-Huu

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=46DD53BE.2070004@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.