linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* handle_mm_fault() calling convention cleanup..
@ 2009-06-21 20:42 Linus Torvalds
  2009-06-22  2:20 ` David Miller
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Linus Torvalds @ 2009-06-21 20:42 UTC (permalink / raw)
  To: linux-arch
  Cc: Hugh Dickins, Nick Piggin, Andrew Morton, linux-mm, Wu Fengguang,
	Ingo Molnar


Just a heads up that I committed the patches that I sent out two months 
ago to make the fault handling routines use the finer-grained fault flags 
(FAULT_FLAG_xyzzy) rather than passing in a boolean for "write".

That was originally for the NOPAGE_RETRY patches, but it's a general 
cleanup too. I have this suspicion that we should extend this to 
"get_user_pages()" too, instead of having those boolean "write" and 
"force" flags (and GUP_FLAGS_xyzzy as opposed to FAULT_FLAGS_yyzzy).

We should probably also get rid of the insane FOLL_xyz flags too. Right 
now the code in fact depends on FOLL_WRITE being the same as 
FAULT_FLAGS_WRITE, and while that is a simple dependency, it's just crazy 
how we have all these different flags for what ends up often boiling down 
to the same fundamental issue in the end (even if not all versions of the 
flags are necessarily always valid for all uses).

I fixed up all architectures that I noticed (at least microblaze had been 
added since the original patches in April), but arch maintainers should 
double-check. Arch maintainers might also want to check whether the 
mindless conversion of

	'is_write' => 'is_write ? FAULT_FLAGS_WRITE : 0'

might perhaps be written in some more natural way (for example, maybe 
you'd like to get rid of 'iswrite' as a variable entirely, and replace it 
with a 'fault_flags' variable).

It's pushed out and tested on x86-64, but it really was such a mindless 
conversion that I hope it works on all architectures. But I thought I'd 
better give people a shout-out regardless.

		Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-07-06 11:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-21 20:42 handle_mm_fault() calling convention cleanup Linus Torvalds
2009-06-22  2:20 ` David Miller
2009-06-22  8:10 ` Ingo Molnar
2009-06-22  9:26 ` Martin Schwidefsky
2009-06-22 14:22 ` David Howells
2009-06-22 14:58 ` James Bottomley
2009-06-22 15:49 ` Russell King
2009-06-23  7:18 ` Nick Piggin
2009-06-23 12:49 ` [PATCH] hugetlb: fault flags instead of write_access Hugh Dickins
2009-06-23 12:56   ` Wu Fengguang
2009-06-23 21:36   ` Rik van Riel
2009-06-29 12:29   ` Mel Gorman
2009-06-23 12:52 ` [PATCH] mm: don't rely on flags coincidence Hugh Dickins
2009-06-23 13:00   ` Wu Fengguang
2009-06-23 21:38   ` Rik van Riel
2009-07-03 23:35 ` handle_mm_fault() calling convention cleanup Benjamin Herrenschmidt
2009-07-04 16:44   ` Linus Torvalds
2009-07-04 21:08     ` Benjamin Herrenschmidt
2009-07-06  7:31       ` Nick Piggin
2009-07-06 10:56         ` Benjamin Herrenschmidt
2009-07-06 11:53           ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).