Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965Ab3HTVDg (ORCPT ); Tue, 20 Aug 2013 17:03:36 -0400 Received: from mail-ob0-f178.google.com ([209.85.214.178]:40397 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751637Ab3HTVDf (ORCPT ); Tue, 20 Aug 2013 17:03:35 -0400 MIME-Version: 1.0 In-Reply-To: References: <1376089460-5459-1-git-send-email-andi@firstfloor.org> <1376089460-5459-11-git-send-email-andi@firstfloor.org> <20130810161031.GK19750@two.firstfloor.org> From: KOSAKI Motohiro Date: Tue, 20 Aug 2013 17:03:14 -0400 Message-ID: Subject: Re: [PATCH 10/13] x86: Move cond resched for copy_{from,to}_user into low level code 64bit To: Linus Torvalds Cc: Andi Kleen , Linux Kernel Mailing List , "the arch/x86 maintainers" , Ingo Molnar , Andi Kleen Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 27 >> Hmm. I can do that, but wouldn't that make CONFIG_PREEMPT_VOLUNTARY >> mostly equivalent to CONFIG_PREEMPT_NONE? > > According the the Kconfig help, PREEMPT_VOLUNTARY is about the > *explicit* preemption points. And we do have a lot of them in > "might_sleep()". > > And personally, I think it makes a *lot* more sense to have a > "might_sleep()" in the MM allocators than it does to have it in > copy_from_user(). AFAIK, MM allocation already does that. struct page * __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, struct zonelist *zonelist, nodemask_t *nodemask) { (snip) might_sleep_if(gfp_mask & __GFP_WAIT); btw, Sorry for the very late response. I haven't noticed this thread. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/