Re: Forbid deletion of memory mappings

2007-09-04 Thread linux-os \(Dick Johnson\)
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > On Thursday 30 August 2007 23:50:21 [EMAIL PROTECTED] wrote: >> On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: >>> On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > is there no way

Re: Forbid deletion of memory mappings

2007-09-04 Thread Clemens Kolbitsch
> If you are doing research, consider these methods: > 1. Change vma_merge() so it always fail to merge mappings > > or > > 2. Set up your "mappings duplicated in userspace" so > they too merge in the same way. > > Helge Hafting Hi! Thanks for your answer, however you (too) misunderstood:

Re: Forbid deletion of memory mappings

2007-09-04 Thread Helge Hafting
Clemens Kolbitsch wrote: On Thursday 30 August 2007 23:50:21 [EMAIL PROTECTED] wrote: On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the

Re: Forbid deletion of memory mappings

2007-09-04 Thread Helge Hafting
Clemens Kolbitsch wrote: On Thursday 30 August 2007 23:50:21 [EMAIL PROTECTED] wrote: On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the

Re: Forbid deletion of memory mappings

2007-09-04 Thread Clemens Kolbitsch
If you are doing research, consider these methods: 1. Change vma_merge() so it always fail to merge mappings or 2. Set up your mappings duplicated in userspace so they too merge in the same way. Helge Hafting Hi! Thanks for your answer, however you (too) misunderstood: Merging of the

Re: Forbid deletion of memory mappings

2007-09-04 Thread linux-os \(Dick Johnson\)
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: On Thursday 30 August 2007 23:50:21 [EMAIL PROTECTED] wrote: On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 23:50:21 [EMAIL PROTECTED] wrote: > On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: > > On Thursday 30 August 2007 23:34:52 you wrote: > > > On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > > > > is there no way to tell the kernel, that a certain mapping must

Re: Forbid deletion of memory mappings

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > the thing is that they are not. the kernel chooses to REPLACE my > mapping. > consider the user-space code: > mmap(0x, 0x3000, MAP_FIXED, ...); > mmap(0x1000, 0x4000, MAP_FIXED, ...); > here, the second call to mmap will shorten the

Re: Forbid deletion of memory mappings

2007-08-30 Thread Valdis . Kletnieks
On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: > On Thursday 30 August 2007 23:34:52 you wrote: > > On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > > > is there no way to tell the kernel, that a certain mapping must not be > > > removed, no matter what (except of course an explicit

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 23:34:52 you wrote: > On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > > is there no way to tell the kernel, that a certain mapping must not be > > removed, no matter what (except of course an explicit call to sys_unmap, > > of course)? > > I don't seem to get what is the

Re: Forbid deletion of memory mappings

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > is there no way to tell the kernel, that a certain mapping must not be > removed, no matter what (except of course an explicit call to sys_unmap, > of course)? I don't seem to get what is the issue here. Your mapping is not removed, only the

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 19:07:05 you wrote: > On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > > It all works perfectly well (creating & deleting the additional > > mappings), however, when the kernel feels like it needs to allocate a > > mapping in user-space it sometimes deletes my mapping and

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 19:07:05 Jiri Kosina wrote: > On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > > It all works perfectly well (creating & deleting the additional > > mappings), however, when the kernel feels like it needs to allocate a > > mapping in user-space it sometimes deletes my

Re: Forbid deletion of memory mappings

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > It all works perfectly well (creating & deleting the additional > mappings), however, when the kernel feels like it needs to allocate a > mapping in user-space it sometimes deletes my mapping and overwrites it > with the new one, although there

Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
Hi everyone! I have a strange problem where I don't even know if there is a solution to it at the moment: I'm working on a new way of doing memory-management and currently I allocate memory mappings (at non-fixed locations) in user-memory (i.e. < TASK_SIZE) in addition to the regular pages

Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
Hi everyone! I have a strange problem where I don't even know if there is a solution to it at the moment: I'm working on a new way of doing memory-management and currently I allocate memory mappings (at non-fixed locations) in user-memory (i.e. TASK_SIZE) in addition to the regular pages

Re: Forbid deletion of memory mappings

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: It all works perfectly well (creating deleting the additional mappings), however, when the kernel feels like it needs to allocate a mapping in user-space it sometimes deletes my mapping and overwrites it with the new one, although there is

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 19:07:05 Jiri Kosina wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: It all works perfectly well (creating deleting the additional mappings), however, when the kernel feels like it needs to allocate a mapping in user-space it sometimes deletes my mapping and

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 19:07:05 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: It all works perfectly well (creating deleting the additional mappings), however, when the kernel feels like it needs to allocate a mapping in user-space it sometimes deletes my mapping and

Re: Forbid deletion of memory mappings

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the kernel, that a certain mapping must not be removed, no matter what (except of course an explicit call to sys_unmap, of course)? I don't seem to get what is the issue here. Your mapping is not removed, only the VMAs

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the kernel, that a certain mapping must not be removed, no matter what (except of course an explicit call to sys_unmap, of course)? I don't seem to get what is the issue

Re: Forbid deletion of memory mappings

2007-08-30 Thread Valdis . Kletnieks
On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the kernel, that a certain mapping must not be removed, no matter what (except of course an explicit call to

Re: Forbid deletion of memory mappings

2007-08-30 Thread Jiri Kosina
On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: the thing is that they are not. the kernel chooses to REPLACE my mapping. consider the user-space code: mmap(0x, 0x3000, MAP_FIXED, ...); mmap(0x1000, 0x4000, MAP_FIXED, ...); here, the second call to mmap will shorten the first

Re: Forbid deletion of memory mappings

2007-08-30 Thread Clemens Kolbitsch
On Thursday 30 August 2007 23:50:21 [EMAIL PROTECTED] wrote: On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: On Thursday 30 August 2007 23:34:52 you wrote: On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: is there no way to tell the kernel, that a certain mapping must not be