Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1161908
| Path | csiph.com!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andrew Morton <akpm@linux-foundation.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions |
| Date | Wed, 10 Jun 2015 04:20:02 +0200 |
| Message-ID | <pzDMu-re-9@gated-at.bofh.it> (permalink) |
| References | <pzqvT-682-7@gated-at.bofh.it> <pzzfQ-246-17@gated-at.bofh.it> <pzCQp-7qt-5@gated-at.bofh.it> <pzDjs-7Zy-3@gated-at.bofh.it> <pzDCO-9p-3@gated-at.bofh.it> |
| X-Original-To | Christoph Lameter <cl@linux.com> |
| X-Mailer | Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| 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 | 50 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, Minchan Kim <minchan@kernel.org>, Pekka Enberg <penberg@kernel.org>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Michal Hocko <mhocko@suse.cz>, David Rientjes <rientjes@google.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, sergey.senozhatsky.work@gmail.com, Joe Perches <joe@perches.com> |
| X-Original-Date | Tue, 9 Jun 2015 19:17:55 -0700 |
| X-Original-Message-ID | <20150609191755.867a36c3.akpm@linux-foundation.org> |
| X-Original-References | <1433851493-23685-1-git-send-email-sergey.senozhatsky@gmail.com> <20150609142523.b717dba6033ee08de997c8be@linux-foundation.org> <alpine.DEB.2.11.1506092008220.3300@east.gentwo.org> <20150609185150.8c9fed8d.akpm@linux-foundation.org> <alpine.DEB.2.11.1506092056570.6964@east.gentwo.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1161908 |
Show key headers only | View raw
On Tue, 9 Jun 2015 21:00:58 -0500 (CDT) Christoph Lameter <cl@linux.com> wrote: > On Tue, 9 Jun 2015, Andrew Morton wrote: > > > > Why do this at all? > > > > For the third time: because there are approx 200 callsites which are > > already doing it. > > Did some grepping and I did see some call sites that do this but the > majority has to do other processing as well. > > 200 call sites? Do we have that many uses of caches? Typical prod system > have ~190 caches active and the merging brings that down to half of that. I didn't try terribly hard. z:/usr/src/linux-4.1-rc7> grep -r -C1 kmem_cache_destroy . | grep "if [(]" | wc -l 158 It's a lot, anyway. > > More than half of the kmem_cache_destroy() callsites are declining that > > value by open-coding the NULL test. That's reality and we should recognize > > it. > > Well that may just indicate that we need to have a look at those > callsites and the reason there to use a special cache at all. This makes no sense. Go look at the code. drivers/staging/lustre/lustre/llite/super25.c, for example. It's all in the basic unwind/recover/exit code. > If the cache > is just something that kmalloc can provide then why create a special > cache. On the other hand if something special needs to be accomplished > then it would make sense to have special processing on kmem_cache_destroy. This has nothing to do with anything. We're talking about a basic "if I created this cache then destroy it" operation. It's a common pattern. mm/ exists to serve client code and as a lot of client code is doing this, we should move it into mm/ so as to serve client code better. -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions Christoph Lameter <cl@linux.com> - 2015-06-10 03:20 +0200
Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions Andrew Morton <akpm@linux-foundation.org> - 2015-06-10 03:50 +0200
Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions Christoph Lameter <cl@linux.com> - 2015-06-10 04:10 +0200
Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions Andrew Morton <akpm@linux-foundation.org> - 2015-06-10 04:20 +0200
Re: [RFC][PATCH 0/5] do not dereference NULL pools in pools' destroy() functions Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-06-10 04:10 +0200
csiph-web