Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1375691
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Michal Hocko <mhocko@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 0/19] get rid of superfluous __GFP_REPORT |
| Date | Mon, 11 Apr 2016 13:10:02 +0200 |
| Message-ID | <rmHTb-4Qu-3@gated-at.bofh.it> (permalink) |
| X-Original-To | <linux-mm@kvack.org> |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mNXyTFMmoDRpVagffTs2729y68Du0cdZcTsjW4BXK9M=; b=f8Qs12RidG8LBGBSByRJFGUkOIt+8wdkWmqmv2DjtmIy8RBZMLiHUEJdLzMaLiowbz ypsEuA5OY1c5SQDZaJA959+Wc4DpM7VGqGdh3xPWyQOlkNPLdD1qCPlQHj0xyGQSsVWb i81q8UjYquRXvsj++6w3I4TF62EiUhICV8ymc/6A1iLyvYHeqUYx+AqS5iqwIYK5lVB0 a5Pbc8aMvoLIRrqJinbTsXbCAPAOKxW5HII9vLCC7O448qNDD/IXBADmPUKOpcjssi49 X6cCBjexil4gyAMp/yKFYdJDl2bJQbW6YTVEsazYfIZr19O0HHPhGGoB99vmnFJbna6V X1qA== |
| X-Gm-Message-State | AD7BkJLgY0reEreXpNpfdPTMVhtNycziKQhC9L2VyOM5sMjeOORHk/1V33I+6GAUFJ7zRQ== |
| X-Received | by 10.28.90.68 with SMTP id o65mr17264812wmb.70.1460372900567; Mon, 11 Apr 2016 04:08:20 -0700 (PDT) |
| X-Mailer | git-send-email 2.8.0.rc3 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Andrew Morton <akpm@linux-foundation.org>, LKML <linux-kernel@vger.kernel.org>, Andy Lutomirski <luto@kernel.org>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Catalin Marinas <catalin.marinas@arm.com>, Chen Liqin <liqin.linux@gmail.com>, Chris Metcalf <cmetcalf@mellanox.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Cornelia Huck <cornelia.huck@de.ibm.com>, "David S. Miller" <davem@davemloft.net>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Helge Deller <deller@gmx.de>, Herbert Xu <herbert@gondor.apana.org.au>, "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>, "James E.J. Bottomley" <jejb@parisc-linux.org>, John Crispin <blogic@openwrt.org>, Lennox Wu <lennox.wu@gmail.com>, Ley Foon Tan <lftan@altera.com>, Matt Fleming <matt@codeblueprint.co.uk>, Michal Hocko <mhocko@suse.com>, Mikulas Patocka <mpatocka@redhat.com>, Rich Felker <dalias@libc.org>, Russell King <linux@arm.linux.org.uk>, Shaohua Li <shli@kernel.org>, "Theodore Ts'o" <tytso@mit.edu>, Thomas Gleixner <tglx@linutronix.de>, Vineet Gupta <vgupta@synopsys.com>, Will Deacon <will.deacon@arm.com>, Yoshinori Sato <ysato@users.sourceforge.jp> |
| X-Original-Date | Mon, 11 Apr 2016 13:07:53 +0200 |
| X-Original-Message-ID | <1460372892-8157-1-git-send-email-mhocko@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1375691 |
Show key headers only | View raw
Hi, this is the second version of the patchset previously sent [1] while working on something unrelated I've checked the current usage of __GFP_REPEAT in the tree. It seems that a majority of the usage is and always has been bogus because __GFP_REPEAT has always been about costly high order allocations while we are using it for order-0 or very small orders very often. It seems that a big pile of them is just a copy&paste when a code has been adopted from one arch to another. I think it makes some sense to get rid of them because they are just making the semantic more unclear. Please note that GFP_REPEAT is documented as * __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt * _might_ fail. This depends upon the particular VM implementation. while !costly requests have basically nofail semantic. So one could reasonably expect that order-0 request with __GFP_REPEAT will not loop for ever. This is not implemented right now though. I would like to move on with __GFP_REPEAT and define a better semantic for it. One thought was to rename it to __GFP_BEST_EFFORT which would behave consistently for all orders and guarantee that the allocation would try as long as it seem feasible or fail eventually. !costly request would then finally get a request context which neiter fails too early (GFP_NORETRY) nor endlessly loops in the allocator for ever (default behavior). Costly high order requests would keep the current semantic. $ git grep __GFP_REPEAT next/master | wc -l 111 $ git grep __GFP_REPEAT | wc -l 35 So we are down to the third after this patch series. The remaining places really seem to be relying on __GFP_REPEAT due to large allocation requests. This still needs some double checking which I will do later after all the simple ones are sorted out. I am touching a lot of arch specific code here and I hope I got it right but as a matter of fact I even didn't compile test for some archs as I do not have cross compiler for them. Patches should be quite trivial to review for stupid compile mistakes though. The tricky parts are usually hidden by macro definitions and thats where I would appreciate help from arch maintainers. I am also interested whether this makes sense in general. [1] http://lkml.kernel.org/r/1446740160-29094-1-git-send-email-mhocko@kernel.org
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 0/19] get rid of superfluous __GFP_REPORT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:10 +0200
[PATCH 15/19] tile: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:10 +0200
[PATCH 18/19] crypto: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:10 +0200
Re: [PATCH 18/19] crypto: get rid of superfluous __GFP_REPEAT Herbert Xu <herbert@gondor.apana.org.au> - 2016-04-14 08:30 +0200
Re: [PATCH 18/19] crypto: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-14 09:10 +0200
Re: [PATCH 18/19] crypto: get rid of superfluous __GFP_REPEAT Herbert Xu <herbert@gondor.apana.org.au> - 2016-04-14 10:20 +0200
[PATCH resend] crypto: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-14 11:00 +0200
Re: [PATCH resend] crypto: get rid of superfluous __GFP_REPEAT Herbert Xu <herbert@gondor.apana.org.au> - 2016-04-15 16:40 +0200
[PATCH 09/19] parisc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:10 +0200
[PATCH 16/19] unicore32: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:10 +0200
[PATCH 08/19] nios2: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 01/19] tree wide: get rid of __GFP_REPEAT for order-0 allocations part I Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
Re: [PATCH 01/19] tree wide: get rid of __GFP_REPEAT for order-0 allocations part I David Rientjes <rientjes@google.com> - 2016-04-14 22:00 +0200
Re: [PATCH 01/19] tree wide: get rid of __GFP_REPEAT for order-0 allocations part I Michal Hocko <mhocko@kernel.org> - 2016-04-15 09:50 +0200
[PATCH 06/19] arc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
Re: [PATCH 06/19] arc: get rid of superfluous __GFP_REPEAT Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-04-11 16:30 +0200
[PATCH 11/19] powerpc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 10/19] score: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 07/19] mips: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 19/19] jbd2: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 13/19] s390: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
Re: [PATCH 13/19] s390: get rid of superfluous __GFP_REPEAT Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-04-11 13:30 +0200
Re: [PATCH 13/19] s390: get rid of superfluous __GFP_REPEAT Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-04-11 14:50 +0200
[PATCH 12/19] sparc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 04/19] arm: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
[PATCH 03/19] x86/efi: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
Re: [PATCH 03/19] x86/efi: get rid of superfluous __GFP_REPEAT Matt Fleming <matt@codeblueprint.co.uk> - 2016-04-12 18:00 +0200
[PATCH 17/19] dm: get rid of superfluous gfp flags Michal Hocko <mhocko@kernel.org> - 2016-04-11 13:20 +0200
Re: [PATCH 17/19] dm: get rid of superfluous gfp flags Mikulas Patocka <mpatocka@redhat.com> - 2016-04-15 14:30 +0200
Re: [PATCH 17/19] dm: get rid of superfluous gfp flags Michal Hocko <mhocko@kernel.org> - 2016-04-15 15:10 +0200
CC in git cover letter vs patches (was Re: [PATCH 0/19] get rid of superfluous __GFP_REPORT) Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-04-13 13:30 +0200
Re: CC in git cover letter vs patches (was Re: [PATCH 0/19] get rid of superfluous __GFP_REPORT) Michal Hocko <mhocko@kernel.org> - 2016-04-13 15:40 +0200
csiph-web