From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Summers, Stuart" <stuart.summers@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] mm: Use local variable for swap address space
Date: Wed, 19 Jun 2019 23:00:37 +0300 [thread overview]
Message-ID: <87imt1pcpm.fsf@intel.com> (raw)
In-Reply-To: <30f205ed21d4acc5530ce6932bdf9145f4d61d26.camel@intel.com>
On Wed, 19 Jun 2019, "Summers, Stuart" <stuart.summers@intel.com> wrote:
> On Wed, 2019-06-19 at 18:30 +0300, Jani Nikula wrote:
>> On Tue, 18 Jun 2019, Stuart Summers <stuart.summers@intel.com> wrote:
>> > This addresses the following build error:
>> > mm/huge_memory.c: In function ‘__split_huge_page’:
>> > mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer
>> > __xa_store(&swap_address_space(entry)->i_pages,
>> > ^~
>> > mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in
>> > something not a structure or union
>>
>> Did you check under what circumstances it would be a void pointer?
>
> This got things working, but I agree probably needs at least some basic
> checks here. I'll rework it.
Hint: CONFIG_SWAP.
BR,
Jani.
>
>>
>> Under those circumstances, what do you think will happen runtime
>> after
>> you've brushed the build error under the carpet?
>>
>> Anyway, the patch is against a commit in topic/core-for-CI, not to be
>> merged elsewhere.
>
> Ok thanks for the feedback and makes sense. I'll resubmit.
>
> Thanks,
> Stuart
>
>>
>> BR,
>> Jani.
>>
>>
>>
>> >
>> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> > Signed-off-by: Stuart Summers <stuart.summers@intel.com>
>> > ---
>> > mm/huge_memory.c | 4 +++-
>> > 1 file changed, 3 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/mm/huge_memory.c b/mm/huge_memory.c
>> > index affb2c3667f9..bced5485137b 100644
>> > --- a/mm/huge_memory.c
>> > +++ b/mm/huge_memory.c
>> > @@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page
>> > *page, struct list_head *list,
>> > head + i, 0);
>> > } else if (PageSwapCache(page)) {
>> > swp_entry_t entry = { .val = page_private(head
>> > + i) };
>> > - __xa_store(&swap_address_space(entry)->i_pages,
>> > + struct address_space *address_space =
>> > + swap_address_space(entry);
>> > + __xa_store(&address_space->i_pages,
>> > swp_offset(entry),
>> > head + i, 0);
>> > }
>>
>>
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2019-06-19 19:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 1:38 [PATCH] mm: Use local variable for swap address space Stuart Summers
2019-06-19 2:03 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-06-19 15:30 ` [PATCH] " Jani Nikula
2019-06-19 17:07 ` Summers, Stuart
2019-06-19 20:00 ` Jani Nikula [this message]
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=87imt1pcpm.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stuart.summers@intel.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