From: David Daney <david.daney@cavium.com>
To: Joe Buehler <aspam@cox.net>
Cc: linux-mips@linux-mips.org
Subject: Re: using mprotect to write to .text
Date: Tue, 11 Oct 2011 11:43:20 -0700 [thread overview]
Message-ID: <4E948E48.60205@cavium.com> (raw)
In-Reply-To: <4E948C62.3000802@cox.net>
Two points you may not be aware of:
1) cacheflush() clears all hazards.
2) There are no hazards on Octeon.
On 10/11/2011 11:35 AM, Joe Buehler wrote:
> David Daney wrote:
>
>> I cannot parse the meaning out of these last two sentences. The
>> cacheflush() system call both exists and works. You want to change it?
>
> Let me rewind a bit. I have a multithreaded binary running on multiple
> physical CPUs. As part of a debugging mechanism, I want to make changes
> to .text from a thread dedicated to the purpose. This requires at the
> least icache flushes on all CPUs but also hazard avoidance measures on
> all CPUs. So I understand anyway.
>
> The cacheflush call will do the flush but not the hazard avoidance. In
> order to solve my particular issue I am thinking about adding the hazard
> avoidance into cacheflush for my particular application. It is not a
> question of cacheflush being wrong, but of extending it to meet my
> needs. In fact, it seems like a useful change -- it will allow an
> application to do exactly what I want to do, and easily so, and would
> seem a logical place for the functionality to reside.
>
> Sorry if I seem a bit muddled -- this is extremely low level and not
> what I deal with day to day.
>
> Joe Buehler
>
next prev parent reply other threads:[~2011-10-11 18:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 20:02 using mprotect to write to .text Joe Buehler
2011-10-11 16:36 ` David Daney
2011-10-11 17:31 ` Joe Buehler
2011-10-11 18:06 ` David Daney
2011-10-11 18:35 ` Joe Buehler
2011-10-11 18:43 ` David Daney [this message]
2011-10-11 23:17 ` Ralf Baechle
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=4E948E48.60205@cavium.com \
--to=david.daney@cavium.com \
--cc=aspam@cox.net \
--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.