Skip to contentSkip to conversation

deferred and batched addition of faulted-in pages to the LRU

PATCH Andi Kleen 2 participants 3 messages Aug 11, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw

Review

Quoted 7 lines · Andrew Morton

*/

(quoted diff) +5 -1
-void lru_cache_add(struct page * page)
+static struct pagevec lru_add_pvecs[NR_CPUS];
+
+void lru_cache_add(struct page *page)
+{
+	struct pagevec *pvec = &lru_add_pvecs[get_cpu()];

This should probably use the linux/percpu.h macros.
This way it could be more efficient on some architectures and also avoid potential false sharing.

-Andi

#2 lore raw
Quoted 13 lines · Andi Kleen

Review

Quoted 7 lines · Andrew Morton

*/

(quoted diff) +5 -1
-void lru_cache_add(struct page * page)
+static struct pagevec lru_add_pvecs[NR_CPUS];
+
+void lru_cache_add(struct page *page)
+{
+     struct pagevec *pvec = &lru_add_pvecs[get_cpu()];

This should probably use the linux/percpu.h macros.
This way it could be more efficient on some architectures and also avoid potential false sharing.

Yes, I need to do a sweep sometime and convert some things like that. Preferably after the hot-remove APIs are there. Or is that not planned?

author
#3 lore raw
Quoted 15 lines · Andrew Morton
Quoted 13 lines · Andi Kleen

Review

Quoted 7 lines · Andrew Morton

*/

(quoted diff) +5 -1
-void lru_cache_add(struct page * page)
+static struct pagevec lru_add_pvecs[NR_CPUS];
+
+void lru_cache_add(struct page *page)
+{
+     struct pagevec *pvec = &lru_add_pvecs[get_cpu()];

This should probably use the linux/percpu.h macros.
This way it could be more efficient on some architectures and also avoid potential false sharing.

Quoted 3 lines

Yes, I need to do a sweep sometime and convert some things like that. Preferably after the hot-remove APIs are there. Or is that not planned?

I would see them as independent problems. No need to stall one by the other.

-Andi