From: "Drokin, Oleg" <oleg.drokin@intel.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: "<kernel-janitors@vger.kernel.org>"
<kernel-janitors@vger.kernel.org>,
"Dilger, Andreas" <andreas.dilger@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"<HPDD-discuss@lists.01.org>" <HPDD-discuss@ml01.01.org>,
"<devel@driverdev.osuosl.org>" <devel@driverdev.osuosl.org>,
"<linux-kernel@vger.kernel.org>" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: lustre: obd_support: Add obd_cpt_alloc function
Date: Sun, 3 May 2015 10:29:54 +0000 [thread overview]
Message-ID: <CFEDDBDC-DAD6-44B1-816B-233E9FFE19BB@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1505030751020.2068@localhost6.localdomain6>
On May 3, 2015, at 1:53 AM, Julia Lawall wrote:
> On Sat, 2 May 2015, Drokin, Oleg wrote:
>
>>
>> On May 2, 2015, at 5:16 PM, Julia Lawall wrote:
>>
>>> Summarize OBD_CPT_ALLOC_GFP, OBD_CPT_ALLOC, and OBD_CPT_ALLOC_PTR as a
>>> function, obd_cpt_alloc.
>>>
>>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>>>
>>> ---
>>>
>>> Some questions: Is the name OK? Is the NULL test needed? If not, should
>>> the call to kzalloc_node with the call to cfs_cpt_spread_node just be
>>> inlined into the call sites?
>>
>> I think we don't need this function at all, we can use kzalloc/kzalloc_node directly with cfs_cpt_spread_node call in.
>
> So everywhere the CPT macro is called, it is known that the value is not
> NULL? I looked at some call sites, but it's not obvious to determine
> that.
It's not obvious, but I believe this is true now.
Basically in lustre/ptlrpc/service.c we use service->srv_cptable
and that comes from ptlrpc_register_service:
cptable = cconf->cc_cptable;
if (cptable == NULL)
cptable = cfs_cpt_table;
….
service->srv_cptable = cptable;
service->srv_cpts = cpts;
service->srv_ncpts = ncpts;
that on the client it's only called from:
lustre/ldlm/ldlm_lockd.c::ldlm_setup() where we unconditionally assign
.psc_cpt = {
.cc_pattern = ldlm_cpts,
},
But even if there was a different caller, we always use cfs_cpt_table as fallback.
It's also directly used in ptlrpc_hr_init():
ptlrpc_hr.hr_cpt_table = cfs_cpt_table;
Two callers in lustre/ptlrpc/nrs.c use the same stuff as above.
One caller in lustre/ptlrpc/nrs_fifo.c uses nrs_pol2cptab which is defined as
nrs_pol2svc(policy)->srv_cptable which is again same as above.
There are no other callers.
Bye,
Oleg
next prev parent reply other threads:[~2015-05-03 10:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 21:16 Julia Lawall
2015-05-02 21:38 ` Drokin, Oleg
2015-05-03 5:53 ` Julia Lawall
2015-05-03 10:29 ` Drokin, Oleg [this message]
2015-05-02 21:47 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CFEDDBDC-DAD6-44B1-816B-233E9FFE19BB@intel.com \
--to=oleg.drokin@intel.com \
--cc=HPDD-discuss@ml01.01.org \
--cc=Julia.Lawall@lip6.fr \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®