The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* lustre: question about lov_request.c
@ 2015-06-07 20:11 Julia Lawall
  2015-06-07 20:58 ` Drokin, Oleg
  0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-06-07 20:11 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, HPDD-discuss,
	devel, linux-kernel

Hello,

The function lov_finish_set in 
drivers/staging/lustre/lustre/lov/lov_request.c contains the code:

       if (set->set_pga) {
                int len = set->set_oabufs * sizeof(*set->set_pga);
                OBD_FREE_LARGE(set->set_pga, len);
        }

If I change the call to OBD_FREE_LARGE to kvfree, then len is not useful 
any more.  But actually, at least with grep, I can't find anywhere that 
either the set_pga field or the set_oabufs field is set.  Am I missing 
something, or can the whole if be removed?  Can these two fields go too?

thanks,
julia

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lustre: question about lov_request.c
  2015-06-07 20:11 lustre: question about lov_request.c Julia Lawall
@ 2015-06-07 20:58 ` Drokin, Oleg
  2015-06-07 21:06   ` Julia Lawall
  2015-06-08  7:24   ` Julia Lawall
  0 siblings, 2 replies; 7+ messages in thread
From: Drokin, Oleg @ 2015-06-07 20:58 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Dilger, Andreas, Greg Kroah-Hartman,
	<HPDD-discuss@lists.01.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>

Hello!

  You are right, set_pga seems to be a dead member. It was alive a once, but somehow not fully removed now,
  so it's safe to drop the whole if and also the struct member itself.
  set_oabufs could be dropped as well.

  Thanks.

Bye,
    Oleg
On Jun 7, 2015, at 4:11 PM, Julia Lawall wrote:

> Hello,
> 
> The function lov_finish_set in 
> drivers/staging/lustre/lustre/lov/lov_request.c contains the code:
> 
>       if (set->set_pga) {
>                int len = set->set_oabufs * sizeof(*set->set_pga);
>                OBD_FREE_LARGE(set->set_pga, len);
>        }
> 
> If I change the call to OBD_FREE_LARGE to kvfree, then len is not useful 
> any more.  But actually, at least with grep, I can't find anywhere that 
> either the set_pga field or the set_oabufs field is set.  Am I missing 
> something, or can the whole if be removed?  Can these two fields go too?
> 
> thanks,
> julia


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lustre: question about lov_request.c
  2015-06-07 20:58 ` Drokin, Oleg
@ 2015-06-07 21:06   ` Julia Lawall
  2015-06-08  7:24   ` Julia Lawall
  1 sibling, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2015-06-07 21:06 UTC (permalink / raw)
  To: Drokin, Oleg
  Cc: Julia Lawall, Dilger, Andreas, Greg Kroah-Hartman,
	<HPDD-discuss@lists.01.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>

On Sun, 7 Jun 2015, Drokin, Oleg wrote:

> Hello!
> 
>   You are right, set_pga seems to be a dead member. It was alive a once, but somehow not fully removed now,
>   so it's safe to drop the whole if and also the struct member itself.
>   set_oabufs could be dropped as well.

Thanks. I will do that.

julia

> 
>   Thanks.
> 
> Bye,
>     Oleg
> On Jun 7, 2015, at 4:11 PM, Julia Lawall wrote:
> 
> > Hello,
> > 
> > The function lov_finish_set in 
> > drivers/staging/lustre/lustre/lov/lov_request.c contains the code:
> > 
> >       if (set->set_pga) {
> >                int len = set->set_oabufs * sizeof(*set->set_pga);
> >                OBD_FREE_LARGE(set->set_pga, len);
> >        }
> > 
> > If I change the call to OBD_FREE_LARGE to kvfree, then len is not useful 
> > any more.  But actually, at least with grep, I can't find anywhere that 
> > either the set_pga field or the set_oabufs field is set.  Am I missing 
> > something, or can the whole if be removed?  Can these two fields go too?
> > 
> > thanks,
> > julia
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lustre: question about lov_request.c
  2015-06-07 20:58 ` Drokin, Oleg
  2015-06-07 21:06   ` Julia Lawall
@ 2015-06-08  7:24   ` Julia Lawall
  2015-06-08  7:58     ` Drokin, Oleg
  1 sibling, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-06-08  7:24 UTC (permalink / raw)
  To: Drokin, Oleg
  Cc: Julia Lawall, Dilger, Andreas, Greg Kroah-Hartman,
	<HPDD-discuss@lists.01.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>

>   You are right, set_pga seems to be a dead member. It was alive a once, but somehow not fully removed now,
>   so it's safe to drop the whole if and also the struct member itself.
>   set_oabufs could be dropped as well.

Looking further, in the same function I also don't see any other uses of
the tested field in:

                if (req->rq_oi.oi_md)
                        OBD_FREE_LARGE(req->rq_oi.oi_md, req->rq_buflen);

        if (set->set_lockh)
		lov_llh_put(set->set_lockh);

Can these be dropped as well?

thanks,
julia

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lustre: question about lov_request.c
  2015-06-08  7:24   ` Julia Lawall
