All of lore.kernel.org
 help / color / mirror / Atom feed
From: FMDF <fmdefrancesco@gmail.com>
To: Guddla Rupesh <rupeshforu3@gmail.com>
Cc: torin@tcarey.uk, kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: Exporting cpu instruction set to kernel .config file
Date: Thu, 3 Mar 2022 02:20:11 +0100	[thread overview]
Message-ID: <CAPj211sg=u6HNngaU3tr2TjMCpmTijb38YXYDtQKKLt4w0ojXg@mail.gmail.com> (raw)
In-Reply-To: <CAPj211sVPBfF3N=LrkJ3feRKiyxSTr5OUucbz7fkfYjtyAZv2g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3339 bytes --]

On Thu, 3 Mar 2022, 02:05 FMDF, <fmdefrancesco@gmail.com> wrote:

> On Wed, 2 Mar 2022, 17:57 Guddla Rupesh, <rupeshforu3@gmail.com> wrote:
>
>> I have seen the config from /proc/config.gz and found that processor
>> family as generic x86 64.
>>
>> Actually my system consists of i3 10th gen comet lake 10100 which has
>> integrated graphics and pci express 4.0 and also lots of new instructions
>> like avx2, sse4 etc.,.
>>
> Therefore, in .config, you should enable x86-64. That's it. Simple.
>
>> The main reason of compiling source code of kernel is it detects all my
>> hardware and provide support for opencl, video acceleration etc.,. But I
>> can't find any option to select my processor especially comet lake or
>> atleast skylake and instead there is an option called core2 in the section
>> processor family.
>>
> There are no Cometlake or Skylake options for kernel compilation. Your
> recent CPU is already supported and the whole ISA is available. Compilers
> know your system and they know which instructions are better suited for
> your applications and kernel code.
>
>> Finally I have disabled secure boot mode in bios and compiled source code
>> successfully and now I am able to boot into the latest build kernel but
>> there is no difference in performance between old and new kernels.
>>
> Why have you disabled secure boot mode? If performance concerns you, don't
> worry about it: there is no loss of performance with secure boot.
>
>> I think that normal kernel shipped by the distro is generic and it
>> doesn't have support for latest instructions like avx2, sse4 etc.,. To get
>> support we must compile kernel with lots of tuning.
>>
> No, you're wrong :)
>
> Just select the highest available processor family (I can't recall now if
> it is "core2" or "generic x86_64", it's the last of the list in the
> "processor family" section if you use "make menuconfig") and the entire
> instruction set of Intel x86-64 will be enabled and available.
>
> There is neither a "CONFIG_GENERATION_11" nor similar options.
>
>> I have exported the modules running on system and disable others by
>> running the command
>>
>> make localmodconfig
>>
> Beware that using "localmodconfig" disables the build of lots of modules
> you may need in the future. It relies on the current system configuration.
> When you'll add new devices you'll have to enable their drivers and
> recompile the modules.
>
>> What I want is " is there any way to export my cpu instruction set to
>> kernel .config file and compile kernel and install the modules.".
>>
>> If I can compile kernel source code then my Linux system will run at
>> extreme speeds never before.
>>
> You might tune the optimization flags of (e.g., GCC's "-On", for n=0,1,2,
> and  others) but I strongly advise you to not do this because (1) it is
> clear that you don't understand how the code is compiled and (2) you
> probably won't get the results you think you should get.
>
> Regards,
>
> Fabio M. De Francesco
>

I was about to forget three more things:

1) Read Torin's answer because he is right.
2) Don't touch configuration's options that you don't know. For instance,
do you know if you should enable "CONFIG_CORE_SCHED"? Just think that you
can inadvertently disable Intel Hyperthreading with that option.
3) Just copy your distro's .config and re-compile :)

[-- Attachment #1.2: Type: text/html, Size: 5624 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2022-03-03  1:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 16:57 Exporting cpu instruction set to kernel .config file Guddla Rupesh
2022-03-03  1:05 ` FMDF
2022-03-03  1:20   ` FMDF [this message]
2022-03-03 15:21     ` Guddla Rupesh
     [not found]       ` <CAPj211vBPjs-rAHtjkQetzoOChHhaaPATBFfXNTmmnG0sGovVQ@mail.gmail.com>
2022-03-03 18:44         ` FMDF
2022-03-03 18:46         ` Fwd: " FMDF
2022-03-03 23:06       ` Valdis Klētnieks
     [not found]   ` <CALgyNi2MGdmjGzVnBQ+cnCg94-k3ZTeHpCik2D7HwBVtFbLLjA@mail.gmail.com>
2022-03-03 19:39     ` FMDF
2022-03-04  0:52   ` Rogério Valentim Feitoza da Silva
2022-03-04 11:18     ` Torin Carey
2022-03-02 17:11 Torin Carey

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='CAPj211sg=u6HNngaU3tr2TjMCpmTijb38YXYDtQKKLt4w0ojXg@mail.gmail.com' \
    --to=fmdefrancesco@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=rupeshforu3@gmail.com \
    --cc=torin@tcarey.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.