Re: set_page_dirty vs set_page_dirty_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting  Nick Piggin <[email protected]>:
> > 
> >>or try to do something tricky with page_count to determine
> >>if we need to do a copy in fork() rather than a COW.
> > 
> > 
> > I'm actually reasonably happy with the trick that I'm using:
> > performing a second get_user_pages after DMA and comparing
> > the page lists.
> > However, doing this every time on the off chance that a
> > page was made COW forces me into task context, every time.
> > 
> 
> I think it might be possible to solve it with the early-copy in
> fork(). I'll tinker with it.

A possible way to do this would be adding an option to get_user_pages,
and if selected, setting a flag on all pages in range.
This flag should be cleared in put_page when the reference count drops to 1.

The only thing left would be to do the actual copy if the flag is set.

HTH,

-- 
MST
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux