|
|
|
![]() |
|
Strumenti |
![]() |
#141 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#142 |
Senior Member
Iscritto dal: Aug 2002
Città: Roma
Messaggi: 1473
|
Ciao a tutti,
dopo alcuni mesi di utilizzo quotidiano di Linux (Distribuzione debian squeeze - ha sostituito Windows 7 sul mio PC ed è divenuto l'unico OS presente sulla mia macchina) vorrei cimentarmi a compilare, installare ed utilizzare un kernel vanilla; in proposito avrei bisogno di sapere: - Quali pacchetti devo installare per far funzionare make xconfig? - Considerando che voglio utlizzare il sistema standard di compilazione del kernel (non il debian-way, così anche se dovessi cambiare distribuzione quello che ho imparato non devo buttarlo via) ci sono dei consigli prima di cominciare a sbattere la testa al muro? - I miei dischi utilizzano file system ext4: compilando il kernel con il supporto a tale filesystem come builtin, non è necessario provvedere alla creazione di un initrd, giusto? Grazie! |
![]() |
![]() |
![]() |
#143 | |||
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Quote:
Quote:
Quote:
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) Ultima modifica di Gimli[2BV!2B] : 10-06-2012 alle 18:51. |
|||
![]() |
![]() |
![]() |
#144 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Visto che è da metà agosto che non ci sono annunci da Con Kolivas sul suo blog mi son messo avanti con il 3.6.
Queste sono le due patch che interferiscono con la patch BFS:
Offro quindi una patch non ufficiale da applicare alla patch ufficiale 3.5-sched-bfs-424.patch per renderla 3.6-sched-bfs-424_unofficial.patch Sottolineo che sto utilizzando il kernel con queste patch solo da qualche ora, non sono in contatto con Con Colivas né ho approfondite conoscenze del codice del kernel. Risulta così lunga principalmente per gli aggiornamenti di tutti gli offset, delle date e dei nomi dei file. Ho messo in grassetto le modifiche apportate. Codice:
--- patches/3.5-sched-bfs-424.patch 2012-10-05 23:34:51.359351736 +0200 +++ 3.6-sched-bfs-424.patch 2012-10-06 01:00:48.640369658 +0200 @@ -27,33 +27,11 @@ cpu usage may be very different if you h -ck --- - Documentation/scheduler/sched-BFS.txt | 347 + - Documentation/sysctl/kernel.txt | 26 - arch/powerpc/platforms/cell/spufs/sched.c | 5 - arch/x86/Kconfig | 10 - drivers/cpufreq/cpufreq.c | 7 - drivers/cpufreq/cpufreq_conservative.c | 4 - drivers/cpufreq/cpufreq_ondemand.c | 8 - fs/proc/base.c | 2 - include/linux/init_task.h | 64 - include/linux/ioprio.h | 2 - include/linux/jiffies.h | 2 - include/linux/sched.h | 110 - init/Kconfig | 48 - init/main.c | 1 - kernel/delayacct.c | 2 - kernel/exit.c | 2 - kernel/posix-cpu-timers.c | 12 - kernel/sched/Makefile | 8 - kernel/sched/bfs.c | 7448 ++++++++++++++++++++++++++++++ - kernel/sysctl.c | 31 - lib/Kconfig.debug | 2 - 21 files changed, 8063 insertions(+), 78 deletions(-) -Index: linux-3.5-ck1/arch/powerpc/platforms/cell/spufs/sched.c +Index: linux-3.6-ck1/arch/powerpc/platforms/cell/spufs/sched.c =================================================================== ---- linux-3.5-ck1.orig/arch/powerpc/platforms/cell/spufs/sched.c 2012-01-05 10:55:44.000000000 +1100 -+++ linux-3.5-ck1/arch/powerpc/platforms/cell/spufs/sched.c 2012-08-16 13:20:26.856229061 +1000 +--- linux-3.6-ck1.orig/arch/powerpc/platforms/cell/spufs/sched.c 2012-10-05 23:37:26.870479786 +0200 ++++ linux-3.6-ck1/arch/powerpc/platforms/cell/spufs/sched.c 2012-10-05 23:38:21.090826080 +0200 @@ -63,11 +63,6 @@ static struct timer_list spusched_timer; static struct timer_list spuloadavg_timer; @@ -66,10 +44,10 @@ Index: linux-3.5-ck1/arch/powerpc/platfo * Frequency of the spu scheduler tick. By default we do one SPU scheduler * tick for every 10 CPU scheduler ticks. */ -Index: linux-3.5-ck1/Documentation/scheduler/sched-BFS.txt +Index: linux-3.6-ck1/Documentation/scheduler/sched-BFS.txt =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-3.5-ck1/Documentation/scheduler/sched-BFS.txt 2012-08-16 13:20:26.856229061 +1000 +--- /dev/null 2012-10-05 22:50:08.959930518 +0200 ++++ linux-3.6-ck1/Documentation/scheduler/sched-BFS.txt 2012-10-05 23:38:21.091826068 +0200 @@ -0,0 +1,347 @@ +BFS - The Brain Fuck Scheduler by Con Kolivas. + @@ -418,10 +396,10 @@ Index: linux-3.5-ck1/Documentation/sched + + +Con Kolivas <kernel@kolivas.org> Tue, 5 Apr 2011 -Index: linux-3.5-ck1/Documentation/sysctl/kernel.txt +Index: linux-3.6-ck1/Documentation/sysctl/kernel.txt =================================================================== ---- linux-3.5-ck1.orig/Documentation/sysctl/kernel.txt 2012-03-20 17:39:40.000000000 +1100 -+++ linux-3.5-ck1/Documentation/sysctl/kernel.txt 2012-08-16 13:20:26.856229061 +1000 +--- linux-3.6-ck1.orig/Documentation/sysctl/kernel.txt 2012-10-05 23:37:27.312474702 +0200 ++++ linux-3.6-ck1/Documentation/sysctl/kernel.txt 2012-10-05 23:38:21.091826068 +0200 @@ -33,6 +33,7 @@ show up in /proc/sys/kernel: - domainname - hostname @@ -476,10 +454,10 @@ Index: linux-3.5-ck1/Documentation/sysct rtsig-max & rtsig-nr: The file rtsig-max can be used to tune the maximum number -Index: linux-3.5-ck1/fs/proc/base.c +Index: linux-3.6-ck1/fs/proc/base.c =================================================================== ---- linux-3.5-ck1.orig/fs/proc/base.c 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/fs/proc/base.c 2012-08-16 13:20:26.857229048 +1000 +--- linux-3.6-ck1.orig/fs/proc/base.c 2012-10-05 23:37:26.918479234 +0200 ++++ linux-3.6-ck1/fs/proc/base.c 2012-10-05 23:38:21.092826056 +0200 @@ -338,7 +338,7 @@ static int proc_pid_stack(struct seq_fil static int proc_pid_schedstat(struct task_struct *task, char *buffer) { @@ -489,11 +467,11 @@ Index: linux-3.5-ck1/fs/proc/base.c (unsigned long long)task->sched_info.run_delay, task->sched_info.pcount); } -Index: linux-3.5-ck1/include/linux/init_task.h +Index: linux-3.6-ck1/include/linux/init_task.h =================================================================== ---- linux-3.5-ck1.orig/include/linux/init_task.h 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/include/linux/init_task.h 2012-08-16 13:20:26.857229048 +1000 -@@ -132,12 +132,70 @@ extern struct cred init_cred; +--- linux-3.6-ck1.orig/include/linux/init_task.h 2012-10-05 23:37:26.960478752 +0200 ++++ linux-3.6-ck1/include/linux/init_task.h 2012-10-06 00:16:57.016596435 +0200 +@@ -141,12 +141,70 @@ extern struct task_group root_task_group # define INIT_PERF_EVENTS(tsk) #endif @@ -530,8 +508,8 @@ Index: linux-3.5-ck1/include/linux/init_ + .children = LIST_HEAD_INIT(tsk.children), \ + .sibling = LIST_HEAD_INIT(tsk.sibling), \ + .group_leader = &tsk, \ -+ RCU_INIT_POINTER(.real_cred, &init_cred), \ -+ RCU_INIT_POINTER(.cred, &init_cred), \ ++ RCU_POINTER_INITIALIZER(real_cred, &init_cred), \ ++ RCU_POINTER_INITIALIZER(cred, &init_cred), \ + .comm = INIT_TASK_COMM, \ + .thread = INIT_THREAD, \ + .fs = &init_fs, \ @@ -566,7 +544,7 @@ Index: linux-3.5-ck1/include/linux/init_ #define INIT_TASK(tsk) \ { \ .state = 0, \ -@@ -201,7 +259,7 @@ extern struct cred init_cred; +@@ -211,7 +269,7 @@ extern struct task_group root_task_group INIT_TASK_RCU_PREEMPT(tsk) \ INIT_CPUSET_SEQ \ } @@ -575,10 +553,10 @@ Index: linux-3.5-ck1/include/linux/init_ #define INIT_CPU_TIMERS(cpu_timers) \ { \ -Index: linux-3.5-ck1/include/linux/ioprio.h +Index: linux-3.6-ck1/include/linux/ioprio.h =================================================================== ---- linux-3.5-ck1.orig/include/linux/ioprio.h 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/include/linux/ioprio.h 2012-08-16 13:20:26.857229048 +1000 +--- linux-3.6-ck1.orig/include/linux/ioprio.h 2012-10-05 23:37:26.974478590 +0200 ++++ linux-3.6-ck1/include/linux/ioprio.h 2012-10-05 23:38:21.093826044 +0200 @@ -52,6 +52,8 @@ enum { */ static inline int task_nice_ioprio(struct task_struct *task) @@ -588,10 +566,10 @@ Index: linux-3.5-ck1/include/linux/iopri return (task_nice(task) + 20) / 5; } -Index: linux-3.5-ck1/include/linux/sched.h +Index: linux-3.6-ck1/include/linux/sched.h =================================================================== ---- linux-3.5-ck1.orig/include/linux/sched.h 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/include/linux/sched.h 2012-08-16 13:22:15.548890213 +1000 +--- linux-3.6-ck1.orig/include/linux/sched.h 2012-10-05 23:37:26.961478740 +0200 ++++ linux-3.6-ck1/include/linux/sched.h 2012-10-05 23:47:10.304372168 +0200 @@ -37,8 +37,15 @@ #define SCHED_FIFO 1 #define SCHED_RR 2 @@ -618,7 +596,7 @@ Index: linux-3.5-ck1/include/linux/sched #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) extern void select_nohz_load_balancer(int stop_tick); extern void set_cpu_sd_state_idle(void); -@@ -1235,15 +1240,31 @@ struct task_struct { +@@ -1240,15 +1245,32 @@ struct task_struct { #ifdef CONFIG_SMP struct llist_node wake_entry; @@ -649,10 +627,11 @@ Index: linux-3.5-ck1/include/linux/sched struct sched_entity se; struct sched_rt_entity rt; +#endif - - #ifdef CONFIG_PREEMPT_NOTIFIERS - /* list of struct preempt_notifier: */ -@@ -1352,6 +1373,9 @@ struct task_struct { ++ + #ifdef CONFIG_CGROUP_SCHED + struct task_group *sched_task_group; + #endif +@@ -1360,6 +1382,9 @@ struct task_struct { int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ cputime_t utime, stime, utimescaled, stimescaled; @@ -662,7 +641,7 @@ Index: linux-3.5-ck1/include/linux/sched cputime_t gtime; #ifndef CONFIG_VIRT_CPU_ACCOUNTING cputime_t prev_utime, prev_stime; -@@ -1585,6 +1609,64 @@ struct task_struct { +@@ -1591,6 +1616,64 @@ struct task_struct { #endif }; @@ -727,7 +706,7 @@ Index: linux-3.5-ck1/include/linux/sched /* Future-safe accessor for struct task_struct's cpus_allowed. */ #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) -@@ -1602,10 +1684,20 @@ struct task_struct { +@@ -1608,10 +1691,20 @@ struct task_struct { */ #define MAX_USER_RT_PRIO 100 @@ -750,7 +729,7 @@ Index: linux-3.5-ck1/include/linux/sched static inline int rt_prio(int prio) { -@@ -1976,7 +2068,7 @@ extern unsigned long long +@@ -1989,7 +2082,7 @@ extern unsigned long long task_sched_runtime(struct task_struct *task); /* sched_exec is called by processes performing an exec */ @@ -759,7 +738,7 @@ Index: linux-3.5-ck1/include/linux/sched extern void sched_exec(void); #else #define sched_exec() {} -@@ -2692,7 +2784,7 @@ static inline unsigned int task_cpu(cons +@@ -2705,7 +2798,7 @@ static inline unsigned int task_cpu(cons return 0; } @@ -768,10 +747,10 @@ Index: linux-3.5-ck1/include/linux/sched { } -Index: linux-3.5-ck1/init/Kconfig +Index: linux-3.6-ck1/init/Kconfig =================================================================== ---- linux-3.5-ck1.orig/init/Kconfig 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/init/Kconfig 2012-08-16 13:20:26.857229048 +1000 +--- linux-3.6-ck1.orig/init/Kconfig 2012-10-05 23:37:27.259475313 +0200 ++++ linux-3.6-ck1/init/Kconfig 2012-10-05 23:38:21.094826032 +0200 @@ -32,6 +32,19 @@ config BUILDTIME_EXTABLE_SORT menu "General setup" @@ -800,7 +779,7 @@ Index: linux-3.5-ck1/init/Kconfig help Provides a simple Resource Controller for monitoring the total CPU consumed by the tasks in a cgroup. -@@ -763,6 +777,7 @@ config CGROUP_PERF +@@ -778,6 +792,7 @@ config CGROUP_PERF menuconfig CGROUP_SCHED bool "Group CPU scheduler" @@ -808,7 +787,7 @@ Index: linux-3.5-ck1/init/Kconfig default n help This feature lets CPU scheduler recognize task groups and control CPU -@@ -1027,6 +1042,7 @@ config UIDGID_STRICT_TYPE_CHECKS +@@ -1042,6 +1057,7 @@ config UIDGID_STRICT_TYPE_CHECKS config SCHED_AUTOGROUP bool "Automatic process group scheduling" @@ -816,7 +795,7 @@ Index: linux-3.5-ck1/init/Kconfig select EVENTFD select CGROUPS select CGROUP_SCHED -@@ -1411,38 +1427,8 @@ config COMPAT_BRK +@@ -1426,38 +1442,8 @@ config COMPAT_BRK On non-ancient distros (post-2000 ones) N is usually a safe choice. @@ -856,22 +835,23 @@ Index: linux-3.5-ck1/init/Kconfig config MMAP_ALLOW_UNINITIALIZED bool "Allow mmapped anonymous memory to be uninitialized" -Index: linux-3.5-ck1/init/main.c +Index: linux-3.6-ck1/init/main.c =================================================================== ---- linux-3.5-ck1.orig/init/main.c 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/init/main.c 2012-08-16 13:20:26.858229035 +1000 -@@ -804,6 +804,7 @@ static noinline int init_post(void) +--- linux-3.6-ck1.orig/init/main.c 2012-10-05 23:37:27.259475313 +0200 ++++ linux-3.6-ck1/init/main.c 2012-10-06 00:44:46.401138713 +0200 +@@ -806,6 +806,8 @@ static noinline int init_post(void) system_state = SYSTEM_RUNNING; numa_default_policy(); + print_scheduler_version(); - ++ current->signal->flags |= SIGNAL_UNKILLABLE; + flush_delayed_fput(); -Index: linux-3.5-ck1/kernel/delayacct.c +Index: linux-3.6-ck1/kernel/delayacct.c =================================================================== ---- linux-3.5-ck1.orig/kernel/delayacct.c 2012-01-05 10:55:44.000000000 +1100 -+++ linux-3.5-ck1/kernel/delayacct.c 2012-08-16 13:20:26.858229035 +1000 +--- linux-3.6-ck1.orig/kernel/delayacct.c 2012-10-05 23:37:27.305474783 +0200 ++++ linux-3.6-ck1/kernel/delayacct.c 2012-10-05 23:38:21.094826032 +0200 @@ -130,7 +130,7 @@ int __delayacct_add_tsk(struct taskstats */ t1 = tsk->sched_info.pcount; @@ -881,10 +861,10 @@ Index: linux-3.5-ck1/kernel/delayacct.c d->cpu_count += t1; -Index: linux-3.5-ck1/kernel/exit.c +Index: linux-3.6-ck1/kernel/exit.c =================================================================== ---- linux-3.5-ck1.orig/kernel/exit.c 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/kernel/exit.c 2012-08-16 13:20:26.858229035 +1000 +--- linux-3.6-ck1.orig/kernel/exit.c 2012-10-05 23:37:27.301474829 +0200 ++++ linux-3.6-ck1/kernel/exit.c 2012-10-05 23:38:21.095826020 +0200 @@ -145,7 +145,7 @@ static void __exit_signal(struct task_st sig->inblock += task_io_get_inblock(tsk); sig->oublock += task_io_get_oublock(tsk); @@ -894,10 +874,10 @@ Index: linux-3.5-ck1/kernel/exit.c } sig->nr_threads--; -Index: linux-3.5-ck1/kernel/posix-cpu-timers.c +Index: linux-3.6-ck1/kernel/posix-cpu-timers.c =================================================================== ---- linux-3.5-ck1.orig/kernel/posix-cpu-timers.c 2012-03-20 17:39:43.000000000 +1100 -+++ linux-3.5-ck1/kernel/posix-cpu-timers.c 2012-08-16 13:20:26.858229035 +1000 +--- linux-3.6-ck1.orig/kernel/posix-cpu-timers.c 2012-10-05 23:37:27.300474841 +0200 ++++ linux-3.6-ck1/kernel/posix-cpu-timers.c 2012-10-05 23:38:21.095826020 +0200 @@ -495,7 +495,7 @@ static void cleanup_timers(struct list_h void posix_cpu_timers_exit(struct task_struct *tsk) { @@ -952,11 +932,11 @@ Index: linux-3.5-ck1/kernel/posix-cpu-ti }; if (task_cputime_expired(&task_sample, &tsk->cputime_expires)) -Index: linux-3.5-ck1/kernel/sysctl.c +Index: linux-3.6-ck1/kernel/sysctl.c =================================================================== ---- linux-3.5-ck1.orig/kernel/sysctl.c 2012-06-01 21:37:23.000000000 +1000 -+++ linux-3.5-ck1/kernel/sysctl.c 2012-08-16 13:20:26.858229035 +1000 -@@ -126,7 +126,12 @@ static int __maybe_unused one = 1; +--- linux-3.6-ck1.orig/kernel/sysctl.c 2012-10-05 23:37:27.300474841 +0200 ++++ linux-3.6-ck1/kernel/sysctl.c 2012-10-05 23:38:21.095826020 +0200 +@@ -127,7 +127,12 @@ static int __maybe_unused one = 1; static int __maybe_unused two = 2; static int __maybe_unused three = 3; static unsigned long one_ul = 1; @@ -970,7 +950,7 @@ Index: linux-3.5-ck1/kernel/sysctl.c #ifdef CONFIG_PRINTK static int ten_thousand = 10000; #endif -@@ -241,7 +246,7 @@ static struct ctl_table sysctl_base_tabl +@@ -247,7 +252,7 @@ static struct ctl_table sysctl_base_tabl { } }; @@ -979,7 +959,7 @@ Index: linux-3.5-ck1/kernel/sysctl.c static int min_sched_granularity_ns = 100000; /* 100 usecs */ static int max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */ static int min_wakeup_granularity_ns; /* 0 usecs */ -@@ -256,6 +261,7 @@ static int max_extfrag_threshold = 1000; +@@ -262,6 +267,7 @@ static int max_extfrag_threshold = 1000; #endif static struct ctl_table kern_table[] = { @@ -987,7 +967,7 @@ Index: linux-3.5-ck1/kernel/sysctl.c { .procname = "sched_child_runs_first", .data = &sysctl_sched_child_runs_first, -@@ -373,6 +379,7 @@ static struct ctl_table kern_table[] = { +@@ -379,6 +385,7 @@ static struct ctl_table kern_table[] = { .extra1 = &one, }, #endif @@ -995,7 +975,7 @@ Index: linux-3.5-ck1/kernel/sysctl.c #ifdef CONFIG_PROVE_LOCKING { .procname = "prove_locking", -@@ -840,6 +847,26 @@ static struct ctl_table kern_table[] = { +@@ -846,6 +853,26 @@ static struct ctl_table kern_table[] = { .proc_handler = proc_dointvec, }, #endif @@ -1022,10 +1002,10 @@ Index: linux-3.5-ck1/kernel/sysctl.c #if defined(CONFIG_S390) && defined(CONFIG_SMP) { .procname = "spin_retry", -Index: linux-3.5-ck1/lib/Kconfig.debug +Index: linux-3.6-ck1/lib/Kconfig.debug =================================================================== ---- linux-3.5-ck1.orig/lib/Kconfig.debug 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/lib/Kconfig.debug 2012-08-16 13:20:26.859229023 +1000 +--- linux-3.6-ck1.orig/lib/Kconfig.debug 2012-10-05 23:37:26.939478992 +0200 ++++ linux-3.6-ck1/lib/Kconfig.debug 2012-10-05 23:38:21.095826020 +0200 @@ -913,7 +913,7 @@ config BOOT_PRINTK_DELAY config RCU_TORTURE_TEST @@ -1035,11 +1015,11 @@ Index: linux-3.5-ck1/lib/Kconfig.debug default n help This option provides a kernel module that runs torture tests -Index: linux-3.5-ck1/include/linux/jiffies.h +Index: linux-3.6-ck1/include/linux/jiffies.h =================================================================== ---- linux-3.5-ck1.orig/include/linux/jiffies.h 2012-01-05 10:55:44.000000000 +1100 -+++ linux-3.5-ck1/include/linux/jiffies.h 2012-08-16 13:20:26.859229023 +1000 -@@ -164,7 +164,7 @@ static inline u64 get_jiffies_64(void) +--- linux-3.6-ck1.orig/include/linux/jiffies.h 2012-10-05 23:37:26.971478624 +0200 ++++ linux-3.6-ck1/include/linux/jiffies.h 2012-10-05 23:38:21.096826008 +0200 +@@ -173,7 +173,7 @@ static inline u64 get_jiffies_64(void) * Have the 32 bit jiffies value wrap 5 minutes after boot * so jiffies wrap bugs show up earlier. */ @@ -1048,10 +1028,10 @@ Index: linux-3.5-ck1/include/linux/jiffi /* * Change timeval to jiffies, trying to avoid the -Index: linux-3.5-ck1/drivers/cpufreq/cpufreq.c +Index: linux-3.6-ck1/drivers/cpufreq/cpufreq.c =================================================================== ---- linux-3.5-ck1.orig/drivers/cpufreq/cpufreq.c 2012-06-01 21:37:21.000000000 +1000 -+++ linux-3.5-ck1/drivers/cpufreq/cpufreq.c 2012-08-16 13:20:26.859229023 +1000 +--- linux-3.6-ck1.orig/drivers/cpufreq/cpufreq.c 2012-10-05 23:37:27.003478256 +0200 ++++ linux-3.6-ck1/drivers/cpufreq/cpufreq.c 2012-10-05 23:38:21.096826008 +0200 @@ -28,6 +28,7 @@ #include <linux/cpu.h> #include <linux/completion.h> @@ -1060,7 +1040,7 @@ Index: linux-3.5-ck1/drivers/cpufreq/cpu #include <linux/syscore_ops.h> #include <trace/events/power.h> -@@ -1457,6 +1458,12 @@ int __cpufreq_driver_target(struct cpufr +@@ -1476,6 +1477,12 @@ int __cpufreq_driver_target(struct cpufr target_freq, relation); if (cpu_online(policy->cpu) && cpufreq_driver->target) retval = cpufreq_driver->target(policy, target_freq, relation); @@ -1073,10 +1053,10 @@ Index: linux-3.5-ck1/drivers/cpufreq/cpu return retval; } -Index: linux-3.5-ck1/drivers/cpufreq/cpufreq_ondemand.c +Index: linux-3.6-ck1/drivers/cpufreq/cpufreq_ondemand.c =================================================================== ---- linux-3.5-ck1.orig/drivers/cpufreq/cpufreq_ondemand.c 2012-06-01 21:37:21.000000000 +1000 -+++ linux-3.5-ck1/drivers/cpufreq/cpufreq_ondemand.c 2012-08-16 13:20:26.859229023 +1000 +--- linux-3.6-ck1.orig/drivers/cpufreq/cpufreq_ondemand.c 2012-10-05 23:37:27.002478268 +0200 ++++ linux-3.6-ck1/drivers/cpufreq/cpufreq_ondemand.c 2012-10-05 23:38:21.096826008 +0200 @@ -28,8 +28,8 @@ * It helps to keep variable names smaller, simpler */ @@ -1101,10 +1081,10 @@ Index: linux-3.5-ck1/drivers/cpufreq/cpu * * Any frequency increase takes it to the maximum frequency. * Frequency reduction happens at minimum steps of -Index: linux-3.5-ck1/drivers/cpufreq/cpufreq_conservative.c +Index: linux-3.6-ck1/drivers/cpufreq/cpufreq_conservative.c =================================================================== ---- linux-3.5-ck1.orig/drivers/cpufreq/cpufreq_conservative.c 2012-03-20 17:39:41.000000000 +1100 -+++ linux-3.5-ck1/drivers/cpufreq/cpufreq_conservative.c 2012-08-16 13:20:26.859229023 +1000 +--- linux-3.6-ck1.orig/drivers/cpufreq/cpufreq_conservative.c 2012-10-05 23:37:27.003478256 +0200 ++++ linux-3.6-ck1/drivers/cpufreq/cpufreq_conservative.c 2012-10-05 23:38:21.096826008 +0200 @@ -29,8 +29,8 @@ * It helps to keep variable names smaller, simpler */ @@ -1116,11 +1096,11 @@ Index: linux-3.5-ck1/drivers/cpufreq/cpu /* * The polling frequency of this governor depends on the capability of -Index: linux-3.5-ck1/arch/x86/Kconfig +Index: linux-3.6-ck1/arch/x86/Kconfig =================================================================== ---- linux-3.5-ck1.orig/arch/x86/Kconfig 2012-07-23 22:09:12.000000000 +1000 -+++ linux-3.5-ck1/arch/x86/Kconfig 2012-08-16 13:20:26.860229011 +1000 -@@ -795,15 +795,7 @@ config SCHED_MC +--- linux-3.6-ck1.orig/arch/x86/Kconfig 2012-10-05 23:37:26.856479947 +0200 ++++ linux-3.6-ck1/arch/x86/Kconfig 2012-10-05 23:38:21.097825996 +0200 +@@ -797,15 +797,7 @@ config SCHED_MC increased overhead in some places. If unsure say N here. config IRQ_TIME_ACCOUNTING @@ -1137,10 +1117,10 @@ Index: linux-3.5-ck1/arch/x86/Kconfig source "kernel/Kconfig.preempt" -Index: linux-3.5-ck1/kernel/sched/bfs.c +Index: linux-3.6-ck1/kernel/sched/bfs.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ linux-3.5-ck1/kernel/sched/bfs.c 2012-08-16 13:27:10.367258721 +1000 +--- /dev/null 2012-10-05 22:50:08.959930518 +0200 ++++ linux-3.6-ck1/kernel/sched/bfs.c 2012-10-06 00:22:53.154238527 +0200 @@ -0,0 +1,7448 @@ +/* + * kernel/sched/bfs.c, was kernel/sched.c @@ -8097,7 +8077,7 @@ Index: linux-3.5-ck1/kernel/sched/bfs.c + switch (action & ~CPU_TASKS_FROZEN) { + case CPU_ONLINE: + case CPU_DOWN_FAILED: -+ cpuset_update_active_cpus(); ++ cpuset_update_active_cpus(true); + return NOTIFY_OK; + default: + return NOTIFY_DONE; @@ -8109,7 +8089,7 @@ Index: linux-3.5-ck1/kernel/sched/bfs.c +{ + switch (action & ~CPU_TASKS_FROZEN) { + case CPU_DOWN_PREPARE: -+ cpuset_update_active_cpus(); ++ cpuset_update_active_cpus(false); + return NOTIFY_OK; + default: + return NOTIFY_DONE; @@ -8590,10 +8570,10 @@ Index: linux-3.5-ck1/kernel/sched/bfs.c + return smt_gain; +} +#endif -Index: linux-3.5-ck1/kernel/sched/Makefile +Index: linux-3.6-ck1/kernel/sched/Makefile =================================================================== ---- linux-3.5-ck1.orig/kernel/sched/Makefile 2012-07-23 22:09:13.000000000 +1000 -+++ linux-3.5-ck1/kernel/sched/Makefile 2012-08-16 13:20:26.862228987 +1000 +--- linux-3.6-ck1.orig/kernel/sched/Makefile 2012-10-05 23:37:27.304474794 +0200 ++++ linux-3.6-ck1/kernel/sched/Makefile 2012-10-05 23:38:21.099825972 +0200 @@ -11,8 +11,12 @@ ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer endif Codice:
gimli@sertan ~/Desktop $ uname -a Linux sertan 3.6.0-gentoo-ck1 #1 SMP PREEMPT Fri Oct 5 20:47:53 CEST 2012 x86_64 Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz GenuineIntel GNU/Linux
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) Ultima modifica di Gimli[2BV!2B] : 06-10-2012 alle 00:41. |
![]() |
![]() |
![]() |
#145 |
Senior Member
Iscritto dal: Sep 2001
Città: Perugia
Messaggi: 1988
|
Ottimo lavoro, grazie!
Purtroppo Con deve aver avuto problemi gravi, sul blog scrive che ha subito una tragedia in famiglia ed è in ritardo con la patch per il 3.6 ![]() Appena ho un attimo testo la tua patch!!! ![]()
__________________
Ho concluso affari con: schumyFast,marcuspe@,MENTIRA,melu,Markap,One1ros,bottoni, Entropi@,DARIO-GT,unavocelontana ,tigre652,prodigy,V4n{}u|sH,blackmagic61,DDA,giugeo, sancelli,Franx1508,stemanca,agostino333, ReiserDarkside,hornet75,ibanez,K4d4sh,wolf3,pctillo,Zontar, aristippo,assembly,jeki75,]Rik`[,Caballus,Elfebo1,Haraiki, TexV,unlocked,No Mercy,antoniousa11 |
![]() |
![]() |
![]() |
#146 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Oh, cavolo, l'ho letto adesso nei commenti dell'ultimo post
![]()
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#147 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Da un paio di settimane Con Kolivas ha aggiornato la sua patch al kernel 3.7.x.
Riporto anche il comando di compilazione che utilizzo in Gentoo in questo periodo. Codice:
mount /boot ; KCFLAGS="-march=native -O2 -pipe" KCPPFLAGS="-march=native -O2 -pipe" make -j9 && make modules_install && make install && grub2-mkconfig -o /boot/grub2/grub.cfg
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#148 | |
Senior Member
Iscritto dal: Sep 2001
Città: Perugia
Messaggi: 1988
|
Quote:
![]() Gimli volevo farti una domanda OT ma non troppo: ho visto che con le nuone gcc si può usare una nuova ottimizzazione -Ofast che da quando ho letto dovrebbe essere -O3 che attiva qualche altra ottimizzazione. Ma a differenza di -O3 che fino a poco tempo fa veniva sconsigliata (francamente l'ho sempre usata per compilare mplayer e mi dava diversi frame di vantaggio nel bench video rispetto a -O2 mantenendo una perfetta stablità), la -Ofast viene consigliata, e come difetto danno solo un aumento del tempo di compilazione. Appena ho tempo farò qualche test su guadagno prestazionale e memoria usata, tu che ne pensi?
__________________
Ho concluso affari con: schumyFast,marcuspe@,MENTIRA,melu,Markap,One1ros,bottoni, Entropi@,DARIO-GT,unavocelontana ,tigre652,prodigy,V4n{}u|sH,blackmagic61,DDA,giugeo, sancelli,Franx1508,stemanca,agostino333, ReiserDarkside,hornet75,ibanez,K4d4sh,wolf3,pctillo,Zontar, aristippo,assembly,jeki75,]Rik`[,Caballus,Elfebo1,Haraiki, TexV,unlocked,No Mercy,antoniousa11 |
|
![]() |
![]() |
![]() |
#149 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Le ottimizzazioni più spinte della 2 sono rischiose con il kernel perché non garantiscono che il codice si comporti esattamente come è stato pensato/scritto.
Questo non è solitamente un problema serissimo in programmi normali. Ricordo che alcune librerie multimediali possono guadagnare qualcosa ed alcune mi pare siano testate proprio con -O3; anche Chromium/Chrome mi risulta sia compilato di default con -O3. Il kernel contiene codice particolare, varie porzioni di assembler, ecc... Per esempio credo sia possibile che alcune ottimizzazioni possano decidere di modificare sequenze di chiamate che potrebbero sembrare equivalenti in programmi user-space, ottenendo invece risultati diversi quando si dialoga direttamente con l'hardware o si devono mantenere strette sincronizzazioni. Se dovessero nascere degli errori li riscontreresti solo tu e chi avrà compilato con un config simile, lo stesso livello di ottimizzazioni ed hardware simile (lasciandoti praticamente solo col tuo problema), rendendo l'uso del sistema più frustrante solo per guadagnare un 5% di performance o giù di lì. Personalmente mi sono accontentato di provare solo -march=native, che non sembra aver generato problemi.
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#150 |
Senior Member
Iscritto dal: Sep 2001
Città: Perugia
Messaggi: 1988
|
Per caso sai come inserire i flag di ottimizzazione compilando su ubuntu con il metodo standard che per me è molto più facile e veloce (make config e make-kpkg) ?
ps: è finalmente uscita la patch bfs e ck1 rispettiva per il kernel 3.8
__________________
Ho concluso affari con: schumyFast,marcuspe@,MENTIRA,melu,Markap,One1ros,bottoni, Entropi@,DARIO-GT,unavocelontana ,tigre652,prodigy,V4n{}u|sH,blackmagic61,DDA,giugeo, sancelli,Franx1508,stemanca,agostino333, ReiserDarkside,hornet75,ibanez,K4d4sh,wolf3,pctillo,Zontar, aristippo,assembly,jeki75,]Rik`[,Caballus,Elfebo1,Haraiki, TexV,unlocked,No Mercy,antoniousa11 |
![]() |
![]() |
![]() |
#151 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Ho appena compilato un 3.8.2-ck1 in macchina virtuale Debian Sid usando il nuovo comando per kernel >= 3.0:
Codice:
fakeroot make -j5 KCFLAGS="-march=native -mtune=native -O2" KCPPFLAGS="-march=native -mtune=native -O2" KDEB_PKGVERSION=1.0 deb-pkg Pacchetti prodotti: Codice:
linux-firmware-image_1.0_amd64.deb linux-headers-3.8.2-ck1_1.0_amd64.deb linux-image-3.8.2-ck1_1.0_amd64.deb linux-libc-dev_1.0_amd64.deb
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#152 |
Senior Member
Iscritto dal: Sep 2001
Città: Perugia
Messaggi: 1988
|
Grande!!!!! Con quel comando sono riuscito a completare la compilazione con -Ofast!!! Lascio il computer acceso in test questa notte, sperando di non fare fuori la partizione con qualche driver disco sballato dalle ottimizzazioni...a presto i benchmark e le considerazioni!!
![]() Edit: Come non detto, il kernel non parte perchè si blocca al montaggio del ramdisk (grazie al cavolo, ho estirpato tutto dal mio kernel), non esiste un modo di compilare senza? Ho provato con --help ma non c'è nessuna opzione per eliminare il initrd
__________________
Ho concluso affari con: schumyFast,marcuspe@,MENTIRA,melu,Markap,One1ros,bottoni, Entropi@,DARIO-GT,unavocelontana ,tigre652,prodigy,V4n{}u|sH,blackmagic61,DDA,giugeo, sancelli,Franx1508,stemanca,agostino333, ReiserDarkside,hornet75,ibanez,K4d4sh,wolf3,pctillo,Zontar, aristippo,assembly,jeki75,]Rik`[,Caballus,Elfebo1,Haraiki, TexV,unlocked,No Mercy,antoniousa11 Ultima modifica di Axl_Mas : 06-03-2013 alle 07:06. |
![]() |
![]() |
![]() |
#153 | |
Senior Member
Iscritto dal: Aug 2002
Città: Roma
Messaggi: 1473
|
Quote:
Certo! quando configuri il kernel per la compilazione i drivers relativi al filesystem su cui risiede la root e il controller del disco di sistema devono essere indicati con "Built-In" e non come moduli. |
|
![]() |
![]() |
![]() |
#154 | |
Senior Member
Iscritto dal: Sep 2001
Città: Perugia
Messaggi: 1988
|
Quote:
Comunque in attesa di trovare il comando adatto ho rispuntato il supporto al ramdisk e ricompilato tutto....ora vi scrivo dalla mia lubuntu con kernel compilato per il mio k8 e con l'opzione -Ofast, per ora sembra stabile ma ad occhio non noto differenze di velocità o nei tempi di risposta, appena ho tempo faccio qualche benchmark ![]()
__________________
Ho concluso affari con: schumyFast,marcuspe@,MENTIRA,melu,Markap,One1ros,bottoni, Entropi@,DARIO-GT,unavocelontana ,tigre652,prodigy,V4n{}u|sH,blackmagic61,DDA,giugeo, sancelli,Franx1508,stemanca,agostino333, ReiserDarkside,hornet75,ibanez,K4d4sh,wolf3,pctillo,Zontar, aristippo,assembly,jeki75,]Rik`[,Caballus,Elfebo1,Haraiki, TexV,unlocked,No Mercy,antoniousa11 |
|
![]() |
![]() |
![]() |
#155 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Non ho trovato un'opzione per specificare che non si desidera l'initrd alla creazione dei pacchetti, ma è possibile specificarlo all'installazione:
Codice:
INITRD=No dpkg -i linux-image-3.8.2-ck1_1.0_amd64.deb Ho poi provato ad installare lo stesso kernel in una Squeeze, ho rimosso l'initrd da /boot ed ho rigenerato il grub.cfg con update-grub2: il sistema si avvia normalmente. Altra cosa che non conoscevo: se non si disattivano accuratamente tutte le opzioni relative al debug è probabile che si ottengano moduli molto grandi rimpinzati di informazioni di debug. Si può far fare una cura dimagrante a base della variabile INSTALL_MOD_STRIP: Codice:
fakeroot make -j5 KCFLAGS="-march=native -mtune=native -O2" KCPPFLAGS="-march=native -mtune=native -O2" KDEB_PKGVERSION=1.0 INSTALL_MOD_STRIP=1 deb-pkg
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#156 | |
Senior Member
Iscritto dal: Aug 2002
Città: Roma
Messaggi: 1473
|
Quote:
Ottimo suggerimento! Nel caso in cui invece si utilizzasse il metodo standard di compilazione del kernel (non il debian-way), come fare per eliminare i simboli di debug? |
|
![]() |
![]() |
![]() |
#157 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
@nicfio, mi risulta si debba utilizzare alla fase modules_install:
Codice:
make INSTALL_MOD_STRIP=1 modules_install Ricordo che *andre* aveva riportato di osservare un gran consumo di spazio da parte degli oggetti di compilazione (ed immagino che anche il kernel risultasse ciccio); suppongo fosse questo il motivo. Per evitare che i prodotti intermedi di compilazione occupino tanto spazio è necessario disattivare le opzioni nel .config Queste sono le sole opzioni relative al debug che non credo sia possibile disattivare (architettura amd64): Codice:
sertan ~ # grep DEBUG /usr/src/linux/.config | grep -v \# CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_X86_DEBUGCTLMSR=y CONFIG_DEBUG_KERNEL=y CONFIG_HAVE_DEBUG_KMEMLEAK=y
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#158 |
Senior Member
Iscritto dal: Sep 2001
Città: Perugia
Messaggi: 1988
|
Gimli sei un grande!!!
Ora ho il kernel ottimizzato al massimo, ho aggiunto anche la stringa da te suggerita anche se comunque già ho disabilitato tutte le opzioni di debug!
__________________
Ho concluso affari con: schumyFast,marcuspe@,MENTIRA,melu,Markap,One1ros,bottoni, Entropi@,DARIO-GT,unavocelontana ,tigre652,prodigy,V4n{}u|sH,blackmagic61,DDA,giugeo, sancelli,Franx1508,stemanca,agostino333, ReiserDarkside,hornet75,ibanez,K4d4sh,wolf3,pctillo,Zontar, aristippo,assembly,jeki75,]Rik`[,Caballus,Elfebo1,Haraiki, TexV,unlocked,No Mercy,antoniousa11 |
![]() |
![]() |
![]() |
#159 |
Senior Member
Iscritto dal: Feb 2006
Città: Parma
Messaggi: 3010
|
Il tempo schifoso m'ha spinto a revisionare il kernel (3.11.6-gentoo-ck1).
Risultati interessanti: Codice:
sertan ~ # genlop -t app-office/libreoffice * app-office/libreoffice Sat Oct 5 13:10:41 2013 >>> app-office/libreoffice-4.1.2.3 merge time: 1 hour, 1 minute and 16 seconds. Sun Oct 20 20:05:58 2013 >>> app-office/libreoffice-4.1.2.3 merge time: 49 minutes and 57 seconds. sertan ~ # genlop -t media-libs/mesa * media-libs/mesa Sun Oct 20 16:39:47 2013 >>> media-libs/mesa-9.2.1 merge time: 2 minutes and 44 seconds. Sun Oct 20 16:54:07 2013 >>> media-libs/mesa-9.2.1 merge time: 2 minutes and 21 seconds.
Ho anche scoperto l'esistenza dello strumento turbostat, che tra l'altro diventa meno utile adottando i driver Intel CONFIG_X86_INTEL_PSTATE perché questi aggiornano correttamente i file in /sys: Codice:
sertan linux # cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq 3570000 3774000 3774000 3740000 3808000 3502000 3366000 1768000
__________________
~Breve riferimento ai comandi GNU/Linux (ormai non molto breve...) |
![]() |
![]() |
![]() |
#160 |
Member
Iscritto dal: Aug 2006
Messaggi: 209
|
Ciao, ho compilato un kernel 3.12.10 su arch64 con queste modifiche:
Patch bfs 0.44 scheduler bfq v0.7 Trasparent Hugepage UKSM attivato march=native impostato timer=1000hz (sia ticketless che non) attivato Impostato rr_interval=1 e poi ho modificato 99-sysctl.conf in questo modo Codice:
vm.dirty_background_bytes=33554432 vm.dirty_background_ratio=0 vm.dirty_bytes=100663296 vm.dirty_expire_centisecs=3000 vm.dirty_ratio=0 vm.dirty_writeback_centisecs=500 Con sched_iso, schedtool ecc.. posso aumentare la priorita' di X (a proprosito, tengo attiva l'accelerazione sna in xorg.conf). Potete consigliarmi qualche altra modifica per aumentare la reattivita' del mio sistema, sia nei casi in cui la cpu e' impegnata, sia quando c'e molta attivita i/o (con tipo un 20-30% di swap occupata)? Vorrei raggiungere la reattivita' di windows xp...ricordo che su un vecchio pentium4 3Ghz 2gb ram e 6600gt facevo una codifica x264 mentre giocavo a battflefield 42. E soprattutto mai avuto l'orribile problema i/o con le chiavette che pare affliggere tutti i linux http://lwn.net/Articles/572911/ Le mie specifiche attuali sono: su9300, 4gb ram, hd 4500,ssd vertex3 e uso btrfs con compressione LZO attivata. Grazie. Ultima modifica di Xemertix : 14-02-2014 alle 01:02. |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 02:11.