Hi Stephen,

> I just happened to follow the function and noticed that on s390,
> page_test_and_clear_dirty() has the comment:
>
> * Test and clear dirty bit in storage key.
> * We can't clear the changed bit atomically. This is a potential
> * race against modification of the referenced bit. This function
> * should therefore only be called if it is not mapped in any
> * address space.
>
> but in this case the page is clearly mapped in the caller's address
> space, else we wouldn't have reached this.
>
> Is this a problem?

The clearing of the dirty bit while the page is still mapped somewhere
races against the setting of the referenced bit. The worst that can
happen is that the setting of a referenced bit gets lost. This can lead
to a bad swapping decision because a page is considered to be old but
in reality someone accessed it recently. This is not nice but it doesn't
happen often. This isn't a problem as long as no dirty bit gets lost.

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Sch�naicherstr. 220, D-71032 B�blingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: [EMAIL PROTECTED]

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to