GitHub PushEvent at 2014-11-26 04:15:11
Repository: linux-sunxi
Actor: amery
Payload: {"shas":[["835f252c6debd204fcd607c79975089b1ecd3472","9eae2d327ddc4c2ff66f290d0aa6288f14fc5928@cn.fujitsu.com","aio: fix uncorrent dirty pages accouting when truncating AIO ring buffer\n\nhttps://bugzilla.kernel.org/show_bug.cgi?id=86831\n\nMarkus reported that when shutting down mysqld (with AIO support,\non a ext3 formatted Harddrive) leads to a negative number of dirty pages\n(underrun to the counter). The negative number results in a drastic reduction\nof the write performance because the page cache is not used, because the kernel\nthinks it is still 2 ^ 32 dirty pages open.\n\nAdd a warn trace in __dec_zone_state will catch this easily:\n\nstatic inline void __dec_zone_state(struct zone *zone, enum\n\tzone_stat_item item)\n{\n     atomic_long_dec(&zone->vm_stat[item]);\n+    WARN_ON_ONCE(item == NR_FILE_DIRTY &&\n\tatomic_long_read(&zone->vm_stat[item]) < 0);\n     atomic_long_dec(&vm_stat[item]);\n}\n\n[   21.341632] ------------[ cut here ]------------\n[   21.346294] WARNING: CPU: 0 PID: 309 at include/linux/vmstat.h:242\ncancel_dirty_page+0x164/0x224()\n[   21.355296] Modules linked in: wutbox_cp sata_mv\n[   21.359968] CPU: 0 PID: 309 Comm: kworker/0:1 Not tainted 3.14.21-WuT #80\n[   21.366793] Workqueue: events free_ioctx\n[   21.370760] [<c0016a64>] (unwind_backtrace) from [<c0012f88>]\n(show_stack+0x20/0x24)\n[   21.378562] [<c0012f88>] (show_stack) from [<c03f8ccc>]\n(dump_stack+0x24/0x28)\n[   21.385840] [<c03f8ccc>] (dump_stack) from [<c0023ae4>]\n(warn_slowpath_common+0x84/0x9c)\n[   21.393976] [<c0023ae4>] (warn_slowpath_common) from [<c0023bb8>]\n(warn_slowpath_null+0x2c/0x34)\n[   21.402800] [<c0023bb8>] (warn_slowpath_null) from [<c00c0688>]\n(cancel_dirty_page+0x164/0x224)\n[   21.411524] [<c00c0688>] (cancel_dirty_page) from [<c00c080c>]\n(truncate_inode_page+0x8c/0x158)\n[   21.420272] [<c00c080c>] (truncate_inode_page) from [<c00c0a94>]\n(truncate_inode_pages_range+0x11c/0x53c)\n[   21.429890] [<c00c0a94>] (truncate_inode_pages_range) from\n[<c00c0f6c>] (truncate_pagecache+0x88/0xac)\n[   21.439252] [<c00c0f6c>] (truncate_pagecache) from [<c00c0fec>]\n(truncate_setsize+0x5c/0x74)\n[   21.447731] [<c00c0fec>] (truncate_setsize) from [<c013b3a8>]\n(put_aio_ring_file.isra.14+0x34/0x90)\n[   21.456826] [<c013b3a8>] (put_aio_ring_file.isra.14) from\n[<c013b424>] (aio_free_ring+0x20/0xcc)\n[   21.465660] [<c013b424>] (aio_free_ring) from [<c013b4f4>]\n(free_ioctx+0x24/0x44)\n[   21.473190] [<c013b4f4>] (free_ioctx) from [<c003d8d8>]\n(process_one_work+0x134/0x47c)\n[   21.481132] [<c003d8d8>] (process_one_work) from [<c003e988>]\n(worker_thread+0x130/0x414)\n[   21.489350] [<c003e988>] (worker_thread) from [<c00448ac>]\n(kthread+0xd4/0xec)\n[   21.496621] [<c00448ac>] (kthread) from [<c000ec18>]\n(ret_from_fork+0x14/0x20)\n[   21.503884] ---[ end trace 79c4bf42c038c9a1 ]---\n\nThe cause is that we set the aio ring file pages as *DIRTY* via SetPageDirty\n(bypasses the VFS dirty pages increment) when init, and aio fs uses\n*default_backing_dev_info* as the backing dev, which does not disable\nthe dirty pages accounting capability.\nSo truncating aio ring file will contribute to accounting dirty pages (VFS\ndirty pages decrement), then error occurs.\n\nThe original goal is keeping these pages in memory (can not be reclaimed\nor swapped) in life-time via marking it dirty. But thinking more, we have\nalready pinned pages via elevating the page's refcount, which can already\nachieve the goal, so the SetPageDirty seems unnecessary.\n\nIn order to fix the issue, using the __set_page_dirty_no_writeback instead\nof the nop .set_page_dirty, and dropped the SetPageDirty (don't manually\nset the dirty flags, don't disable set_page_dirty(), rely on default behaviour).\n\nWith the above change, the dirty pages accounting can work well. But as we\nknown, aio fs is an anonymous one, which should never cause any real write-back,\nwe can ignore the dirty pages (write back) accounting by disabling the dirty\npages (write back) accounting capability. So we introduce an aio private\nbacking dev info (disabled the ACCT_DIRTY/WRITEBACK/ACCT_WB capabilities) to\nreplace the default one.\n\nReported-by: Markus Königshaus <m.koenigshaus@wut.de>\nSigned-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>\nCc: stable <stable@vger.kernel.org>\nAcked-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Benjamin LaHaise <bcrl@kvack.org>","Gu Zheng",true],["ff553ea1a3d5b903becda790eeb6bd3debf239f9","4e91513d4f418754031d3d36b3fc73980c40a38c@free-electrons.com","clk: at91: usb: fix at91rm9200 round and set rate\n\nat91rm9200_clk_usb_set_rate might fail depending on the requested rate,\nbecause the parent_rate / rate remainder is not necessarily zero.\nMoreover, when rounding down the calculated rate we might alter the\ndivisor calculation and end up with an invalid divisor.\n\nTo solve those problems, accept a non zero remainder, and always round\ndivision to the closest result.\n\nSigned-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>\nReported-by: Andreas Henriksson <andreas.henriksson@endian.se>\nTested-by: Andreas Henriksson <andreas.henriksson@endian.se>\nAcked-by: Nicolas Ferre <nicolas.ferre@atmel.com>\nSigned-off-by: Michael Turquette <mturquette@linaro.org>","Boris Brezillon",true],["69daf75aafc8410ef046c70be65c71f2dd4e08f9","4e91513d4f418754031d3d36b3fc73980c40a38c@free-electrons.com","clk: at91: usb: fix at91sam9x5 recalc, round and set rate\n\nFirst check for rate == 0 in set_rate and round_rate to avoid div by zero.\nThen, in order to get the closest rate, round all divisions to the closest\nresult instead of rounding them down.\n\nSigned-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>\nAcked-by: Nicolas Ferre <nicolas.ferre@atmel.com>\nSigned-off-by: Michael Turquette <mturquette@linaro.org>","Boris Brezillon",true],["9a6cb70f40b0268297024949eb0a2689e3b7769b","b5773c69ba29d5c62ae546fd415aab4a91cdd0ac@mm-sol.com","clk: qcom: Fix duplicate rbcpr clock name\n\nThere is a duplication in a clock name for apq8084 platform that causes\nthe following warning: \"RBCPR_CLK_SRC\" redefined\n\nResolve this by adding a MMSS_ prefix to this clock and making its name\ncoherent with msm8974 platform.\n\nFixes: 2b46cd23a5a2 (\"clk: qcom: Add APQ8084 Multimedia Clock Controller (MMCC) support\")\nSigned-off-by: Georgi Djakov <gdjakov@mm-sol.com>\nReviewed-by: Stephen Boyd <sboyd@codeaurora.org>\nSigned-off-by: Michael Turquette <mturquette@linaro.org>","Georgi Djakov",true],["e6d5e7d90be92cee626d7ec16ca9b06f1eed710b","547fa85bb3888a0222eed8ec39e36708605c6d53@imgtec.com","clk-divider: Fix READ_ONLY when divider > 1\n\nCommit 79c6ab509558 (clk: divider: add CLK_DIVIDER_READ_ONLY flag) in\nv3.16 introduced the CLK_DIVIDER_READ_ONLY flag which caused the\nrecalc_rate() and round_rate() clock callbacks to be omitted.\n\nHowever using this flag has the unfortunate side effect of causing the\nclock recalculation code when a clock rate change is attempted to always\ntreat it as a pass-through clock, i.e. with a fixed divide of 1, which\nmay not be the case. Child clock rates are then recalculated using the\nwrong parent rate.\n\nTherefore instead of dropping the recalc_rate() and round_rate()\ncallbacks, alter clk_divider_bestdiv() to always report the current\ndivider as the best divider so that it is never altered.\n\nFor me the read only clock was the system clock, which divided the PLL\nrate by 2, from which both the UART and the SPI clocks were divided.\nInitial setting of the UART rate set it correctly, but when the SPI\nclock was set, the other child clocks were miscalculated. The UART clock\nwas recalculated using the PLL rate as the parent rate, resulting in a\nUART new_rate of double what it should be, and a UART which spewed forth\ngarbage when the rate changes were propagated.\n\nSigned-off-by: James Hogan <james.hogan@imgtec.com>\nCc: Thomas Abraham <thomas.ab@samsung.com>\nCc: Tomasz Figa <t.figa@samsung.com>\nCc: Max Schwarz <max.schwarz@online.de>\nCc: <stable@vger.kernel.org> # v3.16+\nAcked-by: Haojian Zhuang <haojian.zhuang@gmail.com>\nSigned-off-by: Michael Turquette <mturquette@linaro.org>","James Hogan",true],["dcf3d458304aafda3d12413ade39fdf19740dbc3","94b2a0a74cb42a2dd0cf1b763601af7f13907aa9@free.fr","clk: pxa: fix pxa27x CCCR bit usage\n\nTrivial fix to check the A bit of CCCR for memory frequency\ncalculations, where the shift of the bit index was missing, triggering a\nwrong calculation of memory frequency.\n\nSigned-off-by: Robert Jarzmik <robert.jarzmik@free.fr>\nSigned-off-by: Michael Turquette <mturquette@linaro.org>","Robert Jarzmik",true],["6d0ba0432a5e10bc714ba9c5adc460e726e5fbb4","923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de","nfsd: correctly define v4.2 support attributes\n\nEven when security labels are disabled we support at least the same\nattributes as v4.1.\n\nSigned-off-by: Christoph Hellwig <hch@lst.de>\nCc: stable@kernel.org\nSigned-off-by: J. Bruce Fields <bfields@redhat.com>","Christoph Hellwig",true],["093a1468b6edb0e568be7311b8d2228d205702db","cc958843532c615cbd4920e868f78c7985331a5a@primarydata.com","SUNRPC: Fix locking around callback channel reply receive\n\nBoth xprt_lookup_rqst() and xprt_complete_rqst() require that you\ntake the transport lock in order to avoid races with xprt_transmit().\n\nSigned-off-by: Trond Myklebust <trond.myklebust@primarydata.com>\nCc: stable@vger.kernel.org\nReviewed-by: Jeff Layton <jlayton@primarydata.com>\nSigned-off-by: J. Bruce Fields <bfields@redhat.com>","Trond Myklebust",true],["c6c15e1ed303ffc47e696ea1c9a9df1761c1f603","cc958843532c615cbd4920e868f78c7985331a5a@primarydata.com","nfsd: Fix slot wake up race in the nfsv4.1 callback code\n\nThe currect code for nfsd41_cb_get_slot() and nfsd4_cb_done() has no\nlocking in order to guarantee atomicity, and so allows for races of\nthe form.\n\nTask 1                                  Task 2\n======                                  ======\nif (test_and_set_bit(0) != 0) {\n                                        clear_bit(0)\n                                        rpc_wake_up_next(queue)\n        rpc_sleep_on(queue)\n        return false;\n}\n\nThis patch breaks the race condition by adding a retest of the bit\nafter the call to rpc_sleep_on().\n\nSigned-off-by: Trond Myklebust <trond.myklebust@primarydata.com>\nCc: stable@vger.kernel.org\nSigned-off-by: J. Bruce Fields <bfields@redhat.com>","Trond Myklebust",true],["6b19b66013cfe608d63f0dab38834bbaceb0217a","4a388ce446e5b5f71442f7933e5783ac3caa59a1@natisbad.org","hwmon: (g762) fix call to devm_hwmon_device_register_with_groups()\n\ng762_remove() needs to first call hwmon_device_unregister() and then\ng762_of_clock_disable(). For that reason, it is not possible to\nconvert it to devm_hwmon_device_register_with_groups() and the\nthe non device managed version must be used.\n\nThis is correctly stated in commit message for 398e16db6262 (\"hwmon:\n(g762) Convert to hwmon_device_register_with_groups\") but the\nassociated changes do in fact introduce a call to the device managed\nversion of the function.\n\nThis patch fixes that typo by switching to the non devm_ version.\n\nFixes: 398e16db6262 (\"hwmon: (g762) Convert to hwmon_device_register_with_groups\")\nCc: stable@vger.kernel.org (3.17+)\nSigned-off-by: Arnaud Ebalard <arno@natisbad.org>\nSigned-off-by: Guenter Roeck <linux@roeck-us.net>","Arnaud Ebalard",true],["413cbf469a19e7662ba5025695bf5a573927105a","4596b3305151c7ee743192a95d394341e3d3b644@suse.de","ALSA: hda - Limit 40bit DMA for AMD HDMI controllers\n\nAMD/ATI HDMI controller chip models, we already have a filter to lower\nto 32bit DMA, but the rest are supposed to be working with 64bit\nalthough the hardware doesn't really work with 63bit but only with 40\nor 48bit DMA.  In this patch, we take 40bit DMA for safety for the\nAMD/ATI controllers as the graphics drivers does.\n\nSigned-off-by: Takashi Iwai <tiwai@suse.de>\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCC: <stable@vger.kernel.org>","Takashi Iwai",true],["f144d1496b47e7450f41b767d0d91c724c2198bc","a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org","PCI/MSI: Add device flag indicating that 64-bit MSIs don't work\n\nThis can be set by quirks/drivers to be used by the architecture code\nthat assigns the MSI addresses.\n\nWe additionally add verification in the core MSI code that the values\nassigned by the architecture do satisfy the limitation in order to fail\ngracefully if they don't (ie. the arch hasn't been updated to deal with\nthat quirk yet).\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCC: <stable@vger.kernel.org>\nAcked-by: Bjorn Helgaas <bhelgaas@google.com>","Benjamin Herrenschmidt",true],["91ed6fd2c383bb8f02d66e98b4a4d2f7207249dc","a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org","gpu/radeon: Set flag to indicate broken 64-bit MSI\n\nSome radeon ASICs don't support all 64 address bits of MSIs despite\nadvertising support for 64-bit MSIs in their configuration space.\n\nThis breaks on systems such as IBM POWER7/8, where 64-bit MSIs can\nbe assigned with some of the high address bits set.\n\nThis makes use of the newly introduced \"no_64bit_msi\" flag in structure\npci_dev to allow the MSI allocation code to fallback to 32-bit MSIs\non those adapters.\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nReviewed-by: Alex Deucher <alexander.deucher@amd.com>\nCC: <stable@vger.kernel.org>\n---\n\nAdding Alex's review tag. Patch to the driver is identical to the\nreviewed one, I dropped the arch/powerpc hunk rewrote the subject\nand cset comment.","Benjamin Herrenschmidt",true],["db79afa1e57925ba96ab18514c0ebe42a28e393e","a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org","sound/radeon: Move 64-bit MSI quirk from arch to driver\n\nA number of radeon cards have a HW limitation causing them to be\nunable to generate the full 64-bit of address bits for MSIs. This\nbreaks MSIs on some platforms such as POWER machines.\n\nWe used to have a powerpc specific quirk to address that on a\nsingle card, but this doesn't scale very well, this is better\nput under control of the drivers who know precisely what a given\nHW revision can do.\n\nWe now have a generic quirk in the PCI code. We should set it\nappropriately for all radeon's from the audio driver.\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nReviewed-by: Takashi Iwai <tiwai@suse.de>\nReviewed-by: Alex Deucher <alexander.deucher@amd.com>\nCC: <stable@vger.kernel.org>","Benjamin Herrenschmidt",true],["360743814c4082515581aa23ab1d8e699e1fbe88","a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org","powerpc/powernv: Honor the generic \"no_64bit_msi\" flag\n\nInstead of the arch specific quirk which we are deprecating\nand that drivers don't understand.\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCC: <stable@vger.kernel.org>","Benjamin Herrenschmidt",true],["415072a041bf50dbd6d56934ffc0cbbe14c97be8","a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org","powerpc/pseries: Honor the generic \"no_64bit_msi\" flag\n\nInstead of the arch specific quirk which we are deprecating\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCC: <stable@vger.kernel.org>","Benjamin Herrenschmidt",true],["31345e1a071e4e5f2fa8b6be5ca7d1cbce20cfca","a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org","powerpc/pci: Remove unused force_32bit_msi quirk\n\nThis is now fully replaced with the generic \"no_64bit_msi\" one\nthat is set by the respective drivers directly.\n\nSigned-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>","Benjamin Herrenschmidt",true],["a7e90924e167f9dd86633a959e31168c9bed4fb1","69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org","Merge tag 'clk-fixes-for-linus' of https://git.linaro.org/people/mike.turquette/linux\n\nPull clock fixes from Mike Turquette:\n \"The fixes for the clock framework are all regressions in drivers, plus\n  a single fix in one of the basic clock templates.  No fixes to the\n  core this time around.\n\n  As with most clock driver fixes these run the gamut from fixing a\n  build warning to fixing wrecked memory timings, with a little USB\n  tossed in for fun\"\n\n* tag 'clk-fixes-for-linus' of https://git.linaro.org/people/mike.turquette/linux:\n  clk: pxa: fix pxa27x CCCR bit usage\n  clk-divider: Fix READ_ONLY when divider > 1\n  clk: qcom: Fix duplicate rbcpr clock name\n  clk: at91: usb: fix at91sam9x5 recalc, round and set rate\n  clk: at91: usb: fix at91rm9200 round and set rate","Linus Torvalds",true],["a6e4a05af981c9db3ae5e41723827c5290f0e273","69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org","Merge tag 'hwmon-for-linus-v3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging\n\nPull a hwmon fix from Guenter Roeck:\n \"Fix hwmon registration problem in g762 driver\"\n\n* tag 'hwmon-for-linus-v3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:\n  hwmon: (g762) fix call to devm_hwmon_device_register_with_groups()","Linus Torvalds",true],["d1ca00078071cb6c45f15ab589682182cb5e628e","69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org","Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc\n\nPull powerpc fixes from Ben Herrenschmidt:\n \"This series fix a nasty issue with radeon adapters on powerpc servers,\n  it's all CC'ed stable and has the relevant maintainers ack's/reviews.\n\n  Basically, some (radeon) adapters have issues with MSI addresses above\n  1T (only support 40-bits).  We had powerpc specific quirk but it only\n  listed a specific revision of an adapter that we shipped with our\n  machines and didn't properly handle the audio function which some\n  distros enable nowadays.\n\n  So we made the quirk generic and fixed both the graphic and audio\n  drivers properly to use it.\n\n  Without that, ppc64 server machines will crash at boot with a radeon\n  adapter.\n\n  Note: This has been brewing for a while, it just needed a last respin\n  which got delayed due to us moving ozlabs to a new location in town\n  and other such things taking priority\"\n\n* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:\n  powerpc/pci: Remove unused force_32bit_msi quirk\n  powerpc/pseries: Honor the generic \"no_64bit_msi\" flag\n  powerpc/powernv: Honor the generic \"no_64bit_msi\" flag\n  sound/radeon: Move 64-bit MSI quirk from arch to driver\n  gpu/radeon: Set flag to indicate broken 64-bit MSI\n  PCI/MSI: Add device flag indicating that 64-bit MSIs don't work\n  ALSA: hda - Limit 40bit DMA for AMD HDMI controllers","Linus Torvalds",true]],"size":22,"ref":"refs/heads/mirror/master","head":"b914c5b2130239fd378d1a719ab3c53f0c782be9"}