Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-15 Thread KOSAKI Motohiro
Hi Pavel err = poll(pollfds, 1, -1); // wake up at low memory ... /usage example Nice, this is really needed for openmoko, zaurus, etc But this changelog needs to go into Documentation/... ...and /dev/mem_notify is really a bad name. /dev/memory_low? /dev/oom?

Re: [RFC] mmaped copy too slow?

2008-01-15 Thread KOSAKI Motohiro
Hi Paulo One thing you could also try is to pass MAP_POPULATE to mmap so that the page tables are filled in at the time of the mmap, avoiding a lot of page faults later. Just my 2 cents, OK, I will test your idea and report about tomorrow. but I don't think page fault is major

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-15 Thread KOSAKI Motohiro
Hi Alan It also appears there is no way to wait for memory shortages (processes that can free memory easily) only for memory to start appearing. poll() with never timeout don't fill your requirement? to be honest, maybe I don't understand your afraid yet. sorry. My

rvr split LRU minor regression ?

2008-01-15 Thread KOSAKI Motohiro
Hi Rik I tested new hackbench on rvr split LRU patch. new hackbench URL is http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c method of test (1) $ ./hackbench 150 process 1000 (2) # sync; echo 3 /proc/sys/vm/drop_caches $ dd if=tmp10G of=/dev/null $ ./hackbench 150

Re: [PATCH] rlim in proc/pid/status (2nd rev.)

