From: Michael Bringmann <mwb@linux.vnet.ibm.com>
To: Nathan Fontenot <nfont@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Juliet Kim <minkim@us.ibm.com>,
Thomas Falcon <tlfalcon@linux.vnet.ibm.com>,
Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Subject: Re: [PATCH v04 3/4] migration/memory: Evaluate LMB assoc changes
Date: Wed, 10 Oct 2018 13:29:02 -0500 [thread overview]
Message-ID: <d6476e5f-83ab-4be8-5d18-1e3b3ed155a9@linux.vnet.ibm.com> (raw)
In-Reply-To: <a554b6b4-35fe-c830-98d1-ade9042f05a3@linux.vnet.ibm.com>
On 10/10/2018 12:24 PM, Nathan Fontenot wrote:
> On 10/09/2018 03:37 PM, Michael Bringmann wrote:
>
>> +static void pseries_update_ala_memory_aai(int aa_index)
>> +{
>> + struct drmem_lmb *lmb;
>> +
>> + /* Readd all LMBs which were previously using the
>> + * specified aa_index value.
>> + */
>> + for_each_drmem_lmb(lmb) {
>> + if ((lmb->aa_index == aa_index) &&
>> + (lmb->flags & DRCONF_MEM_ASSIGNED)) {
>> + drmem_mark_lmb_update(lmb);
>> + dlpar_memory_pmt_changes_set();
>> + }
>> + }
>> +}
>> +
>> +struct assoc_arrays {
>> + u32 n_arrays;
>> + u32 array_sz;
>> + const __be32 *arrays;
>> +};
>
> This struct is also defined in arch/powerpc/mm/numa.c. May be a good idea to move the
> definition to common place.
Moving to topology.h in arch/powerpc/include/asm.
>
>> +
>> +static int pseries_update_ala_memory(struct of_reconfig_data *pr)
>> +{
>> + struct assoc_arrays new_ala, old_ala;
>> + __be32 *p;
>> + int i, lim;
>> +
>> + if (rtas_hp_event)
>> + return 0;
>> +
>> + /*
>> + * The layout of the ibm,associativity-lookup-arrays
>> + * property is a number N indicating the number of
>> + * associativity arrays, followed by a number M
>> + * indicating the size of each associativity array,
>> + * followed by a list of N associativity arrays.
>> + */
>> +
>> + p = (__be32 *) pr->old_prop->value;
>> + if (!p)
>> + return -EINVAL;
>> + old_ala.n_arrays = of_read_number(p++, 1);
>> + old_ala.array_sz = of_read_number(p++, 1);
>> + old_ala.arrays = p;
>> +
>> + p = (__be32 *) pr->prop->value;
>> + if (!p)
>> + return -EINVAL;
>> + new_ala.n_arrays = of_read_number(p++, 1);
>> + new_ala.array_sz = of_read_number(p++, 1);
>> + new_ala.arrays = p;
>> +
>> + lim = (new_ala.n_arrays > old_ala.n_arrays) ? old_ala.n_arrays :
>> + new_ala.n_arrays;
>> +
>> + if (old_ala.array_sz == new_ala.array_sz) {
>> +
>> + /* Reset any entries where the old and new rows
>> + * the array have changed.
>
> Small nit, the wording in that comment could be clearer.
Right.
>
> -Nathan
Michael
--
Michael W. Bringmann
Linux Technology Center
IBM Corporation
Tie-Line 363-5196
External: (512) 286-5196
Cell: (512) 466-0650
mwb@linux.vnet.ibm.com
next prev parent reply other threads:[~2018-10-10 18:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 20:35 [PATCH v04 0/5] powerpc/migration: Affinity fix for memory Michael Bringmann
2018-10-09 20:36 ` [PATCH v04 1/5] powerpc/drmem: Export 'dynamic-memory' loader Michael Bringmann
2018-10-10 16:54 ` Nathan Fontenot
2018-10-10 17:34 ` Michael Bringmann
2018-10-12 1:11 ` Michael Bringmann
2018-10-09 20:36 ` [PATCH v04 2/5] powerpc/drmem: Add internal_flags feature Michael Bringmann
2018-10-09 20:36 ` [PATCH v04 3/5] migration/memory: Add hotplug READD_MULTIPLE Michael Bringmann
2018-10-10 16:59 ` Nathan Fontenot
2018-10-10 17:58 ` Michael Bringmann
2018-10-09 20:37 ` [PATCH v04 3/4] migration/memory: Evaluate LMB assoc changes Michael Bringmann
2018-10-10 17:24 ` Nathan Fontenot
2018-10-10 18:29 ` Michael Bringmann [this message]
2018-10-09 20:37 ` [PATCH v04 4/4] migration/memory: Support 'ibm,dynamic-memory-v2' Michael Bringmann
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=d6476e5f-83ab-4be8-5d18-1e3b3ed155a9@linux.vnet.ibm.com \
--to=mwb@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=minkim@us.ibm.com \
--cc=nfont@linux.vnet.ibm.com \
--cc=tlfalcon@linux.vnet.ibm.com \
--cc=tyreld@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).