mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
Merge branch 'mm-hotfixes-stable' into mm-nonmm-stable to pick up changes
required to merge "kho: use unsigned long for nr_pages".
This commit is contained in:
commit
2eec08ff09
23 changed files with 239 additions and 87 deletions
|
|
@ -64,13 +64,14 @@ void fprop_global_destroy(struct fprop_global *p)
|
|||
bool fprop_new_period(struct fprop_global *p, int periods)
|
||||
{
|
||||
s64 events = percpu_counter_sum(&p->events);
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Don't do anything if there are no events.
|
||||
*/
|
||||
if (events <= 1)
|
||||
return false;
|
||||
preempt_disable_nested();
|
||||
local_irq_save(flags);
|
||||
write_seqcount_begin(&p->sequence);
|
||||
if (periods < 64)
|
||||
events -= events >> periods;
|
||||
|
|
@ -78,7 +79,7 @@ bool fprop_new_period(struct fprop_global *p, int periods)
|
|||
percpu_counter_add(&p->events, -events);
|
||||
p->period += periods;
|
||||
write_seqcount_end(&p->sequence);
|
||||
preempt_enable_nested();
|
||||
local_irq_restore(flags);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -662,7 +662,9 @@ static struct page *dmirror_devmem_alloc_page(struct dmirror *dmirror,
|
|||
goto error;
|
||||
}
|
||||
|
||||
zone_device_folio_init(page_folio(dpage), order);
|
||||
zone_device_folio_init(page_folio(dpage),
|
||||
page_pgmap(folio_page(page_folio(dpage), 0)),
|
||||
order);
|
||||
dpage->zone_device_data = rpage;
|
||||
return dpage;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue