* More questions...
@ 2001-10-15 21:46 H. Peter Anvin
2001-10-15 21:56 ` Kanoj Sarcar
0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2001-10-15 21:46 UTC (permalink / raw)
To: Linux MM mailing list
More questions that have come up from this persistent memory work:
a) I would *really* appreciate it if someone would send me userspace
memory maps for different architectures. I know what the i386 and x86-64
memory maps look like, but I have no clue on the rest.
b) Is there an architecture-independent way to determine if a page fault
was due to a read or write operation? On i386 I can look at the %cr2
value in the sigcontext, but I'd prefer to do something less arch-specific...
By the way, just so people don't think I'm talking about some
pie-in-the-sky vaporware project, the current code is available at:
ftp://ftp.zytor.com/pub/hpa/objstore-20011015.tar.gz
It basically has full functionality, although I want to do some more
optimizations (e.g. using mremap() for realloc()) and other cleanups (e.g.
renaming it something better than "objstore") before releasing it
officially. The official release version will *not* be binary compatible;
you have been warned...
-hpa
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More questions...
2001-10-15 21:46 More questions H. Peter Anvin
@ 2001-10-15 21:56 ` Kanoj Sarcar
2001-10-15 22:02 ` H. Peter Anvin
0 siblings, 1 reply; 7+ messages in thread
From: Kanoj Sarcar @ 2001-10-15 21:56 UTC (permalink / raw)
To: H. Peter Anvin, Linux MM mailing list
>
> b) Is there an architecture-independent way to
> determine if a page fault
> was due to a read or write operation? On i386 I can
> look at the %cr2
> value in the sigcontext, but I'd prefer to do
> something less arch-specific...
>
The last parameter to handle_mm_fault() ...
Kanoj
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More questions...
2001-10-15 21:56 ` Kanoj Sarcar
@ 2001-10-15 22:02 ` H. Peter Anvin
2001-10-15 22:08 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2001-10-15 22:02 UTC (permalink / raw)
To: Kanoj Sarcar; +Cc: Linux MM mailing list
Kanoj Sarcar wrote:
>
>>b) Is there an architecture-independent way to
>>determine if a page fault
>>was due to a read or write operation? On i386 I can
>>look at the %cr2
>>value in the sigcontext, but I'd prefer to do
>>something less arch-specific...
>>
>
> The last parameter to handle_mm_fault() ...
>
How do I determine it *in userspace*?
-hpa
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More questions...
2001-10-15 22:02 ` H. Peter Anvin
@ 2001-10-15 22:08 ` Andi Kleen
2001-10-15 22:11 ` H. Peter Anvin
0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2001-10-15 22:08 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Kanoj Sarcar, Linux MM mailing list
On Mon, Oct 15, 2001 at 03:02:30PM -0700, H. Peter Anvin wrote:
> How do I determine it *in userspace*?
No portable way. The portable API (siginfo_t) doesn't supply it ATM.
In theory it could be put into si_errno, but no current kernel does that.
Most architectures will likely gives it to you in some form in the
arch specific signal frame however.
-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More questions...
2001-10-15 22:08 ` Andi Kleen
@ 2001-10-15 22:11 ` H. Peter Anvin
2001-10-15 22:15 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2001-10-15 22:11 UTC (permalink / raw)
To: Andi Kleen; +Cc: Kanoj Sarcar, Linux MM mailing list
Andi Kleen wrote:
> On Mon, Oct 15, 2001 at 03:02:30PM -0700, H. Peter Anvin wrote:
>
>>How do I determine it *in userspace*?
>>
>
> No portable way. The portable API (siginfo_t) doesn't supply it ATM.
> In theory it could be put into si_errno, but no current kernel does that.
> Most architectures will likely gives it to you in some form in the
> arch specific signal frame however.
>
IWBNI it could be added, assuming it can be done without breaking existing
applications (perhaps a flag could be snuck in somewhere.) I can write
the code so that if the information is present, it uses it; otherwise the
worst that can happen is having to do the two-step NONE -> READ ->
READ|WRITE transition, as it currently is.
-hpa
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More questions...
2001-10-15 22:11 ` H. Peter Anvin
@ 2001-10-15 22:15 ` Andi Kleen
2001-10-15 22:31 ` H. Peter Anvin
0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2001-10-15 22:15 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Andi Kleen, Kanoj Sarcar, Linux MM mailing list
On Mon, Oct 15, 2001 at 03:11:44PM -0700, H. Peter Anvin wrote:
>
> IWBNI it could be added, assuming it can be done without breaking existing
> applications (perhaps a flag could be snuck in somewhere.) I can write
> the code so that if the information is present, it uses it; otherwise the
> worst that can happen is having to do the two-step NONE -> READ ->
> READ|WRITE transition, as it currently is.
At least on linux si_errno on signals should be always 0. I doubt anything
depends on that. I don't know if that is true on other operating systems
however. Single Unix has nothing to say about it as far as I can see.
You don't need a flag. Just use it when it is != 0.
-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: More questions...
2001-10-15 22:15 ` Andi Kleen
@ 2001-10-15 22:31 ` H. Peter Anvin
0 siblings, 0 replies; 7+ messages in thread
From: H. Peter Anvin @ 2001-10-15 22:31 UTC (permalink / raw)
To: Andi Kleen; +Cc: Kanoj Sarcar, Linux MM mailing list
Andi Kleen wrote:
> On Mon, Oct 15, 2001 at 03:11:44PM -0700, H. Peter Anvin wrote:
>
>>IWBNI it could be added, assuming it can be done without breaking existing
>>applications (perhaps a flag could be snuck in somewhere.) I can write
>>the code so that if the information is present, it uses it; otherwise the
>>worst that can happen is having to do the two-step NONE -> READ ->
>>READ|WRITE transition, as it currently is.
>>
>
> At least on linux si_errno on signals should be always 0. I doubt anything
> depends on that. I don't know if that is true on other operating systems
> however. Single Unix has nothing to say about it as far as I can see.
>
> You don't need a flag. Just use it when it is != 0.
>
That's a flag as far as I'm concerned... I can do an #ifdef __linux__ and
test the value of this field.
-hpa
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-10-15 22:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-15 21:46 More questions H. Peter Anvin
2001-10-15 21:56 ` Kanoj Sarcar
2001-10-15 22:02 ` H. Peter Anvin
2001-10-15 22:08 ` Andi Kleen
2001-10-15 22:11 ` H. Peter Anvin
2001-10-15 22:15 ` Andi Kleen
2001-10-15 22:31 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox