From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 7 Jul 2002 11:31:39 -0700 (PDT) From: Linus Torvalds Subject: Re: scalable kmap (was Re: vm lock contention reduction) In-Reply-To: <3D28042E.B93A318C@zip.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: "Martin J. Bligh" , Andrea Arcangeli , Rik van Riel , "linux-mm@kvack.org" List-ID: On Sun, 7 Jul 2002, Andrew Morton wrote: > > Probably the biggest offenders are generic_file_read/write. In > generic_file_write() we're already faulting in the user page(s) > beforehand (somewhat racily, btw). We could formalise that into > a pin_user_page_range() or whatever and use an atomic kmap > in there. I'd really prefer not to. We're talking of a difference between one single-cycle instruction (the address should be in the TLB 99% of all times), and a long slow TLB walk with various locks etc. Anyway, it couldn't be an atomic kmap in file_send_actor anyway, since the write itself may need to block for other reasons (ie socket buffer full etc). THAT is the one that can get misused - the others are not a big deal, I think. So kmap_atomic definitely doesn't work there. 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/