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?
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
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
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
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++)
+
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
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)
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
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
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
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 ++
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
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
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
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/
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
, _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
=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
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
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
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
+
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
=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
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
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
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
;
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
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
)
{
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
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 ++
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
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
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)
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
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
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:
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
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
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,
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
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:
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
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.
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.
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
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
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
> > 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
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
901 - 949 of 949 matches
Mail list logo