From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <46B9921E.6020900@domain.hid> Date: Wed, 08 Aug 2007 11:51:26 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <46B86E53.1030803@domain.hid> <2ff1a98a0708070724j5afecf20q22994d053553ed57@domain.hid> <46B885E3.6060605@domain.hid> <2ff1a98a0708070756q60794718wb1bc55675ea05ba4@domain.hid> <46B888B4.2070301@domain.hid> <2ff1a98a0708070809h2ac1a0b7q2178297d5a824bb9@domain.hid> <1186505723.5408.8.camel@domain.hid> <46B8A57D.8010606@domain.hid> <46B8ACBB.5030001@domain.hid> <18105.28848.229659.110775@domain.hid> <2ff1a98a0708080140w4191c988je6e980ed4940e4ab@domain.hid> In-Reply-To: <2ff1a98a0708080140w4191c988je6e980ed4940e4ab@domain.hid> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1C6C4F1F797BF6EFF585A1D6" Sender: jan.kiszka@domain.hid Subject: Re: [Xenomai-core] [Adeos-main] [COW-BUG] __alloc_pages called from atomic context List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: adeos-main , xenomai-core This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1C6C4F1F797BF6EFF585A1D6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Gilles Chanteperdrix wrote: > On 8/8/07, Gilles Chanteperdrix wrote:= >> Jan Kiszka wrote: >> > Jan Kiszka wrote: >> > > Philippe Gerum wrote: >> > >> On Tue, 2007-08-07 at 17:09 +0200, Gilles Chanteperdrix wrote: >> > >>> On 8/7/07, Jan Kiszka wrote: >> > >>>> Gilles Chanteperdrix wrote: >> > >>>>> The fact that you are in a hurry should not be an excuse to p= ropose a >> > >>>>> fix which is much worse than the bug itself. >> > >>>> Please explain. >> > >>> Using GFP_ATOMIC is not a good idea, because the kernel needs t= he >> > >>> GFP_ATOMIC pools for allocation that take place from really ato= mic >> > >>> contexts such as interruption handlers for instance. fork shoul= d not >> > >>> be an atomic context. >> > >>> >> > >>> So the only reason I see why you propose this patch is because = you are >> > >>> in a hurry. Ok, before we fix this properly, you can use GFP_AT= OMIC >> > >>> locally, but please do not make >> > >>> this an official patch. >> > >>> >> > >> I'm afraid you are both right. Draining pages from the atomic po= ol might >> > >> starve truely atomic contexts, and releasing the lock guarding t= he >> > >> pagetable pages for the source mm seems contradictory with what = the >> > >> current code tries to achieve in holding it. >> > >> >> > >> Here is a patch preallocating the page for the cow-breaking code= , which >> > >> relies on the lock breaking pattern already in place. Not exactl= y >> > >> pretty, slightly tested here (UP, spinlock debug), but looks ok = so far. >> > >> Needs SMP testing before any attempt is made to merge it. >> > > >> > > Funny. I just finished my own patch of this kind and made it pass= a >> > > basic COW stress test here. Find it below, it is very similar. Wi= ll >> > > now analyse yours to see which one looks nicer and/or is more cor= rect. >> > >> > Yours is clearly nicer, but it required/allowed a few more cleanups= =2E >> > Find my variant attached (against our local 2.6.20 kernel). >> > >> > From my POV: problem solved. 8) >> >> It seems you solved this problem before I even had a chance to have >> a look at the code. >=20 > Finally looking at the I-pipe patch, I see something suspicious: > the patch replaces a "return err" with a "return 0" in zeromap_pud_rang= e. Indeed, that looks fishy. Appears to be a broken combination of these two commits: http://www.denx.de/cgi-bin/gitweb.cgi?p=3Dipipe-2.6.git;a=3Dcommitdiff;h=3D= 48ac83704927dca23a28c50163eacb71758b646e http://www.denx.de/cgi-bin/gitweb.cgi?p=3Dipipe-2.6.git;a=3Dcommitdiff;h=3D= edebab28d3bced559c6be3b2de8045b83cc05d53 Jan --------------enig1C6C4F1F797BF6EFF585A1D6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGuZIfniDOoMHTA+kRAnzQAJ9zD4fLCIzOFS/nIsuc8u5QGqureACePJMt ovwHTMqAkxrmq0Odqg/FgOs= =/7wd -----END PGP SIGNATURE----- --------------enig1C6C4F1F797BF6EFF585A1D6--