linux-next: Tree for Aug 4
Subsystems (5)
Hi all,
Just in case anyone needs reminding: Please do not add anything destined for v3.2 into linux-next included trees until after v3.1-rc1.
The powerpc allyesconfig build (at least) fails today.
Changes since 20110803:
The staging.current tree lost its build failure.
The devicetree tree gained a build failure for which I reverted a commit.
The moduleh tree lost a conflict but gained another against the staging.current tree another build failure for which I added a fix patch.
The akpm tree gained another build fix.
----------------------------------------------------------------------------
I have created today's linux-next tree atgit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" as mentioned in the FAQ on the wiki (see below).
You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the final fixups (if any), it is also built with powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and allyesconfig (minus CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc and sparc64 defconfig. These builds also have CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and CONFIG_DEBUG_INFO disabled when necessary.
Below is a summary of the state of the merge.
We are up to 200 trees (counting Linus' and 28 trees of patches pending for Linus' tree), more are welcome (even if they are currently empty). Thanks to those who have contributed, and to those who haven't, please do.
Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds.
Thanks to Randy Dunlap for doing many randconfig builds.
There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ . Thanks to Frank Seidel.
Signature · 359 lines
Cheers, Stephen Rothwell [email protected] $ git checkout master $ git reset --hard stable Merging origin/master Merging fixes/fixes Merging kbuild-current/rc-fixes Merging arm-current/master Merging m68k-current/for-linus Merging powerpc-merge/merge Merging 52xx-and-virtex-current/powerpc/merge Merging sparc-current/master Merging scsi-rc-fixes/master Merging net-current/master Merging sound-current/for-linus Merging pci-current/for-linus Merging wireless-current/master Merging driver-core.current/driver-core-linus Merging tty.current/tty-linus Merging usb.current/usb-linus Merging staging.current/staging-linus Merging cpufreq-current/fixes Merging input-current/for-linus Merging md-current/for-linus Merging audit-current/for-linus Merging crypto-current/master Merging ide-curent/master Merging dwmw2/master Merging sh-current/sh-fixes-for-linus Merging rmobile-current/rmobile-fixes-for-linus Merging fbdev-current/fbdev-fixes-for-linus Merging devicetree-current/devicetree/merge Merging spi-current/spi/merge Merging arm/for-next Merging arm-lpae/for-next CONFLICT (content): Merge conflict in arch/arm/include/asm/pgalloc.h CONFLICT (content): Merge conflict in arch/arm/include/asm/pgtable.h CONFLICT (content): Merge conflict in arch/arm/include/asm/proc-fns.h CONFLICT (content): Merge conflict in arch/arm/include/asm/tlb.h CONFLICT (content): Merge conflict in arch/arm/mm/context.c CONFLICT (content): Merge conflict in arch/arm/mm/proc-v7.S Merging arm-soc/for-next CONFLICT (content): Merge conflict in arch/arm/mach-exynos4/pm.c CONFLICT (content): Merge conflict in arch/arm/mach-imx/mm-imx25.c CONFLICT (content): Merge conflict in arch/arm/mach-imx/mm-imx31.c CONFLICT (content): Merge conflict in arch/arm/mach-imx/mm-imx35.c CONFLICT (content): Merge conflict in arch/arm/mach-mx5/mm.c CONFLICT (content): Merge conflict in arch/arm/mach-omap2/cm-regbits-44xx.h Merging at91/at91-next Merging davinci/davinci-next Merging i.MX/for-next Merging linux-spec/for-next Merging msm/for-next CONFLICT (content): Merge conflict in arch/arm/mach-msm/io.c Merging omap/for-next Merging pxa/for-next Merging samsung/next-samsung Merging s5p/for-next CONFLICT (content): Merge conflict in arch/arm/mach-exynos4/Kconfig CONFLICT (content): Merge conflict in arch/arm/mach-exynos4/mach-smdkc210.c Merging tegra/for-next Merging ux500-core/ux500-core Merging xilinx/arm-next Merging blackfin/for-linus Merging cris/for-next Merging ia64/test Merging m68k/for-next Merging m68knommu/for-next Merging microblaze/next Merging mips/mips-for-linux-next Merging openrisc/for-upstream Merging parisc/for-next Merging powerpc/next Merging 4xx/next Merging 52xx-and-virtex/powerpc/next Merging galak/next Merging s390/features Merging sh/sh-latest Merging rmobile/rmobile-latest Merging sparc/master Merging tile/master Merging unicore32/unicore32 Merging xtensa/master Merging ceph/for-next CONFLICT (content): Merge conflict in fs/ceph/export.c Merging cifs/master Merging configfs/linux-next Merging ecryptfs/next Merging ext3/for_next Merging ext4/dev Merging fatfs/master Merging fuse/for-next Merging gfs2/master Merging hfsplus/for-next Merging jfs/next Merging logfs/master CONFLICT (content): Merge conflict in fs/logfs/logfs.h Merging nfs/linux-next Merging nfsd/nfsd-next Merging nilfs2/for-next Merging ocfs2/linux-next Merging omfs/for-next Merging squashfs/master Merging udf/for_next Merging v9fs/for-next Merging ubifs/linux-next Merging xfs/master Merging vfs/for-next Merging vfs-scale/vfs-scale-working Merging pci/linux-next Merging of-pci/of-pci Merging hid/for-next Merging quilt/i2c Merging bjdooks-i2c/next-i2c Merging quilt/jdelvare-hwmon Merging hwmon-staging/hwmon-next Merging quilt/kernel-doc Merging docs/docs-move Merging v4l-dvb/master Merging kbuild/for-next Merging kconfig/for-next Merging ide/master Merging libata/NEXT Merging infiniband/for-next Merging acpi/test Merging idle-test/idle-test Merging powertools/tools-test Merging cpupowerutils/master Merging ieee1394/for-next Merging ubi/linux-next Merging dlm/next Merging swiotlb/master Merging ibft/master Merging scsi/master Merging iscsi-target/for-next Merging slave-dma/next Merging async_tx/next Merging net/master Merging wireless/master Merging bluetooth/master Merging mtd/master Merging l2-mtd/master CONFLICT (content): Merge conflict in drivers/mtd/maps/lantiq-flash.c CONFLICT (content): Merge conflict in drivers/mtd/maps/pxa2xx-flash.c Merging crypto/master Merging sound/for-next Merging sound-asoc/for-next Merging cpufreq/next Merging quilt/rr Merging input/next Merging input-mt/next Merging lsm/for-next Merging block/for-next Merging quilt/device-mapper Merging embedded/master Merging firmware/master Merging pcmcia/master Merging battery/master Merging leds/for-mm CONFLICT (content): Merge conflict in drivers/leds/Kconfig Merging backlight/for-mm Merging mmc/mmc-next CONFLICT (content): Merge conflict in drivers/mmc/host/sdhci-esdhc-imx.c Merging kgdb/kgdb-next Merging slab/for-next Merging uclinux/for-next Merging md/for-next Merging mfd/for-next Merging hdlc/hdlc-next Merging drm/drm-next Merging fbdev/master Merging viafb/viafb-next Merging omap_dss2/for-next Merging voltage/for-next Merging security-testing/next Merging selinux/master Merging lblnet/master Merging agp/agp-next Merging watchdog/master CONFLICT (content): Merge conflict in drivers/watchdog/nv_tco.c Merging bdev/master Merging dwmw2-iommu/master Merging cputime/cputime Merging osd/linux-next Merging jc_docs/docs-next Merging nommu/master Merging trivial/for-next Merging audit/for-next Merging suspend/linux-next Merging apm/for-next Merging fsnotify/for-next Merging irda/for-next Merging i7core_edac/linux_next Merging i7300_edac/linux_next Merging devicetree/devicetree/next Merging spi/spi/next Merging gpio/gpio/next Merging tip/auto-latest Merging rcu/rcu/next Merging kvm/linux-next Merging oprofile/for-next Merging ptrace/ptrace Merging xen/upstream/xen Merging xen-two/linux-next Merging xen-pvhvm/linux-next Merging edac-amd/for-next Merging percpu/for-next Merging workqueues/for-next Merging sfi/sfi-test Merging asm-generic/next Merging drivers-x86/linux-next CONFLICT (content): Merge conflict in Documentation/feature-removal-schedule.txt Merging hwpoison/hwpoison Merging sysctl/master Merging namespace/master Merging regmap/for-next Merging driver-core/driver-core-next Merging tty/tty-next Merging usb/usb-next Merging staging/staging-next Merging bkl-config/config Merging tmem/linux-next Merging writeback/next Merging arm-dt/devicetree/arm-next Merging scsi-post-merge/merge-base:master Merging moduleh/module.h-split CONFLICT (content): Merge conflict in drivers/dma/ste_dma40.c CONFLICT (content): Merge conflict in drivers/staging/dt3155v4l/dt3155v4l.c Applying: dm: use export.h instead of module.h where possible Applying: block: bsg-lib.c needs export.h not module.h Applying: power: max8998_charger.c needs module.h Applying: regulator: aat2870 needs module.h Applying: power_supply: max8997_charger.c need to include module.h $ git checkout akpm Applying: init_fault_attr_dentries() is used to export fault_attr via debugfs. But Applying: As the comment explains, the intention of the code is to clear the Applying: 1. 26c4caea "don't allow duplicate entries in listener mode" Applying: When send_cpu_listeners() finds the orphaned listener it marks it as Applying: The current hyper-optimized functions are overkill if you simply want to Applying: Fix new kernel-doc warning in fs/dcache.c: Applying: Expand root=PARTUUID=UUID syntax to support selecting a root partition by Applying: This patch makes two changes: Applying: Update kernel-parameters.txt to point users to the authoritative comment Applying: Update the module parameters when platform data is used. This means that Applying: __GFP_OTHER_NODE is used for NUMA allocations on behalf of other nodes. Applying: On thread exit shm_exit_ns() is called, it uses shm_ids(ns).rw_mutex. It Applying: Because of x86-implement-strict-user-copy-checks-for-x86_64.patch Applying: When no floppy is found the module code can be released while a timer Applying: kernel/fork.c:267: error: implicit declaration of function Applying: arch/cris/arch-v10/drivers/sync_serial.c:628: error: 'ret' undeclared (first use in this function) Applying: arch/cris/arch-v10/drivers/sync_serial.c:961: error: conflicting types for 'sync_serial_ioctl' Applying: arch/cris/arch-v10/kernel/irq.c:239: error: implicit declaration of function 'kgdb_init' Applying: lockdep_init_map() only initializes parts of lockdep_map and triggers Applying: The parameter's origin type is long. On an i386 architecture, it can Applying: Add support for Aspire 1410 BIOS v1.3314. Fixes the following error: Applying: This makes the iris driver use the platform API, so it is properly exposed Applying: On x86_32 casting the unsigned int result of get_random_int() to long may Applying: This new driver replaces the old PCEngines Alix 2/3 LED driver with a new Applying: Cc: Ed Wildgoose <[email protected]> Applying: Replace the bubble sort in sanitize_e820_map() with a call to the generic Applying: The x86 timer interrupt handler is the only handler not traced in the Applying: The current interrupt traces from irq_handler_entry and irq_handler_exit Applying: Don't allow everybody to use a modem. Applying: The address limit is already set in flush_old_exec() so this Applying: A call to va_copy() should always be followed by a call to va_end() in the Applying: Don't dereference em if it's NULL or an error pointer. Applying: When doing a single register write we use work_buf for both the register Applying: Some messing with error codes to return 0 on out id's and match Applying: fb_set_suspend() must be called with the console semaphore held, which Applying: hwmon was using an idr with a NULL pointer, so convert to an Applying: A straightforward looking use of idr for a device id. Applying: Unless I'm very much missing something these tests are intended to check Applying: The address limit is already set in flush_old_exec() so this Applying: The address limit is already set in flush_old_exec() so this Applying: backlight_device_register() returns ERR_PTR() on error. Applying: 1. current implementation tests wrong value for setting aat2870_bl->max_current. Applying: i386 allmodconfig: Applying: Add new check (assert_init) to make sure objects are initialized and Applying: del_timer_sync() calls debug_object_assert_init() to assert that a timer Applying: ext4_{set,clear}_bit() is defined as __test_and_{set,clear}_bit_le() for Applying: The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned, Applying: The address limit is already set in flush_old_exec() so those calls to Applying: When do pci remove/rescan on system that have more iommus, got Applying: The current implementation of dmi_name_in_vendors() is an invitation to Applying: The address limit is already set in flush_old_exec() so those calls to Applying: For headers that get exported to userland and make use of u32 style Applying: Fix sparse warnings of right shift bigger than source value size: Applying: We leak in drivers/scsi/aacraid/commctrl.c::aac_send_raw_srb() : Applying: Some mangling of errors was necessary to maintain current interface. Applying: This does involve additional use of the spin lock in idr.c. Is this an Applying: Instead of open coding this function use kstrtoul_from_user() directly. Applying: brd_make_request() always returns 0, which doesn't make much sense. Applying: The address limit is already set in flush_old_exec() so this assignment of Applying: The basic idea behind cross memory attach is to allow MPI programs doing Applying: - Add x86_64 specific wire up Applying: acct_isolated of compaction uses page_lru_base_type which returns only Applying: Change ISOLATE_XXX macro with bitwise isolate_mode_t type. Normally, Applying: In async mode, compaction doesn't migrate dirty or writeback pages. So, Applying: In __zone_reclaim case, we don't want to shrink mapped page. Nonetheless, Applying: unmap_and_move() is one a big messy function. Clean it up. Applying: radix_tree_tag_get()'s BUG (when it sees a tag after saw_unset_tag) was Applying: per-task block plug can reduce block queue lock contention and increase Applying: The tracing ring-buffer used this function briefly, but not anymore. Applying: After selecting a task to kill, the oom killer iterates all processes and Applying: A patchset to extend tmpfs to MAX_LFS_FILESIZE by abandoning its peculiar Applying: If swap entries are to be stored along with struct page pointers in a Applying: The maximum size of a shmem/tmpfs file has been limited by the maximum Applying: While it's at its least, make a number of boring nitpicky cleanups to Applying: Bring truncate.c's code for truncate_inode_pages_range() inline into Applying: Disable the toy swapping implementation in shmem_writepage() - it's hard Applying: Convert shmem_unuse_inode() to use a lockless gang lookup of the radix Applying: Convert shmem_getpage_gfp(), the engine-room of shmem, to expect page or Applying: Remove mem_cgroup_shmem_charge_fallback(): it was only required when we Applying: Convert shmem_writepage() to use shmem_delete_from_page_cache() to use Applying: But we've not yet removed the old swp_entry_t i_direct[16] from Applying: Remove PageSwapBacked (!page_is_file_cache) cases from Applying: Fix NULL dereference I introduced in mincore_page(). Applying: We have already acknowledged that swapoff of a tmpfs file is slower than Applying: Make the radix_tree exceptional cases, mostly in filemap.c, clearer. Applying: Expand the fs/Kconfig "help" info to clarify why it's a bad idea to Applying: Expand the fs/Kconfig "help" info to clarify why you might need to select Applying: Signed-off-by: Andy Shevchenko <[email protected]> Applying: The current implementation of the /dev/hpet driver couples opening the Applying: smp_call_function() only lets all other CPUs execute a specific function, Applying: auto_demotion_disable is called only for online CPUs. For hotplugged Applying: Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: Applying: Strict user copy checks are only really supported on x86_32 even though Applying: The help text for this config is duplicated across the x86, parisc, and Applying: s/lib-/obj-/ for usercopy.o Applying: After an "unexpected" reboot, I found this Oops in my logs: Applying: In the move of the lis3 driver, the hp_accel.c file got dropped from the Applying: Add axis correction for HP EliteBook 2730p. Applying: Add axis correction for HP EliteBook 8540w. Applying: Add axis correction for HP ProBook 6555b. Applying: Adapt the help text for CONFIG_HP_ACCEL to the move of Applying: Signed-off-by: Ilkka Koskinen <[email protected]> Applying: Signed-off-by: Ilkka Koskinen <[email protected]> Applying: Change exported functions to use the device given as parameter Applying: Signed-off-by: Ilkka Koskinen <[email protected]> Applying: Add V2 of the LED driver for a single timer channel for the TPU hardware Applying: Add support for slice by 8 to existing crc32 algorithm. Also modify Applying: don't include asm/msr.h Applying: This is the one use of an ida that doesn't retry on receiving -EAGAIN. Applying: One can get this information from minix/inode.c, but adding the Applying: Signed-off-by: Igor Mammedov <[email protected]> Applying: Force this on for -next/mm testing purposes. Applying: Add a proc_dointvec_bool() sysctl handler for cases where the input value Applying: Use the new proc_do_intvec_bool() handler for various boolean inputs. Applying: Add a proc_dointvec_unsigned() sysctl handler for positive value cases. Applying: Cc: Alexey Dobriyan <[email protected]> Applying: Use the new proc_do_intvec_unsigned() handler for various unsigned inputs. Applying: A default echo function has been provided so it is no longer an error when Applying: This client driver allows you to use a GPIO pin as a source for PPS Applying: remove unneeded cast of void* Applying: Straightforward. As an aside, the ida_init calls are not needed as far as Merging akpm Applying: fault-injection-add-ability-to-export-fault_attr-in-arbitrary-directory-fix [master eb0d47f] Revert "dt: add of_alias_scan and of_alias_get_id"
Re: linux-next: Tree for Aug 4 (zcache)
Quoted 4 lines · On Thu, 4 Aug 2011 14:58:34 +1000 Stephen Rothwell wrote:
Hi all,
Just in case anyone needs reminding: Please do not add anything destined for v3.2 into linux-next included trees until after v3.1-rc1.
on i386:
drivers/built-in.o: In function `zcache_pampd_create':
zcache-main.c:(.text+0x159b8f): undefined reference to `__udivdi3'
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Re: linux-next: Tree for Aug 4 (zcache)
Quoted 4 lines · Randy Dunlap
Quoted 2 lines · On Thu, 4 Aug 2011 14:58:34 +1000 Stephen Rothwell wrote:
Hi all,
Quoted 8 lines
Quoted 2 lines
Just in case anyone needs reminding: Please do not add anything destined for v3.2 into linux-next included trees until after v3.1-rc1.
on i386:
drivers/built-in.o: In function `zcache_pampd_create':
zcache-main.c:(.text+0x159b8f): undefined reference to `__udivdi3'
Very wierd, what would cause that?
greg k-h
Re: linux-next: Tree for Aug 4 (zcache)
Quoted 9 lines · On Thu, 4 Aug 2011 14:44:41 -0700 Greg KH wrote:
Quoted 8 lines · Randy Dunlap
Quoted 4 lines · On Thu, 4 Aug 2011 14:58:34 +1000 Stephen Rothwell wrote:
Hi all,
Just in case anyone needs reminding: Please do not add anything destined for v3.2 into linux-next included trees until after v3.1-rc1.
Quoted 6 lines
Quoted 4 lines
on i386:
drivers/built-in.o: In function `zcache_pampd_create':
zcache-main.c:(.text+0x159b8f): undefined reference to `__udivdi3'Very wierd, what would cause that?
I don't see what's weird about it.
Probably one of these divisions:
if (curr_pers_pampd_count >
(zv_page_count_policy_percent * totalram_pages) / 100)
goto out;
or
zv_mean_zsize = xv_get_total_size_bytes(cli->xvpool) / curr_pers_pampd_count;
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Re: linux-next: Tree for Aug 4 (zcache)
Quoted 22 lines · Randy Dunlap
Quoted 9 lines · On Thu, 4 Aug 2011 14:44:41 -0700 Greg KH wrote:
Quoted 8 lines · Randy Dunlap
Quoted 4 lines · On Thu, 4 Aug 2011 14:58:34 +1000 Stephen Rothwell wrote:
Hi all,
Just in case anyone needs reminding: Please do not add anything destined for v3.2 into linux-next included trees until after v3.1-rc1.
Quoted 6 lines
Quoted 4 lines
on i386:
drivers/built-in.o: In function `zcache_pampd_create':
zcache-main.c:(.text+0x159b8f): undefined reference to `__udivdi3'Very wierd, what would cause that?
I don't see what's weird about it.
Probably one of these divisions:
Quoted 9 lines
if (
curr_pers_pampd_count>
(zv_page_count_policy_percent*totalram_pages) / 100)
goto out;or
zv_mean_zsize = xv_get_total_size_bytes(cli->xvpool) / curr_pers_pampd_count;
The second one. xv_get_total_size_bytes returns u64. I am just compile-testing a fix.
Quoted 4 lines
---
~Randy
*** Remember to useDocumentation/SubmitChecklistwhen testing your code ***
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
PATCH 1/1 zcache: Use div_u64 for 64-bit division
In reply to Randy Dunlapxv_get_total_size_bytes returns a u64 value and it's used in a division. This causes build failures in 32-bit architectures, as reported by Randy Dunlap.
--- drivers/staging/zcache/zcache-main.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/staging/zcache/zcache-main.c +5 -2
@@ -28,6 +28,7 @@#include <linux/spinlock.h> #include <linux/types.h> #include <linux/atomic.h> +#include <linux/math64.h> #include "tmem.h" #include "../zram/xvmalloc.h" /* if built in drivers/staging */
@@ -1162,6 +1163,7 @@ static void *zcache_pampd_create(char *data, size_t size, bool raw, int eph,uint16_t client_id =get_client_id_from_client (cli);unsigned long zv_mean_zsize;unsigned long curr_pers_pampd_count; +u64 total_zsize;if (eph) { ret =zcache_compress (page, &cdata, &clen);
@@ -1194,8 +1196,9 @@ static void *zcache_pampd_create(char *data, size_t size, bool raw, int eph, }/* reject if mean compression is too poor */ if ((clen > zv_max_mean_zsize) && (curr_pers_pampd_count >0 )) { - zv_mean_zsize =xv_get_total_size_bytes (cli->xvpool) / - curr_pers_pampd_count; + total_zsize =xv_get_total_size_bytes (cli->xvpool); + zv_mean_zsize =div_u64 (total_zsize, + curr_pers_pampd_count);if (zv_mean_zsize > zv_max_mean_zsize) { zcache_mean_compress_poor++; goto out;
Signature · 1 line
1.7.5.4
Re: [PATCH] zcache: Use div_u64 for 64-bit division
Quoted 4 lines · On Thu, 4 Aug 2011 19:00:33 -0300 Thadeu Lima de Souza Cascardo wrote:
xv_get_total_size_bytesreturns a u64 value and it's used in a division. This causes build failures in 32-bit architectures, as reported by Randy Dunlap.
Quoted 9 lines
Reported-by Randy Dunlap <[email protected]>Signed-off-by Thadeu Lima de Souza Cascardo <[email protected]>Cc Stephen Rothwell <[email protected]>Cc Dan Magenheimer <[email protected]>Cc Nitin Gupta <[email protected]>Cc Greg KH <[email protected]>Cc driverdevel <[email protected]>Cc LKML <[email protected]>
Thanks.
Quoted 27 lines
--- drivers/staging/zcache/zcache-main.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)drivers/staging/zcache/zcache-main.c +2
-0@@ -28,6 +28,7 @@#include <linux/spinlock.h> #include <linux/types.h> #include <linux/atomic.h> +#include <linux/math64.h> #include "tmem.h" #include "../zram/xvmalloc.h" /* if built in drivers/staging */ @@ -1162,6 +1163,7 @@ static void *zcache_pampd_create(char *data, size_t size, bool raw, int eph,uint16_t client_id =get_client_id_from_client (cli);unsigned long zv_mean_zsize;unsigned long curr_pers_pampd_count; +u64 total_zsize;if (eph) { ret =zcache_compress (page, &cdata, &clen);@@ -1194,8 +1196,9 @@ static void *zcache_pampd_create(char *data, size_t size, bool raw, int eph, }
drivers/staging/zcache/zcache-main.c static void *zcache_pampd_create(char *data, size_t size, bool raw, int eph, · line 1204
Quoted 10 lines
drivers/staging/zcache/zcache-main.c +3
-2/* reject if mean compression is too poor */ if ((clen > zv_max_mean_zsize) && (curr_pers_pampd_count >0 )) { - zv_mean_zsize =xv_get_total_size_bytes (cli->xvpool) / - curr_pers_pampd_count; + total_zsize =xv_get_total_size_bytes (cli->xvpool); + zv_mean_zsize =div_u64 (total_zsize, + curr_pers_pampd_count);if (zv_mean_zsize > zv_max_mean_zsize) { zcache_mean_compress_poor++; goto out;
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
PATCH 1/1 drivers/base/inode.c: let vmstat_text be optional
In reply to Stephen RothwellFrom: Randy Dunlap <[email protected]>
vmstat_text is only available when PROC_FS or SYSFS is enabled. This causes build errors in drivers/base/node.c when they are both disabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x10e28f): undefined reference to `vmstat_text'
Rather than litter drivers/base/node.c with #ifdef/#endif around the affected lines of code, add macros for optional sysdev attributes so that those lines of code will be ignored, without using #ifdef/#endif in the .c file(s). I.e., the ifdeffery is done only in a header file with sysdev_create_file_optional() and sysdev_remove_file_optional().
--- drivers/base/node.c | 6 ++++-- include/linux/sysdev.h | 14 ++++++++++++++ include/linux/vmstat.h | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-)
include/linux/vmstat.h +2 -0
@@ -258,6 +258,8 @@ static inline void refresh_zone_stat_thr#endif /* CONFIG_SMP */ +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS )extern const char *const vmstat_text[]; +#endif #endif /* _LINUX_VMSTAT_H */
drivers/base/node.c +4 -2
@@ -176,6 +176,7 @@ static ssize_t node_read_numastat(struct } static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL); +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS )static ssize_t node_read_vmstat (struct sys_device *dev,struct sysdev_attribute *attr,char *buf) {
@@ -190,6 +191,7 @@ static ssize_t node_read_vmstat(struct sreturn n; } static SYSDEV_ATTR(vmstat, S_IRUGO, node_read_vmstat, NULL); +#endif static ssize_t node_read_distance (struct sys_device * dev,struct sysdev_attribute *attr,char * buf)
@@ -274,7 +276,7 @@ int register_node(struct node *node, intsysdev_create_file (&node->sysdev, &attr_meminfo);sysdev_create_file (&node->sysdev, &attr_numastat);sysdev_create_file (&node->sysdev, &attr_distance); -sysdev_create_file (&node->sysdev, &attr_vmstat); +sysdev_create_file_optional (&node->sysdev, &attr_vmstat);scan_unevictable_register_node (node);
@@ -299,7 +301,7 @@ void unregister_node(struct node *node)sysdev_remove_file (&node->sysdev, &attr_meminfo);sysdev_remove_file (&node->sysdev, &attr_numastat);sysdev_remove_file (&node->sysdev, &attr_distance); -sysdev_remove_file (&node->sysdev, &attr_vmstat); +sysdev_remove_file_optional (&node->sysdev, &attr_vmstat);scan_unevictable_unregister_node (node);hugetlb_unregister_node (node);/* no-op, if memoryless node */
include/linux/sysdev.h +14 -0
@@ -114,6 +114,20 @@ struct sysdev_attribute {extern int sysdev_create_file (struct sys_device *,struct sysdev_attribute *);extern void sysdev_remove_file (struct sys_device *,struct sysdev_attribute *); +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) +#define sysdev_create_file_optional (sysdev, sysdevattr) \ + return sysdev_create_file(sysdev, sysdevattr); + +#define sysdev_remove_file_optional (sysdev, sysdevattr) \ + sysdev_remove_file(sysdev, sysdevattr); +#else +#define sysdev_create_file_optional (sysdev, sysdevattr) \ + (0) + +#define sysdev_remove_file_optional (sysdev, sysdevattr) \ + do {} while (0) +#endif +/* Create/remove NULL terminated attribute list */ static inline int sysdev_create_files (struct sys_device *d,struct sysdev_attribute **a)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH -next] drivers/base/inode.c: let vmstat_text be optional
Quoted 9 lines · Randy Dunlap
From: Randy Dunlap<[email protected]>
vmstat_textis only available whenPROC_FSor SYSFS is enabled. This causes build errors indrivers/base/node.cwhen they are both disabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x10e28f): undefined reference to `vmstat_text'
Quoted 7 lines
Rather than litter
drivers/base/node.cwith #ifdef/#endif around the affected lines of code, add macros for optional sysdev attributes so that those lines of code will be ignored, without using #ifdef/#endif in the .c file(s). I.e., the ifdeffery is done only in a header file withsysdev_create_file_optional()andsysdev_remove_file_optional().
This looks ugly for me, because other sysfs files here are not optional only due to that they don't rely on vmstat_text.
I still think my approach to fix this is better, that is, introducing a new Kconfig for drivers/base/node.c which depends on CONFIG_SYSFS.
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH -next] drivers/base/inode.c: let vmstat_text be optional
Quoted 18 lines · Cong Wang
Quoted 9 lines · Randy Dunlap
From: Randy Dunlap<[email protected]>
vmstat_textis only available whenPROC_FSor SYSFS is enabled. This causes build errors indrivers/base/node.cwhen they are both disabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x10e28f): undefined reference to `vmstat_text'Quoted 7 lines
Rather than litter
drivers/base/node.cwith #ifdef/#endif around the affected lines of code, add macros for optional sysdev attributes so that those lines of code will be ignored, without using #ifdef/#endif in the .c file(s). I.e., the ifdeffery is done only in a header file withsysdev_create_file_optional()andsysdev_remove_file_optional().
Quoted 5 lines
This looks ugly for me, because other sysfs files here are not optional only due to that they don't rely on
vmstat_text.I still think my approach to fix this is better, that is, introducing a new
Kconfigfordrivers/base/node.cwhich depends onCONFIG_SYSFS.
Did you post a patch for that? I must have missed it.
thanks,
Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***
Re: [PATCH -next] drivers/base/inode.c: let vmstat_text be optional
Quoted 19 lines · Randy Dunlap
Quoted 18 lines · Cong Wang
Quoted 16 lines · Randy Dunlap
From: Randy Dunlap<[email protected]>
vmstat_textis only available whenPROC_FSor SYSFS is enabled. This causes build errors indrivers/base/node.cwhen they are both disabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x10e28f): undefined reference to `vmstat_text'Rather than litter
drivers/base/node.cwith #ifdef/#endif around the affected lines of code, add macros for optional sysdev attributes so that those lines of code will be ignored, without using #ifdef/#endif in the .c file(s). I.e., the ifdeffery is done only in a header file withsysdev_create_file_optional()andsysdev_remove_file_optional().
Quoted 7 lines
Quoted 5 lines
This looks ugly for me, because other sysfs files here are not optional only due to that they don't rely on
vmstat_text.I still think my approach to fix this is better, that is, introducing a new
Kconfigfordrivers/base/node.cwhich depends onCONFIG_SYSFS.Did you post a patch for that? I must have missed it.
Yes, see https://lkml.org/lkml/2011/7/19/31.
I think I need to resend it. :)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerRe: [PATCH -next] drivers/base/inode.c: let vmstat_text be optional
In reply to Randy DunlapQuoted 2 lines
Subject: [PATCH -next]
drivers/base/inode.c: letvmstat_textbe optional
The patch-against-next thing always disturbs me. It implies that the patch is only needed in linux-next, but often that's wrong. So I have to go off and work out what kernel it really is applicable to.
And that's OK, it keeps me healthy. But two minds are better than one, and if the originator has already worked this out, they should state it explicitly, please.
Quoted 19 lines · On Thu, 4 Aug 2011 15:22:11 -0700 Randy Dunlap <[email protected]> wrote:
From: Randy Dunlap <[email protected]>
vmstat_textis only available whenPROC_FSor SYSFS is enabled. This causes build errors indrivers/base/node.cwhen they are both disabled:
drivers/built-in.o: In function `node_read_vmstat':
node.c:(.text+0x10e28f): undefined reference to `vmstat_text'Rather than litter
drivers/base/node.cwith #ifdef/#endif around the affected lines of code, add macros for optional sysdev attributes so that those lines of code will be ignored, without using #ifdef/#endif in the .c file(s). I.e., the ifdeffery is done only in a header file withsysdev_create_file_optional()andsysdev_remove_file_optional().
include/linux/vmstat.h static inline void refresh_zone_stat_thr · line 264
Quoted 7 lines
include/linux/vmstat.h +2
-0@@ -258,6 +258,8 @@ static inline void refresh_zone_stat_thr#endif /* CONFIG_SMP */ +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS )extern const char *const vmstat_text[]; +#endif
The ifdef around the declaration isn't needed, really. If we remove it then a build-time error becomes a link-time (or even moddep-time) error, which is a bit of a pain. But it's less painful than having ifdefs around squillions of declarations.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/1 numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Hi, Andrew,
Do you think my patch below is better?
Thanks!
------------->
Introduce a new Kconfig CONFIG_NUMA_SYSFS for drivers/base/node.c which just provides sysfs interface, so that when we select CONFIG_NUMA, we don't have to enable the sysfs interface too.
This by the way fixes a randconfig build error when NUMA && !SYSFS.
---
drivers/base/Makefile +1 -1
@@ -10,7 +10,7 @@ obj-$(CONFIG_HAS_DMA) += dma-mapping.o obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o obj-$(CONFIG_ISA) += isa.o obj-$(CONFIG_FW_LOADER) += firmware_class.o -obj-$(CONFIG_NUMA) += node.o +obj-$(CONFIG_NUMA_SYSFS) += node.o obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o obj-$(CONFIG_SMP) += topology.o ifeq ($(CONFIG_SYSFS),y)
mm/Kconfig +10 -0
@@ -340,6 +340,16 @@ choice benefit. endchoice +config NUMA_SYSFS + bool "Enable NUMA sysfs interface for user-space" + depends on NUMA + depends on SYSFS + default y + help + This enables NUMA sysfs interface, /sys/devices/system/node/* + files, for user-space tools, like numactl. If you have enabled + NUMA, probably you also need this one. + # # UP and nommu archs use km based percpu allocator #
Re: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 3 lines · On Wed, 24 Aug 2011 11:34:45 +0800 Cong Wang wrote:
Hi, Andrew,
Do you think my patch below is better?
Hi,
This causes build errors for me because node.o is not being built:
arch/x86/built-in.o: In function `topology_init':
topology.c:(.init.text+0x3668): undefined reference to register_one_node' drivers/built-in.o: In function unregister_cpu':
(.text+0x7aecc): undefined reference to unregister_cpu_under_node' drivers/built-in.o: In function register_cpu':
(.cpuinit.text+0xc1): undefined reference to `register_cpu_under_node'
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 8 lines · Randy Dunlap
Quoted 3 lines · On Wed, 24 Aug 2011 11:34:45 +0800 Cong Wang wrote:
Hi, Andrew,
Do you think my patch below is better?
Hi,
Quoted 8 lines
This causes build errors for me because node.o is not being built:
arch/x86/built-in.o: In function `topology_init':
topology.c:(.init.text+0x3668): undefined reference toregister_one_node' drivers/built-in.o: In functionunregister_cpu':
(.text+0x7aecc): undefined reference tounregister_cpu_under_node' drivers/built-in.o: In functionregister_cpu':
(.cpuinit.text+0xc1): undefined reference to `register_cpu_under_node'
Ah, this is because I missed the part in include/linux/node.h. :)
Below is the updated version.
Thanks for testing!
drivers/base/Makefile +1 -1
@@ -10,7 +10,7 @@ obj-$(CONFIG_HAS_DMA) += dma-mapping.o obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT) += dma-coherent.o obj-$(CONFIG_ISA) += isa.o obj-$(CONFIG_FW_LOADER) += firmware_class.o -obj-$(CONFIG_NUMA) += node.o +obj-$(CONFIG_NUMA_SYSFS) += node.o obj-$(CONFIG_MEMORY_HOTPLUG_SPARSE) += memory.o obj-$(CONFIG_SMP) += topology.o ifeq ($(CONFIG_SYSFS),y)
include/linux/node.h +1 -1
@@ -32,7 +32,7 @@ typedef void (*node_registration_func_t)(struct node *);extern int register_node (struct node *,int ,struct node *);extern void unregister_node (struct node *node); -#ifdef CONFIG_NUMA +#ifdef defined(CONFIG_NUMA) && defined(CONFIG_SYSFS)extern int register_one_node (int nid);extern void unregister_one_node (int nid);extern int register_cpu_under_node (unsigned int cpu,unsigned int nid);
mm/Kconfig +10 -0
@@ -340,6 +340,16 @@ choice benefit. endchoice +config NUMA_SYSFS + bool "Enable NUMA sysfs interface for user-space" + depends on NUMA + depends on SYSFS + default y + help + This enables NUMA sysfs interface, /sys/devices/system/node/* + files, for user-space tools, like numactl. If you have enabled + NUMA, probably you also need this one. + # # UP and nommu archs use km based percpu allocator #
Randy Dunlap
Acked-byRe: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 18 lines · On Thu, 25 Aug 2011 11:31:45 +0800 Cong Wang wrote:
Quoted 8 lines · Randy Dunlap
Quoted 3 lines · On Wed, 24 Aug 2011 11:34:45 +0800 Cong Wang wrote:
Hi, Andrew,
Do you think my patch below is better?
Hi,
Quoted 8 lines
This causes build errors for me because node.o is not being built:
arch/x86/built-in.o: In function `topology_init':
topology.c:(.init.text+0x3668): undefined reference toregister_one_node' drivers/built-in.o: In functionunregister_cpu':
(.text+0x7aecc): undefined reference tounregister_cpu_under_node' drivers/built-in.o: In functionregister_cpu':
(.cpuinit.text+0xc1): undefined reference to `register_cpu_under_node'
Quoted 5 lines
Ah, this is because I missed the part in
include/linux/node.h. :)Below is the updated version.
Thanks for testing!
Yes, that works after changing #ifdef defined(...) to #if defined(...)
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Re: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 9 lines · Randy Dunlap
Quoted 3 lines
Below is the updated version.
Thanks for testing!
Yes, that works after changing #ifdef defined(...) to #if defined(...)
Acked-by Randy Dunlap <[email protected]>
No, it doesn't work, CONFIG_HUGETLBFS can be enabled with CONFIG_NUMA=y and CONFIG_SYSFS=n and that uses data structures from drivers/base/node.c which doesn't get compiled with this patch.
Re: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 9 lines · David Rientjes
Quoted 7 lines · Randy Dunlap
Quoted 3 lines
Below is the updated version.
Thanks for testing!
Yes, that works after changing #ifdef defined(...) to #if defined(...)
Quoted 6 lines
Quoted 2 lines
Acked-by Randy Dunlap<[email protected]>No, it doesn't work,
CONFIG_HUGETLBFScan be enabled withCONFIG_NUMA=yandCONFIG_SYSFS=nand that uses data structures fromdrivers/base/node.cwhich doesn't get compiled with this patch.
So, you mean with CONFIG_NUMA=y && CONFIG_SYSFS=n && CONFIG_HUGETLBFS=y we still get compile error?
Which data structures are used by hugetlbfs?
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 9 lines · Cong Wang
Quoted 3 lines
No, it doesn't work,
CONFIG_HUGETLBFScan be enabled withCONFIG_NUMA=yandCONFIG_SYSFS=nand that uses data structures fromdrivers/base/node.cwhich doesn't get compiled with this patch.So, you mean with
CONFIG_NUMA=y&&CONFIG_SYSFS=n&&CONFIG_HUGETLBFS=ywe still get compile error?Which data structures are used by hugetlbfs?
node_states[], which is revealed at link time if you tried to compile your patch. It's obvious that we don't want to add per-node hugetlbfs attributes to sysfs directories if sysfs is disabled, so you need to modify the hugetlbfs code as well.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [Patch] numa: introduce CONFIG_NUMA_SYSFS for drivers/base/node.c
Quoted 9 lines · David Rientjes
Quoted 7 lines · Cong Wang
Quoted 3 lines
No, it doesn't work,
CONFIG_HUGETLBFScan be enabled withCONFIG_NUMA=yandCONFIG_SYSFS=nand that uses data structures fromdrivers/base/node.cwhich doesn't get compiled with this patch.So, you mean with
CONFIG_NUMA=y&&CONFIG_SYSFS=n&&CONFIG_HUGETLBFS=ywe still get compile error?
Quoted 7 lines
Quoted 2 lines
Which data structures are used by hugetlbfs?
node_states[], which is revealed at link time if you tried to compile your patch. It's obvious that we don't want to add per-node hugetlbfs attributes to sysfs directories if sysfs is disabled, so you need to modify the hugetlbfs code as well.
Makes sense. Thanks!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/1 numa: fix NUMA compile error when sysfs and procfs are disabled
In reply to Cong WangQuoted 4 lines · Cong Wang
Ah, this is because I missed the part in
include/linux/node.h. :)Below is the updated version.
I've never had a problem building a kernel with CONFIG_NUMA=y and CONFIG_SYSFS=n since most of drivers/base/node.c is just an abstraction that calls into sysfs functions that will be no-ops in such a configuration.
The error you cite in a different thread
(http://marc.info/?l=linux-mm&m=131098795024186) about an undefined reference to vmstat_text is because you have CONFIG_NUMA enabled and both CONFIG_SYSFS and CONFIG_PROC_FS disabled and we only define vmstat_text for those fs configurations since that's the only way these strings were ever emitted before per-node vmstat.
The correct fix is to define the array for CONFIG_NUMA as well.
numa: fix NUMA compile error when sysfs and procfs are disabled
The vmstat_text array is only defined for CONFIG_SYSFS or CONFIG_PROC_FS, yet it is referenced for per-node vmstat with CONFIG_NUMA:
drivers/built-in.o: In function `node_read_vmstat': node.c:(.text+0x1106df): undefined reference to `vmstat_text'
in fa25c503dfa2 (mm: per-node vmstat: show proper vmstats).
Define the array for CONFIG_NUMA as well.
--- include/linux/vmstat.h | 2 ++ mm/vmstat.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
include/linux/vmstat.h +2 -0
@@ -258,6 +258,8 @@ static inline void refresh_zone_stat_thresholds(void) { }#endif /* CONFIG_SMP */ +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) || defined(CONFIG_NUMA )extern const char *const vmstat_text[]; +#endif #endif /* _LINUX_VMSTAT_H */
mm/vmstat.c +2 -2
@@ -659,7 +659,7 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat, }#endif -#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) || defined(CONFIG_NUMA )#ifdef CONFIG_ZONE_DMA #define TEXT_FOR_DMA (xx) xx "_dma",#else
@@ -788,7 +788,7 @@ const char * const vmstat_text[] = { #endif /* CONFIG_VM_EVENTS_COUNTERS */ }; -#endif /* CONFIG_PROC_FS || CONFIG_SYSFS */ +#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ #ifdef CONFIG_PROC_FS
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [patch] numa: fix NUMA compile error when sysfs and procfs are disabled
Quoted 31 lines · On Wed, 24 Aug 2011 22:55:02 -0700 (PDT) David Rientjes wrote:
Quoted 4 lines · Cong Wang
Ah, this is because I missed the part in
include/linux/node.h. :)Below is the updated version.
I've never had a problem building a kernel with
CONFIG_NUMA=yandCONFIG_SYSFS=nsince most ofdrivers/base/node.cis just an abstraction that calls into sysfs functions that will be no-ops in such a configuration.The error you cite in a different thread
(http://marc.info/?l=linux-mm&m=131098795024186) about an undefined reference tovmstat_textis because you haveCONFIG_NUMAenabled and bothCONFIG_SYSFSandCONFIG_PROC_FSdisabled and we only definevmstat_textfor those fs configurations since that's the only way these strings were ever emitted before per-node vmstat.The correct fix is to define the array for
CONFIG_NUMAas well.numa: fix NUMA compile error when sysfs and procfs are disabled
The
vmstat_textarray is only defined forCONFIG_SYSFSorCONFIG_PROC_FS, yet it is referenced for per-node vmstat withCONFIG_NUMA:drivers/built-in.o: In function `node_read_vmstat': node.c:(.text+0x1106df): undefined reference to `vmstat_text'
Quoted 6 lines
in
fa25c503dfa2(mm: per-node vmstat: show proper vmstats).Define the array for
CONFIG_NUMAas well.Reported-by Cong Wang <[email protected]>Signed-off-by David Rientjes <[email protected]>
Sure, that also works.
Quoted 30 lines
--- include/linux/vmstat.h | 2 ++ mm/vmstat.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)include/linux/vmstat.h +2
-0@@ -258,6 +258,8 @@ static inline void refresh_zone_stat_thresholds(void) { }#endif /* CONFIG_SMP */ +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) || defined(CONFIG_NUMA )extern const char *const vmstat_text[]; +#endif #endif /* _LINUX_VMSTAT_H */ mm/vmstat.c +1
-1@@ -659,7 +659,7 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat, }#endif -#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) +#if defined(CONFIG_PROC_FS ) || defined(CONFIG_SYSFS ) || defined(CONFIG_NUMA )#ifdef CONFIG_ZONE_DMA #define TEXT_FOR_DMA (xx) xx "_dma",#else
mm/vmstat.c const char * const vmstat_text[] = { · line 794
Quoted 8 lines
mm/vmstat.c +1
-1@@ -788,7 +788,7 @@ const char * const vmstat_text[] = { #endif /* CONFIG_VM_EVENTS_COUNTERS */ }; -#endif /* CONFIG_PROC_FS || CONFIG_SYSFS */ +#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA */ #ifdef CONFIG_PROC_FS
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***