Skip to contentSkip to conversation

lock_kiovec question

DISCUSSION Manfred Spraul 3 participants 3 messages Sep 29, 2001 – Oct 3, 2001

lore
Share & tools
lore
#0 lore raw

lock_kiovec tries to lock each page in the kiovec, and fails if it can't lock one of the pages.

What if the zero page is mapped multiple times in the kiobuf?

AFAICS map_user_pages doesn't break zero page mappings if it's called with rw==WRITE (i.e write to disk, read from kiobuf)

--
Manfred

#1 lore raw
Quoted 2 lines · Manfred Spraul

lock_kiovec tries to lock each page in the kiovec, and fails if it can't lock one of the pages.

lock_kiovec is dead code and should be deleted.

-ben

#2 lore raw
In reply to Manfred Spraul

Hi,

Quoted 4 lines · Manfred Spraul

lock_kiovec tries to lock each page in the kiovec, and fails if it can't lock one of the pages.

What if the zero page is mapped multiple times in the kiobuf?

Don't Do That then. lock_kiobuf can be called if some caller really wants the kiobuf pages locked, but kiobuf page mapping is much cleaner in 2.4 than it had to be in 2.2 and there's no need to keep pages locked during the mapping. raw IO doesn't ever use lock_kiobuf in 2.4.

Quoted 2 lines

AFAICS map_user_pages doesn't break zero page mappings if it's called with rw==WRITE (i.e write to disk, read from kiobuf)

Correct. The raw IO code for 2.2 had to exempt zero pages from locking for this reason.

Cheers,
Stephen