/* * Copyright (c) 2013 * Phillip Lougher * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ #include #include #include #include #include #include #include #include "squashfs_fs.h" #include "squashfs_fs_sb.h" #include "squashfs_fs_i.h" #include "squashfs.h" /* Read separately compressed datablock and memcopy into page cache */ int squashfs_readpage_block(struct page *page, u64 block, int bsize) { struct inode *i = page->mapping->host; struct squashfs_cache_entry *buffer = squashfs_get_datablock(i->i_sb, block, bsize); int res = buffer->error; if (res) ERROR("Unable to read page, block %llx, size %x\n", block, bsize); else squashfs_copy_cache(page, buffer, buffer->length, 0); squashfs_cache_put(buffer); return res; } change='this.form.submit();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2017-02-04 18:05:07 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-06 22:53:13 -0500
commitf7cdee8a79a1cb03fa9ca71b825e72f880b344e1 (patch)
treebda0a6e29e0d7748d2f7e59a8da9c5194f486b36
parent1f90c7f3470580e24da25f6a6c1fb480ed9371ac (diff)
bridge: move to workqueue gc
Move the fdb garbage collector to a workqueue which fires at least 10 milliseconds apart and cleans chain by chain allowing for other tasks to run in the meantime. When having thousands of fdbs the system is much more responsive. Most importantly remove the need to check if the matched entry has expired in __br_fdb_get that causes false-sharing and is completely unnecessary if we cleanup entries, at worst we'll get 10ms of traffic for that entry before it gets deleted. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/bridge/br_device.c1
-rw-r--r--net/bridge/br_fdb.c31
-rw-r--r--net/bridge/br_if.c2
-rw-r--r--net/bridge/br_ioctl.c2
-rw-r--r--net/bridge/br_netlink.c2
-rw-r--r--net/bridge/br_private.h4
-rw-r--r--net/bridge/br_stp.c2
-rw-r--r--net/bridge/br_stp_if.c4
-rw-r--r--net/bridge/br_stp_timer.c2
-rw-r--r--net/bridge/br_sysfs_br.c2
10 files changed, 29 insertions, 23 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c