Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189963 > unrolled thread
| Started by | Tejun Heo <tj@kernel.org> |
|---|---|
| First post | 2015-07-22 16:00 +0200 |
| Last post | 2015-07-22 16:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/3] perpuc: check pcpu_first_chunk and pcpu_reserved_chunk to avoid handling them twice Tejun Heo <tj@kernel.org> - 2015-07-22 16:00 +0200
Re: [PATCH 2/3] perpuc: check pcpu_first_chunk and pcpu_reserved_chunk to avoid handling them twice Baoquan He <bhe@redhat.com> - 2015-07-22 16:30 +0200
Re: [PATCH 2/3] perpuc: check pcpu_first_chunk and pcpu_reserved_chunk to avoid handling them twice Tejun Heo <tj@kernel.org> - 2015-07-22 16:40 +0200
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-07-22 16:00 +0200 |
| Subject | Re: [PATCH 2/3] perpuc: check pcpu_first_chunk and pcpu_reserved_chunk to avoid handling them twice |
| Message-ID | <pP2IW-bi-15@gated-at.bofh.it> |
Hello,
On Wed, Jul 22, 2015 at 08:03:57AM +0800, Baoquan He wrote:
> Yes, dyn_size can't be zero. But in pcpu_setup_first_chunk(), the local
> variable dyn_size could be zero caused by below code:
>
> if (ai->reserved_size) {
> schunk->free_size = ai->reserved_size;
> pcpu_reserved_chunk = schunk;
> pcpu_reserved_chunk_limit = ai->static_size +
> ai->reserved_size;
> } else {
> schunk->free_size = dyn_size;
> dyn_size = 0; /* dynamic area covered
> */
> }
>
> So if no reserved_size dyn_size is assigned to zero, and is checked to
> see if dchunk need be created in below code:
Hmmm... but then pcpu_reserved_chunk is NULL so there still is no
duplicate on the list, no?
Thanks.
--
tejun
--
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/
[toc] | [next] | [standalone]
| From | Baoquan He <bhe@redhat.com> |
|---|---|
| Date | 2015-07-22 16:30 +0200 |
| Message-ID | <pP3bY-YT-11@gated-at.bofh.it> |
| In reply to | #1189963 |
On 07/22/15 at 09:52am, Tejun Heo wrote:
> Hello,
>
> On Wed, Jul 22, 2015 at 08:03:57AM +0800, Baoquan He wrote:
> > Yes, dyn_size can't be zero. But in pcpu_setup_first_chunk(), the local
> > variable dyn_size could be zero caused by below code:
> >
> > if (ai->reserved_size) {
> > schunk->free_size = ai->reserved_size;
> > pcpu_reserved_chunk = schunk;
> > pcpu_reserved_chunk_limit = ai->static_size +
> > ai->reserved_size;
> > } else {
> > schunk->free_size = dyn_size;
> > dyn_size = 0; /* dynamic area covered
> > */
> > }
> >
> > So if no reserved_size dyn_size is assigned to zero, and is checked to
> > see if dchunk need be created in below code:
>
> Hmmm... but then pcpu_reserved_chunk is NULL so there still is no
> duplicate on the list, no?
Yes, you are quite right. I was mistaken. So NACK this patch.
Thanks a lot.
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-07-22 16:40 +0200 |
| Message-ID | <pP3lE-19S-19@gated-at.bofh.it> |
| In reply to | #1190005 |
On Wed, Jul 22, 2015 at 10:29:00PM +0800, Baoquan He wrote: > > > So if no reserved_size dyn_size is assigned to zero, and is checked to > > > see if dchunk need be created in below code: > > > > Hmmm... but then pcpu_reserved_chunk is NULL so there still is no > > duplicate on the list, no? > > Yes, you are quite right. I was mistaken. So NACK this patch. But, yeah, it'd be great if we can add a WARN_ON() to ensure that this really doesn't happen along with some comments. Thanks! -- tejun -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web