2008-01-15 Thread KOSAKI Motohiro
Hi Clifford, +static inline char *task_rlim(struct task_struct *p, char *buffer) +{ + unsigned long flags; + struct rlimit rlim[RLIM_NLIMITS]; + int i; + + rcu_read_lock(); + if (lock_task_sighand(p, flags)) { + for (i=0; iRLIM_NLIMITS; i++) +

Re: [RFC] mmaped copy too slow?

2008-01-14 Thread KOSAKI Motohiro
Hi Rik > While being able to deal with used-once mappings in page reclaim > could be a good idea, this would require us to be able to determine > the difference between a page that was accessed once since it was > faulted in and a page that got accessed several times. it makes sense that read

Re: [RFC][PATCH 4/5] memory_pressure_notify() caller

2008-01-14 Thread KOSAKI Motohiro
Hi Kame, > > > > + notify_threshold = (zone->pages_high + > > > > + zone->lowmem_reserve[MAX_NR_ZONES-1]) * 2; > > > > + > > > Why MAX_NR_ZONES-1 ? > > > > this is intent to max lowmem_reserve. > > > Ah, my point is.. how about this ? > == > if (page_zoneid(page)

Re: [RFC][PATCH 4/5] memory_pressure_notify() caller

2008-01-14 Thread KOSAKI Motohiro
Hi KAME, > > + notify_threshold = (zone->pages_high + > > + zone->lowmem_reserve[MAX_NR_ZONES-1]) * 2; > > + > Why MAX_NR_ZONES-1 ? this is intent to max lowmem_reserve. in normal case, shrink_active_list isn't called when free_pages > pages_high. but just after memory

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
Hi Kame > > + if (pressure) { > > + nr_wakeup = max_t(int, atomic_read(_watcher_task)>>4, 100); > > + atomic_long_set(_mem_notify, jiffies); > > + wake_up_locked_nr(_wait, nr_wakeup); > > + } > What is this for ? and Why ? > Are there too many waiters ? my

[RFC] mmaped copy too slow?

2008-01-14 Thread KOSAKI Motohiro
don't mind, please discuss. Signed-off-by: KOSAKI Motohiro <[EMAIL PROTECTED]> --- mm/vmscan.c | 46 +++--- 1 file changed, 43 insertions(+), 3 deletions(-) Index: linux-2.6.24-rc6-cp3

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
Hi > > 1/ I don't see the file below listed in the diffstat above... > > Agghh... > sorry, it is mistake. > I repost soon. > > thanks. the below diffstat is correct. thanks! -- Documentation/devices.txt |1 drivers/char/mem.c |6 ++

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
Hi randy > Hi, > > 1/ I don't see the file below listed in the diffstat above... Agghh... sorry, it is mistake. I repost soon. thanks. > 2/ Where is the userspace interface information for the syscall? No. userspace interface is only poll(2). -- To unsubscribe from this list: send the

[RFC][PATCH 5/5] /proc/zoneinfo enhancement

2008-01-14 Thread KOSAKI Motohiro
show new member of zone struct by /proc/zoneinfo. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: KOSAKI Motohiro <[EMAIL PROTECTED]> --- mm/vmstat.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6.24-rc6-mm1-memnotify

[RFC][PATCH 4/5] memory_pressure_notify() caller

2008-01-14 Thread KOSAKI Motohiro
pressure decrease and stop moves an anonymous page to the inactive list. o free pages increase than (pages_high+lowmem_reserve)*2. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: KOSAKI Motohiro <[EMAIL PROTECTED]> --- mm/vmscan.c | 15 +++ 1 file

[RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
s.revents = 0; err = poll(, 1, -1); // wake up at low memory ... Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: KOSAKI Motohiro <[EMAIL PROTECTED]> --- drivers/char/mem.c |6 ++ include/linux/mem_notify.h | 41 include/

[RFC][PATCH 2/5] introduce wake_up_locked_nr() new API

2008-01-14 Thread KOSAKI Motohiro
introduce new API wake_up_locked_nr() and wake_up_locked_all(). it it similar as wake_up_nr() and wake_up_all(), but it doesn't lock. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: KOSAKI Motohiro <[EMAIL PROTECTED]> --- include/linux/wait.h |7 +-- ke

[RFC][PATCH 1/5] introduce poll_wait_exclusive() new API

2008-01-14 Thread KOSAKI Motohiro
, _wait_queue, wait); if (data_exist) return POLLIN | POLLRDNORM; return 0; } Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: KOSAKI Motohiro <[EMAIL PROTECTED]> --- fs/eventpoll.c |7 +-- fs/select.c |9 ++--- i

[RFC][PATCH 0/5] mem notifications v4

2008-01-14 Thread KOSAKI Motohiro
=119852828327044=2 Thrashing notification patch [Daniel Spang] http://marc.info/?l=linux-mm=119427416315676=2 Changelog - v3 -> v4 (by KOSAKI Motohiro) o rebase to 2.6.24-rc6-mm1 o avoid wake up all. o add judgement po

Re: [patch 10/19] No Reclaim LRU Infrastructure

2008-01-14 Thread KOSAKI Motohiro
Hi Lee-san > > > +config NORECLAIM > > > + bool "Track non-reclaimable pages (EXPERIMENTAL; 64BIT only)" > > > + depends on EXPERIMENTAL && 64BIT > > > + help > > > + Supports tracking of non-reclaimable pages off the [in]active lists > > > + to avoid excessive reclaim overhead on large

Re: [patch 05/19] split LRU lists into anon & file sets

2008-01-14 Thread KOSAKI Motohiro
Hi > > Why drop (total_swap_pages == 0 && PageAnon(page)) condition? > > in embedded sysmtem, > > CONFIG_NORECLAIM is OFF (because almost embedded cpu is 32bit) and > > that anon move to inactive list is meaningless because it doesn't have swap. > > That was a mistake, kind of. Since all swap

Re: [patch 10/19] No Reclaim LRU Infrastructure

2008-01-14 Thread KOSAKI Motohiro
Hi Lee-san +config NORECLAIM + bool Track non-reclaimable pages (EXPERIMENTAL; 64BIT only) + depends on EXPERIMENTAL 64BIT + help + Supports tracking of non-reclaimable pages off the [in]active lists + to avoid excessive reclaim overhead on large memory systems. Pages +

Re: [patch 05/19] split LRU lists into anon file sets

2008-01-14 Thread KOSAKI Motohiro
Hi Why drop (total_swap_pages == 0 PageAnon(page)) condition? in embedded sysmtem, CONFIG_NORECLAIM is OFF (because almost embedded cpu is 32bit) and that anon move to inactive list is meaningless because it doesn't have swap. That was a mistake, kind of. Since all swap backed pages

[RFC][PATCH 0/5] mem notifications v4

2008-01-14 Thread KOSAKI Motohiro
=119852828327044w=2 Thrashing notification patch [Daniel Spang] http://marc.info/?l=linux-mmm=119427416315676w=2 Changelog - v3 - v4 (by KOSAKI Motohiro) o rebase to 2.6.24-rc6-mm1 o avoid wake up all. o add judgement point

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
Hi randy Hi, 1/ I don't see the file below listed in the diffstat above... Agghh... sorry, it is mistake. I repost soon. thanks. 2/ Where is the userspace interface information for the syscall? No. userspace interface is only poll(2). -- To unsubscribe from this list: send the line

[RFC][PATCH 5/5] /proc/zoneinfo enhancement

2008-01-14 Thread KOSAKI Motohiro
show new member of zone struct by /proc/zoneinfo. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: KOSAKI Motohiro [EMAIL PROTECTED] --- mm/vmstat.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6.24-rc6-mm1-memnotify/mm/vmstat.c

[RFC][PATCH 4/5] memory_pressure_notify() caller

2008-01-14 Thread KOSAKI Motohiro
pressure decrease and stop moves an anonymous page to the inactive list. o free pages increase than (pages_high+lowmem_reserve)*2. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: KOSAKI Motohiro [EMAIL PROTECTED] --- mm/vmscan.c | 15 +++ 1 file changed, 15 insertions

[RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
; pollfds.revents = 0; err = poll(pollfds, 1, -1); // wake up at low memory ... /usage example Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: KOSAKI Motohiro [EMAIL PROTECTED] --- drivers/char/mem.c |6 ++ include/linux/mem_notify.h | 41 include

[RFC][PATCH 2/5] introduce wake_up_locked_nr() new API

2008-01-14 Thread KOSAKI Motohiro
introduce new API wake_up_locked_nr() and wake_up_locked_all(). it it similar as wake_up_nr() and wake_up_all(), but it doesn't lock. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: KOSAKI Motohiro [EMAIL PROTECTED] --- include/linux/wait.h |7 +-- kernel/sched.c

[RFC][PATCH 1/5] introduce poll_wait_exclusive() new API

2008-01-14 Thread KOSAKI Motohiro
) { poll_wait_exclusive(file, kosaki_wait_queue, wait); if (data_exist) return POLLIN | POLLRDNORM; return 0; } Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: KOSAKI Motohiro [EMAIL PROTECTED] --- fs/eventpoll.c |7 +-- fs/select.c |9

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
Hi 1/ I don't see the file below listed in the diffstat above... Agghh... sorry, it is mistake. I repost soon. thanks. the below diffstat is correct. thanks! -- Documentation/devices.txt |1 drivers/char/mem.c |6 ++

[RFC] mmaped copy too slow?

2008-01-14 Thread KOSAKI Motohiro
mind, please discuss. Signed-off-by: KOSAKI Motohiro [EMAIL PROTECTED] --- mm/vmscan.c | 46 +++--- 1 file changed, 43 insertions(+), 3 deletions(-) Index: linux-2.6.24-rc6-cp3/mm/vmscan.c

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

2008-01-14 Thread KOSAKI Motohiro
Hi Kame + if (pressure) { + nr_wakeup = max_t(int, atomic_read(nr_watcher_task)4, 100); + atomic_long_set(last_mem_notify, jiffies); + wake_up_locked_nr(mem_wait, nr_wakeup); + } What is this for ? and Why ? Are there too many waiters ? my intent is

Re: [RFC][PATCH 4/5] memory_pressure_notify() caller

2008-01-14 Thread KOSAKI Motohiro
Hi Kame, + notify_threshold = (zone-pages_high + + zone-lowmem_reserve[MAX_NR_ZONES-1]) * 2; + Why MAX_NR_ZONES-1 ? this is intent to max lowmem_reserve. Ah, my point is.. how about this ? == if (page_zoneid(page) != ZONE_DMA)

Re: [RFC] mmaped copy too slow?

2008-01-14 Thread KOSAKI Motohiro
Hi Rik While being able to deal with used-once mappings in page reclaim could be a good idea, this would require us to be able to determine the difference between a page that was accessed once since it was faulted in and a page that got accessed several times. it makes sense that read ahead

Re: [patch 05/19] split LRU lists into anon & file sets

2008-01-10 Thread KOSAKI Motohiro
Hi Rik > @@ -1128,64 +1026,65 @@ static void shrink_active_list(unsigned (snip) > + /* > + * For sorting active vs inactive pages, we'll use the 'anon' > + * elements of the local list[] array and sort out the file vs > + * anon pages below. > + */ > while

Re: [patch 05/19] split LRU lists into anon & file sets

2008-01-10 Thread KOSAKI Motohiro
Hi Rik > +static inline int is_file_lru(enum lru_list l) > +{ > + BUILD_BUG_ON(LRU_INACTIVE_FILE != 2 || LRU_ACTIVE_FILE != 3); > + return (l/2 == 1); > +} below patch is a bit cleanup proposal. i think LRU_FILE is more clarify than "/2". What do you think it? Index:

Re: [patch 10/19] No Reclaim LRU Infrastructure

2008-01-10 Thread KOSAKI Motohiro
Hi Rik > +config NORECLAIM > + bool "Track non-reclaimable pages (EXPERIMENTAL; 64BIT only)" > + depends on EXPERIMENTAL && 64BIT > + help > + Supports tracking of non-reclaimable pages off the [in]active lists > + to avoid excessive reclaim overhead on large memory

Re: [patch 05/19] split LRU lists into anon & file sets

2008-01-10 Thread KOSAKI Motohiro
Hi Rik > -static inline long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, > - struct zone *zone, int priority) > +static inline long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, > + struct zone *zone, int

Re: [patch 05/19] split LRU lists into anon file sets

2008-01-10 Thread KOSAKI Motohiro
Hi Rik -static inline long mem_cgroup_calc_reclaim_inactive(struct mem_cgroup *mem, - struct zone *zone, int priority) +static inline long mem_cgroup_calc_reclaim(struct mem_cgroup *mem, + struct zone *zone, int priority,

Re: [patch 10/19] No Reclaim LRU Infrastructure

2008-01-10 Thread KOSAKI Motohiro
Hi Rik +config NORECLAIM + bool Track non-reclaimable pages (EXPERIMENTAL; 64BIT only) + depends on EXPERIMENTAL 64BIT + help + Supports tracking of non-reclaimable pages off the [in]active lists + to avoid excessive reclaim overhead on large memory systems. Pages

Re: [patch 05/19] split LRU lists into anon file sets

2008-01-10 Thread KOSAKI Motohiro
Hi Rik +static inline int is_file_lru(enum lru_list l) +{ + BUILD_BUG_ON(LRU_INACTIVE_FILE != 2 || LRU_ACTIVE_FILE != 3); + return (l/2 == 1); +} below patch is a bit cleanup proposal. i think LRU_FILE is more clarify than /2. What do you think it? Index:

Re: [patch 10/20] SEQ replacement for anonymous pages

2007-12-19 Thread KOSAKI Motohiro
Hi Rik-san > > > To keep the maximum amount of necessary work reasonable, we scale the > > > active to inactive ratio with the size of memory, using the formula > > > active:inactive ratio = sqrt(memory in GB * 10). > > > why do you think best formula is sqrt(GB*10)? > > please tell me if you

Re: [patch 10/20] SEQ replacement for anonymous pages

2007-12-19 Thread KOSAKI Motohiro
Hi Rik-san To keep the maximum amount of necessary work reasonable, we scale the active to inactive ratio with the size of memory, using the formula active:inactive ratio = sqrt(memory in GB * 10). why do you think best formula is sqrt(GB*10)? please tell me if you don't mind.

Re: [patch 10/20] SEQ replacement for anonymous pages

2007-12-18 Thread KOSAKI Motohiro
Hi Rik-san, > To keep the maximum amount of necessary work reasonable, we scale the > active to inactive ratio with the size of memory, using the formula > active:inactive ratio = sqrt(memory in GB * 10). Great. why do you think best formula is sqrt(GB*10)? please tell me if you don't mind.

Re: [patch 02/20] make the inode i_mmap_lock a reader/writer lock

2007-12-18 Thread KOSAKI Motohiro
Hi > > rmap: try_to_unmap_file() required new cond_resched_rwlock(). > > To reduce code duplication, I recast cond_resched_lock() as a > > [static inline] wrapper around reworked cond_sched_lock() => > > __cond_resched_lock(void *lock, int type). > > New cond_resched_rwlock() implemented as

Re: [patch 02/20] make the inode i_mmap_lock a reader/writer lock

2007-12-18 Thread KOSAKI Motohiro
Hi rmap: try_to_unmap_file() required new cond_resched_rwlock(). To reduce code duplication, I recast cond_resched_lock() as a [static inline] wrapper around reworked cond_sched_lock() = __cond_resched_lock(void *lock, int type). New cond_resched_rwlock() implemented as another

Re: [patch 10/20] SEQ replacement for anonymous pages

2007-12-18 Thread KOSAKI Motohiro
Hi Rik-san, To keep the maximum amount of necessary work reasonable, we scale the active to inactive ratio with the size of memory, using the formula active:inactive ratio = sqrt(memory in GB * 10). Great. why do you think best formula is sqrt(GB*10)? please tell me if you don't mind. and i

Re: Kernel Development & Objective-C

2007-11-30 Thread KOSAKI Motohiro
> > Has Objective-C ever been considered for kernel development? > > Why not C# instead ? Why not Haskell nor Erlang instead ? :-D - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: Kernel Development Objective-C

2007-11-30 Thread KOSAKI Motohiro
Has Objective-C ever been considered for kernel development? Why not C# instead ? Why not Haskell nor Erlang instead ? :-D - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

<    5   6   7   8   9   10