Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751215AbVLHVxK (ORCPT ); Thu, 8 Dec 2005 16:53:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751146AbVLHVxK (ORCPT ); Thu, 8 Dec 2005 16:53:10 -0500 Received: from [194.90.237.34] ([194.90.237.34]:5712 "EHLO mtlex01.yok.mtl.com") by vger.kernel.org with ESMTP id S1751215AbVLHVxJ (ORCPT ); Thu, 8 Dec 2005 16:53:09 -0500 Date: Thu, 8 Dec 2005 23:56:00 +0200 From: "Michael S. Tsirkin" To: Hugh Dickins Cc: Gleb Natapov , Benjamin Herrenschmidt , Petr Vandrovec , Nick Piggin , Badari Pulavarty , Linux Kernel Mailing List Subject: Re: set_page_dirty vs set_page_dirty_lock Message-ID: <20051208215600.GE13886@mellanox.co.il> Reply-To: "Michael S. Tsirkin" References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 874 Lines: 27 Quoting Hugh Dickins : > Many would be pleased if we could manage without set_page_dirty_lock. It seems that I can do if (TestSetPageLocked(page)) schedule_work() and in this way, avoid the schedule_work overhead for the common case where the page isnt locked. Right? If that works, I can mostly do things directly, although I'm still stuck with the problem of an app performing a fork + write into the same page while I'm doing DMA there. I am currently solving this by doing a second get_user_pages after DMA is done and comparing the page lists, but this, of course, needs a task context ... -- MST - 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/