@ 2015-06-08  7:58     ` Drokin, Oleg
  2015-06-23  6:23       ` lustre: LIBCFS_ALLOC Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: Drokin, Oleg @ 2015-06-08  7:58 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Dilger, Andreas, Greg Kroah-Hartman,
	<HPDD-discuss@lists.01.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>


On Jun 8, 2015, at 3:24 AM, Julia Lawall wrote:

>>  You are right, set_pga seems to be a dead member. It was alive a once, but somehow not fully removed now,
>>  so it's safe to drop the whole if and also the struct member itself.
>>  set_oabufs could be dropped as well.
> 
> Looking further, in the same function I also don't see any other uses of
> the tested field in:
> 
>                if (req->rq_oi.oi_md)
>                        OBD_FREE_LARGE(req->rq_oi.oi_md, req->rq_buflen);
> 
>        if (set->set_lockh)
> 		lov_llh_put(set->set_lockh);
> 
> Can these be dropped as well?

Yes, these two seems to be on their way out too, so please feel free to remove them.

Thanks.

Bye,
    Oleg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* lustre: LIBCFS_ALLOC
  2015-06-08  7:58     ` Drokin, Oleg
@ 2015-06-23  6:23       ` Julia Lawall
  2015-06-23  8:30         ` Drokin, Oleg
  0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-06-23  6:23 UTC (permalink / raw)
  To: Drokin, Oleg
  Cc: Julia Lawall, Dilger, Andreas, Greg Kroah-Hartman,
	<HPDD-discuss@lists.01.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>

It seems that libcfs_kvzalloc doesn't use any particular threshold or 
switchingbetween kzalloc and vmalloc, so can be replaced by ths function 
too?

thanks,
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: lustre: LIBCFS_ALLOC
  2015-06-23  6:23       ` lustre: LIBCFS_ALLOC Julia Lawall
@ 2015-06-23  8:30         ` Drokin, Oleg
  0 siblings, 0 replies; 7+ messages in thread
From: Drokin, Oleg @ 2015-06-23  8:30 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Dilger, Andreas, Greg Kroah-Hartman,
	<HPDD-discuss@lists.01.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>


On Jun 23, 2015, at 2:23 AM, Julia Lawall wrote:

> It seems that libcfs_kvzalloc doesn't use any particular threshold or 
> switchingbetween kzalloc and vmalloc, so can be replaced by ths function 
> too?

If you mean to replace all instances of LIBCFS_ALLOC with libcfs_kvzalloc (and all frees with kvfree) then yes, that could be done I think.

Bye,
    Oleg

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-23  8:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 20:11 lustre: question about lov_request.c Julia Lawall
2015-06-07 20:58 ` Drokin, Oleg
2015-06-07 21:06   ` Julia Lawall
2015-06-08  7:24   ` Julia Lawall
2015-06-08  7:58     ` Drokin, Oleg
2015-06-23  6:23       ` lustre: LIBCFS_ALLOC Julia Lawall
2015-06-23  8:30         ` Drokin, Oleg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox