Re: controlling mmap()'d vs read/write() pages

2007-03-28 Thread Balbir Singh
Herbert Poetzl wrote: To me, one of the keys of Linux's "global optimizations" is being able to use any memory globally for its most effective purpose, globally (please ignore highmem :). Let's say I have a 1GB container on a machine that is at least 100% committed. I mmap() a 1GB file and

Re: controlling mmap()'d vs read/write() pages

2007-03-28 Thread Nick Piggin
Eric W. Biederman wrote: Nick Piggin <[EMAIL PROTECTED]> writes: It can be done trivially without performing any IO or swap, yes. Please give me a rough sketch of how to do so. Reading sparse files is just one I had in mind. But I'm not very creative compared to university students doing

Re: controlling mmap()'d vs read/write() pages

2007-03-28 Thread Nick Piggin
Eric W. Biederman wrote: Nick Piggin [EMAIL PROTECTED] writes: It can be done trivially without performing any IO or swap, yes. Please give me a rough sketch of how to do so. Reading sparse files is just one I had in mind. But I'm not very creative compared to university students doing

Re: controlling mmap()'d vs read/write() pages

2007-03-28 Thread Balbir Singh
Herbert Poetzl wrote: To me, one of the keys of Linux's global optimizations is being able to use any memory globally for its most effective purpose, globally (please ignore highmem :). Let's say I have a 1GB container on a machine that is at least 100% committed. I mmap() a 1GB file and touch

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Herbert Poetzl
On Fri, Mar 23, 2007 at 09:41:12AM -0700, Dave Hansen wrote: > On Fri, 2007-03-23 at 04:12 -0600, Eric W. Biederman wrote: > > Would any of them work on a system on which every filesystem was on > > ramfs, and there was no swap? If not then they are not memory attacks > > but I/O attacks. > > I

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Dave Hansen
On Fri, 2007-03-23 at 04:12 -0600, Eric W. Biederman wrote: > Would any of them work on a system on which every filesystem was on > ramfs, and there was no swap? If not then they are not memory attacks > but I/O attacks. I truly understand your point here. But, I don't think this thought

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Eric W. Biederman
Nick Piggin <[EMAIL PROTECTED]> writes: >> Would any of them work on a system on which every filesystem was on >> ramfs, and there was no swap? If not then they are not memory attacks >> but I/O attacks. >> >> I completely concede that you can DOS the system with I/O if that is >> not limited as

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Nick Piggin
Eric W. Biederman wrote: Nick Piggin <[EMAIL PROTECTED]> writes: Eric W. Biederman wrote: Dave Hansen <[EMAIL PROTECTED]> writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :)

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Eric W. Biederman
Nick Piggin <[EMAIL PROTECTED]> writes: > Eric W. Biederman wrote: >> Dave Hansen <[EMAIL PROTECTED]> writes: >> >> >>>So, I think we have a difference of opinion. I think it's _all_ about >>>memory pressure, and you think it is _not_ about accounting for memory >>>pressure. :) Perhaps we mean

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Eric W. Biederman
Nick Piggin [EMAIL PROTECTED] writes: Eric W. Biederman wrote: Dave Hansen [EMAIL PROTECTED] writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :) Perhaps we mean different things,

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Nick Piggin
Eric W. Biederman wrote: Nick Piggin [EMAIL PROTECTED] writes: Eric W. Biederman wrote: Dave Hansen [EMAIL PROTECTED] writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :)

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Eric W. Biederman
Nick Piggin [EMAIL PROTECTED] writes: Would any of them work on a system on which every filesystem was on ramfs, and there was no swap? If not then they are not memory attacks but I/O attacks. I completely concede that you can DOS the system with I/O if that is not limited as well. My

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Dave Hansen
On Fri, 2007-03-23 at 04:12 -0600, Eric W. Biederman wrote: Would any of them work on a system on which every filesystem was on ramfs, and there was no swap? If not then they are not memory attacks but I/O attacks. I truly understand your point here. But, I don't think this thought exercise

Re: controlling mmap()'d vs read/write() pages

2007-03-23 Thread Herbert Poetzl
On Fri, Mar 23, 2007 at 09:41:12AM -0700, Dave Hansen wrote: On Fri, 2007-03-23 at 04:12 -0600, Eric W. Biederman wrote: Would any of them work on a system on which every filesystem was on ramfs, and there was no swap? If not then they are not memory attacks but I/O attacks. I truly

Re: controlling mmap()'d vs read/write() pages

2007-03-22 Thread Nick Piggin
Eric W. Biederman wrote: Dave Hansen <[EMAIL PROTECTED]> writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :) Perhaps we mean different things, but we appear to disagree greatly on

Re: controlling mmap()'d vs read/write() pages

2007-03-22 Thread Herbert Poetzl
On Tue, Mar 20, 2007 at 03:19:16PM -0600, Eric W. Biederman wrote: > Dave Hansen <[EMAIL PROTECTED]> writes: > > > > > So, I think we have a difference of opinion. I think it's _all_ > > about memory pressure, and you think it is _not_ about accounting > > for memory pressure. :) Perhaps we mean

Re: controlling mmap()'d vs read/write() pages

2007-03-22 Thread Herbert Poetzl
On Tue, Mar 20, 2007 at 03:19:16PM -0600, Eric W. Biederman wrote: Dave Hansen [EMAIL PROTECTED] writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :) Perhaps we mean different

Re: controlling mmap()'d vs read/write() pages

2007-03-22 Thread Nick Piggin
Eric W. Biederman wrote: Dave Hansen [EMAIL PROTECTED] writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :) Perhaps we mean different things, but we appear to disagree greatly on the

Re: controlling mmap()'d vs read/write() pages

2007-03-20 Thread Eric W. Biederman
Dave Hansen <[EMAIL PROTECTED]> writes: > > So, I think we have a difference of opinion. I think it's _all_ about > memory pressure, and you think it is _not_ about accounting for memory > pressure. :) Perhaps we mean different things, but we appear to > disagree greatly on the surface. I

controlling mmap()'d vs read/write() pages

2007-03-20 Thread Dave Hansen
On Sun, 2007-03-18 at 11:42 -0600, Eric W. Biederman wrote: > Dave Hansen <[EMAIL PROTECTED]> writes: > > To me, a process sitting there doing constant reads of 10 pages has the > > same overhead to the VM as a process sitting there with a 10 page file > > mmaped, and reading that. > > I can see

controlling mmap()'d vs read/write() pages

2007-03-20 Thread Dave Hansen
On Sun, 2007-03-18 at 11:42 -0600, Eric W. Biederman wrote: Dave Hansen [EMAIL PROTECTED] writes: To me, a process sitting there doing constant reads of 10 pages has the same overhead to the VM as a process sitting there with a 10 page file mmaped, and reading that. I can see temporarily

Re: controlling mmap()'d vs read/write() pages

2007-03-20 Thread Eric W. Biederman
Dave Hansen [EMAIL PROTECTED] writes: So, I think we have a difference of opinion. I think it's _all_ about memory pressure, and you think it is _not_ about accounting for memory pressure. :) Perhaps we mean different things, but we appear to disagree greatly on the surface. I think it is