linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: compressed: discard ksym/kcrctab input section
Date: Fri, 20 Oct 2017 17:32:08 +0100	[thread overview]
Message-ID: <20171020163207.GH20805@n2100.armlinux.org.uk> (raw)
In-Reply-To: <CAKv+Gu9Ygu4UELUbWD8sTzdL8ZQRWPAtQWaM6qTd2GyzuEDN5g@mail.gmail.com>

On Fri, Oct 20, 2017 at 05:20:26PM +0100, Ard Biesheuvel wrote:
> On 20 October 2017 at 17:11, Russell King - ARM Linux
> <linux@armlinux.org.uk> wrote:
> > On Fri, Oct 20, 2017 at 04:28:49PM +0100, Ard Biesheuvel wrote:
> >> On 20 October 2017 at 16:25, Gregory CLEMENT
> >> <gregory.clement@free-electrons.com> wrote:
> >> > Hi Ard,
> >> >
> >> >  On jeu., oct. 12 2017, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >> >
> >> >> On 12 October 2017 at 10:45, Russell King - ARM Linux
> >> >> <linux@armlinux.org.uk> wrote:
> >> >>> On Thu, Oct 12, 2017 at 11:24:57AM +0200, Gregory CLEMENT wrote:
> >> >>>> Hi Ard,
> >> >>>>
> >> >>>> Can we move forward to fix the booting problem ?
> >> >>>>
> >> >>>> What about amending your commit log with this new information and then
> >> >>>> submit it to Russell patch system?
> >> >>>
> >> >>> Well, I think there's a choice that needs to be made between this
> >> >>> approach and Arnd's approach.
> >> >>>
> >> >>> I'm not all that thrilled with the need to add explicit alignment to
> >> >>> data that is inherently a byte stream, and that invariably results in
> >> >>> unaligned data words even if you do align the start of it.  That
> >> >>> sounds to me very much like a hack rather than a proper solution.
> >> >>> So, right now I'm leaning more towards Arnd's solution than Ard's
> >> >>> from what's been said in this thread.
> >> >>>
> >> >>
> >> >> I agree that the struct type unaligned accessors are the best choice
> >> >> for ARM in any case, given that it will also prevent hitting the
> >> >> alignment fixup handler in the kernel unnecessarily.
> >> >>
> >> >>> However, I don't recall Arnd's patch, it's probably buried deep in
> >> >>> my mailbox.
> >> >>>
> >> >>
> >> >> Well, unless you are considering changing the unaligned accessors from
> >> >> access_ok.h to le_struct.h as a bugfix, I think we need both patches.
> >> >
> >> > We will soon reach v4.14-rc6 and the Armada XP and Armada 370 still not
> >> > boot. I also didn't see your patch in rmk patch system.
> >> >
> >> > Waiting for you find a agreement an other option is to remove CONFIG_EFI
> >> > from multi_v7_defconfig as I don't really see any armv7 base board using
> >> > EFI.
> >> >
> >>
> >> It is up to Russell to decide how he wants to proceed. Russell?
> >
> > Well, having failed to attract Arnd's attention, I've spent 20 minutes
> > searching my mailbox to find it.
> >
> > It turns out that there was never a proper patch from Arnd - it was a
> > patch in pastebin.  It's not ARM specific either, it's an asm-generic
> > change, for which Arnd is the maintainer for.
> >
> > I've just replied to that old thread and I've included Gregory and some
> > PXA folk who are also having alignment problems in the decompressor.  It
> > could all be due to this same issue.
> >
> > There's also one additional factor that hasn't been considered, and I'm
> > scared to point it out, but:
> >
> > 1. Does Arnd's patch fix the PXA problem as well?
> >
> 
> I don't think it will help configs that don't have
> HAVE_EFFICIENT_UNALIGNED_ACCESS set, given that they don't use
> access_ok.h in the first place.
> 
> > 2. What is the performance impact of Arnd's fix?
> >
> 
> Well, given that we may be relying on the alignment fixup handler to
> fix up kernel accesses, the performance impact could actually be
> favorable in some cases. But I don't have any numbers, nor do I have
> access to a representative sampling of ARM hardware so I can't be of
> any help here, unfortunately.

Well, everyone can tell whether alignment fixups get used on their
platforms, by looking at /proc/cpu/alignment - this counts any
alignment faults and their types.  If it's all zeros, then the
alignment fixup handler isn't being used.

I just checked one of my imx6 platforms (3G/wifi gateway), all the
stats are zero.  Another imx6 platform (whose port 80 is open to the
world) has one double-word fault in nsm_get_handle+0x200/0x484.
My ARMv5 gateway here also has all zero stats.

However, all these are built with GCC 4.7.4, and we already know
that newer compilers behave significantly differently.  So, I don't
think what I see here is representative, so I can't decide based on
what I see locally.

So, it seems we're rather stuck.

I suppose I could set up a dart board, and throw a dart blind folded
and if it hits a red area, pick one patch, otherwise take the other.
Or toss a coin.  Or some other rediculous game.

It would be much better if there was some way to evaluate the impact,
but I see that no one is interested in lifting a finger to help with
that.

Meanwhile, I'm quite sure there'll be an on-going cry for me to make
a decision.  A decision based on a whim.  Yea, great basis for taking
decisions.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

  reply	other threads:[~2017-10-20 16:32 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 15:31 [PATCH] ARM: compressed: discard ksym/kcrctab input section Ard Biesheuvel
2017-09-08 15:39 ` Gregory CLEMENT
2017-09-08 15:41   ` Ard Biesheuvel
2017-10-04 12:16 ` Gregory CLEMENT
2017-10-04 12:20   ` Ard Biesheuvel
2017-10-04 12:43     ` Russell King - ARM Linux
2017-10-09 12:39       ` Ard Biesheuvel
2017-10-12  9:24         ` Gregory CLEMENT
2017-10-12  9:45           ` Russell King - ARM Linux
2017-10-12 19:03             ` Ard Biesheuvel
2017-10-20 15:25               ` Gregory CLEMENT
2017-10-20 15:28                 ` Ard Biesheuvel
2017-10-20 16:11                   ` Russell King - ARM Linux
2017-10-20 16:20                     ` Ard Biesheuvel
2017-10-20 16:32                       ` Russell King - ARM Linux [this message]
2017-10-20 16:36                         ` Ard Biesheuvel
2017-10-20 16:54                           ` Russell King - ARM Linux
2017-10-20 17:12                             ` Ard Biesheuvel
2017-10-21  7:56 ` Matthias Brugger
2017-10-21  8:14   ` Ard Biesheuvel
2017-10-22 22:00     ` Matthias Brugger
2017-10-23  9:29       ` Russell King - ARM Linux
2017-10-23 11:48         ` Russell King - ARM Linux
2017-10-23 21:17           ` Matthias Brugger
2017-10-23 22:19             ` Russell King - ARM Linux
2017-10-24  6:51               ` Matthias Brugger
2017-10-23 21:15         ` Matthias Brugger
2017-10-23 21:32     ` Matthias Brugger
2017-10-23 22:29       ` Russell King - ARM Linux
2017-10-24  8:36       ` Andrea Adami

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=20171020163207.GH20805@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).