lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CFEDDBDC-DAD6-44B1-816B-233E9FFE19BB@intel.com>
Date:	Sun, 3 May 2015 10:29:54 +0000
From:	"Drokin, Oleg" <oleg.drokin@...el.com>
To:	Julia Lawall <Julia.Lawall@...6.fr>
CC:	"<kernel-janitors@...r.kernel.org>" <kernel-janitors@...r.kernel.org>,
	"Dilger, Andreas" <andreas.dilger@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"<HPDD-discuss@...ts.01.org>" <HPDD-discuss@...1.01.org>,
	"<devel@...verdev.osuosl.org>" <devel@...verdev.osuosl.org>,
	"<linux-kernel@...r.kernel.org>" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: lustre: obd_support: Add obd_cpt_alloc function


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@...6.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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